1 --- python-daap-0.7.1/daap.py 2007-09-10 20:35:45.000000000 +0200
2 +++ python-daap-0.7.1/daap.py 2010-11-03 19:39:09.000000000 +0100
4 # this returns an HTTP response object
5 response = self._get_response(r, params)
6 status = response.status
7 - content = response.read()
8 - # if we got gzipped data base, gunzip it.
9 - if response.getheader("Content-Encoding") == "gzip":
10 - log.debug("gunzipping data")
11 - old_len = len(content)
12 - compressedstream = StringIO( content )
13 - gunzipper = gzip.GzipFile(fileobj=compressedstream)
14 - content = gunzipper.read()
15 - log.debug("expanded from %s bytes to %s bytes", old_len, len(content))
16 - # close this, we're done with it
19 + content = response.read()
20 + # if we got gzipped data base, gunzip it.
21 + if response.getheader("Content-Encoding") == "gzip":
22 + log.debug("gunzipping data")
23 + old_len = len(content)
24 + compressedstream = StringIO( content )
25 + gunzipper = gzip.GzipFile(fileobj=compressedstream)
26 + content = gunzipper.read()
27 + log.debug("expanded from %s bytes to %s bytes", old_len, len(content))
28 + # close this, we're done with it
33 raise DAAPError('DAAPClient: %s: auth required'%r)
36 # the atoms we want. Making this list smaller reduces memory footprint,
37 # and speeds up reading large libraries. It also reduces the metainformation
38 # available to the client.
39 -daap_atoms = "dmap.itemid,dmap.itemname,daap.songalbum,daap.songartist,daap.songformat,daap.songtime,daap.songsize,daap.songgenre,daap.songyear,daap.songtracknumber"
40 +daap_atoms = "dmap.itemid,dmap.itemname,daap.songalbum,daap.songartist,daap.songformat,daap.songtime,daap.songsize,daap.songgenre,daap.songyear,daap.songtracknumber,daap.songtrackcount,daap.songbitrate"
42 class DAAPDatabase(object):
53 + 'trackcount': 'astc',
56 def __init__(self, database, atom):
57 self.database = database