pep8 fixes
This commit is contained in:
@@ -150,7 +150,8 @@ class ChecksumTask(log.Loggable, gstreamer.GstPipelineTask):
|
||||
self.debug('stopped')
|
||||
if not self._last:
|
||||
# see http://bugzilla.gnome.org/show_bug.cgi?id=578612
|
||||
self.debug('not a single buffer gotten, setting exception EmptyError')
|
||||
self.debug(
|
||||
'not a single buffer gotten, setting exception EmptyError')
|
||||
self.setException(common.EmptyError('not a single buffer gotten'))
|
||||
else:
|
||||
self._checksum = self._checksum % 2 ** 32
|
||||
|
||||
@@ -300,6 +300,7 @@ def shrinkPath(path):
|
||||
path = os.path.join(*parts)
|
||||
return path
|
||||
|
||||
|
||||
def getRealPath(refPath, filePath):
|
||||
"""
|
||||
Translate a .cue or .toc's FILE to an existing path.
|
||||
@@ -339,6 +340,7 @@ def getRealPath(refPath, filePath):
|
||||
|
||||
raise KeyError("Cannot find file for %r" % filePath)
|
||||
|
||||
|
||||
def getRelativePath(targetPath, collectionPath):
|
||||
"""
|
||||
Get a relative path from the directory of collectionPath to
|
||||
|
||||
@@ -90,7 +90,8 @@ def _getMetadata(release):
|
||||
metadata.release = release.getEarliestReleaseDate()
|
||||
|
||||
metadata.mbid = urlparse.urlparse(release.id)[2].split("/")[-1]
|
||||
metadata.mbidArtist = urlparse.urlparse(release.artist.id)[2].split("/")[-1]
|
||||
metadata.mbidArtist = urlparse.urlparse(
|
||||
release.artist.id)[2].split("/")[-1]
|
||||
metadata.url = release.getId()
|
||||
|
||||
tainted = False
|
||||
@@ -131,7 +132,8 @@ def _getMetadata(release):
|
||||
return metadata
|
||||
|
||||
|
||||
# see http://bugs.musicbrainz.org/browser/python-musicbrainz2/trunk/examples/ripper.py
|
||||
# see http://bugs.musicbrainz.org/browser/python-musicbrainz2/trunk/examples/
|
||||
# ripper.py
|
||||
|
||||
|
||||
def musicbrainz(discid):
|
||||
|
||||
@@ -204,7 +204,8 @@ def _getMetadata(release, discid):
|
||||
return metadata
|
||||
|
||||
|
||||
# see http://bugs.musicbrainz.org/browser/python-musicbrainz2/trunk/examples/ripper.py
|
||||
# see http://bugs.musicbrainz.org/browser/python-musicbrainz2/trunk/examples/
|
||||
# ripper.py
|
||||
|
||||
|
||||
def musicbrainz(discid, record=False):
|
||||
|
||||
@@ -198,7 +198,8 @@ class Program(log.Loggable):
|
||||
if i > 0:
|
||||
try:
|
||||
v['a'] = filterForPath(self.metadata.tracks[i - 1].artist)
|
||||
v['s'] = filterForPath(self.metadata.tracks[i - 1].sortName)
|
||||
v['s'] = filterForPath(
|
||||
self.metadata.tracks[i - 1].sortName)
|
||||
v['n'] = filterForPath(self.metadata.tracks[i - 1].title)
|
||||
except IndexError, e:
|
||||
print 'ERROR: no track %d found, %r' % (i, e)
|
||||
@@ -359,7 +360,8 @@ class Program(log.Loggable):
|
||||
|
||||
ret = gst.TagList()
|
||||
|
||||
# gst-python 0.10.15.1 does not handle unicode -> utf8 string conversion
|
||||
# gst-python 0.10.15.1 does not handle unicode -> utf8 string
|
||||
# conversion
|
||||
# see http://bugzilla.gnome.org/show_bug.cgi?id=584445
|
||||
if self.metadata and self.metadata.various:
|
||||
ret["album-artist"] = albumArtist.encode('utf-8')
|
||||
@@ -380,8 +382,8 @@ class Program(log.Loggable):
|
||||
# 0.10.15.1
|
||||
# FIXME: The dates are strings and must have the format 'YYYY',
|
||||
# 'YYYY-MM' or 'YYYY-MM-DD'.
|
||||
# GstDate expects a full date, so default to Jan and 1st if MM and DD
|
||||
# are missing
|
||||
# GstDate expects a full date, so default to
|
||||
# Jan and 1st if MM and DD are missing
|
||||
date = self.metadata.release
|
||||
if date:
|
||||
log.debug('metadata',
|
||||
|
||||
Reference in New Issue
Block a user