* morituri/common/program.py:

* morituri/image/table.py:
	* morituri/rip/cd.py:
	  Get CDDB disc id.  Use it to print info when not found on
	  MusicBrainz.
This commit is contained in:
Thomas Vander Stichele
2011-01-02 17:14:26 +00:00
parent 1ca176a91a
commit 08fc4f67a6
4 changed files with 113 additions and 9 deletions

View File

@@ -301,6 +301,22 @@ class Program(log.Loggable):
return os.path.join(outdir, template % v)
def getCDDB(self, cddbdiscid):
"""
@param cddbdiscid: list of id, tracks, offsets, seconds
@rtype: str
"""
# FIXME: convert to nonblocking?
import CDDB
code, md = CDDB.query(cddbdiscid)
self.debug('CDDB query result: %r, %r', code, md)
if code == 200:
return md['title']
return None
def getMusicBrainz(self, ittoc, mbdiscid):
# look up disc on musicbrainz
ret = None