fix flac mime types in rclaudio + small changes for experimenting with embedding an interpreter in recollindex

This commit is contained in:
Jean-Francois Dockes
2015-08-23 09:29:26 +02:00
parent 047c49bbba
commit 766a34a8db
2 changed files with 33 additions and 6 deletions
+14 -4
View File
@@ -52,7 +52,9 @@ class AudioTagExtractor:
tags = MP3(filename, ID3=EasyID3)
elif mimetype == "application/ogg":
tags = OggVorbis(filename)
elif mimetype == "application/x-flac":
elif mimetype == "application/x-flac" or \
mimetype == "audio/x-flac" or \
mimetype == "audio/flac":
tags = FLAC(filename)
else:
raise Exception, "Bad mime type %s" % mimetype
@@ -98,6 +100,14 @@ class AudioTagExtractor:
self.currentindex += 1
return ret
proto = rclexecm.RclExecM()
extract = AudioTagExtractor(proto)
rclexecm.main(proto, extract)
def makeObject():
print("makeObject");
proto = rclexecm.RclExecM()
print("makeObject: rclexecm ok");
extract = AudioTagExtractor(proto)
return 17
if __name__ == '__main__':
proto = rclexecm.RclExecM()
extract = AudioTagExtractor(proto)
rclexecm.main(proto, extract)