23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# ID3 libraries
try:
from mutagen import File as get_meta
except:
try:
from ID3 import ID3
__print__(dbg.INFO, "Just basic ID3 support")
get_meta = lambda fn: dict([(k.lower(),v) for k,v in ID3(fn).iteritems()])
except:
__print__(dbg.INIT, "You are out of luck in regards to mp3 browsing. No ID3 support.")
get_meta = lambda *x: {}
# work around mutagens difficult interface
def mutagen_postprocess(d):
if d.get("TIT2"):
return {
|
|
|
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# ID3 libraries
try:
from mutagen import File as get_meta
except:
try:
from ID3 import ID3
log.INFO("Just basic ID3 support")
get_meta = lambda fn: dict([(k.lower(),v) for k,v in ID3(fn).iteritems()])
except:
log.INIT("You are out of luck in regards to mp3 browsing. No ID3 support.")
get_meta = lambda *x: {}
# work around mutagens difficult interface
def mutagen_postprocess(d):
if d.get("TIT2"):
return {
|