~ahayzen/cappella/cappella10_properties_load_in_thread

« back to all changes in this revision

Viewing changes to cappella/engine/htd32/_workers/file_fix/__init__.py

  • Committer: andrew-hayzen
  • Date: 2013-04-29 02:00:06 UTC
  • Revision ID: ahayzen@gmail.com-20130429020006-h9q612l9swpif4gm
* Fixes to downloading podcasts
  * Pull of latest HTD
  * Fixes to unitylauncher and soundmenu plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    string = []
33
33
    offset = 0
34
34
 
 
35
    if not new:
 
36
        current = file[index]
 
37
 
35
38
    for att in atts:
36
39
        if data[atts[att]["name"]] is None:
37
40
            if new:
38
41
                d = b""
39
42
            else:
40
 
                d = file[index][offset:offset + atts[att]["size"] + 1]
 
43
                d = current[offset:offset + atts[att]["size"] + 1]
41
44
        else:
42
45
            d = b"".join([data[atts[att]["name"]], b"."])
43
46
 
44
47
        string.append(d.ljust(atts[att]["size"] + 1, esc))
45
48
 
46
 
        offset += atts[att]["size"]
 
49
        offset += atts[att]["size"] + 1
47
50
 
48
51
    return b"".join(string)
49
52