Rip out all code that directly uses gstreamer
We can now rip CDs without gstreamer. This is not the most clean attempt, but I have tried to remove most of the code that depends on gstreamer. I hope there is not a lot of code left that depends on code that I have removed - I can at least rip a CD fully.
This commit is contained in:
@@ -135,47 +135,6 @@ def formatTime(seconds, fractional=3):
|
||||
|
||||
return " ".join(chunks)
|
||||
|
||||
|
||||
def tagListToDict(tl):
|
||||
"""
|
||||
Converts gst.TagList to dict.
|
||||
Also strips it of tags that are not writable.
|
||||
"""
|
||||
import gst
|
||||
|
||||
d = {}
|
||||
for key in tl.keys():
|
||||
if key == gst.TAG_DATE:
|
||||
date = tl[key]
|
||||
d[key] = "%4d-%2d-%2d" % (date.year, date.month, date.day)
|
||||
elif key in [
|
||||
gst.TAG_AUDIO_CODEC,
|
||||
gst.TAG_VIDEO_CODEC,
|
||||
gst.TAG_MINIMUM_BITRATE,
|
||||
gst.TAG_BITRATE,
|
||||
gst.TAG_MAXIMUM_BITRATE,
|
||||
]:
|
||||
pass
|
||||
else:
|
||||
d[key] = tl[key]
|
||||
return d
|
||||
|
||||
|
||||
def tagListEquals(tl1, tl2):
|
||||
d1 = tagListToDict(tl1)
|
||||
d2 = tagListToDict(tl2)
|
||||
|
||||
return d1 == d2
|
||||
|
||||
|
||||
def tagListDifference(tl1, tl2):
|
||||
d1 = tagListToDict(tl1)
|
||||
d2 = tagListToDict(tl2)
|
||||
return set(d1.keys()) - set(d2.keys())
|
||||
|
||||
return d1 == d2
|
||||
|
||||
|
||||
class MissingDependencyException(Exception):
|
||||
dependency = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user