forked from upstream/IPod-Shuffle-4g
Fix hyphen in filename #4
This commit is contained in:
parent
d71be4f9fb
commit
5b2a4a2a36
1 changed files with 5 additions and 1 deletions
|
|
@ -327,7 +327,11 @@ class Track(Record):
|
||||||
self["filetype"] = 2
|
self["filetype"] = 2
|
||||||
|
|
||||||
text = os.path.splitext(os.path.basename(filename))[0]
|
text = os.path.splitext(os.path.basename(filename))[0]
|
||||||
|
audio = None
|
||||||
|
try:
|
||||||
audio = mutagen.File(filename, easy = True)
|
audio = mutagen.File(filename, easy = True)
|
||||||
|
except:
|
||||||
|
print "Error calling mutagen. Possible invalid filename/ID3Tags (hyphen in filename?)"
|
||||||
if audio:
|
if audio:
|
||||||
# Note: Rythmbox IPod plugin sets this value always 0.
|
# Note: Rythmbox IPod plugin sets this value always 0.
|
||||||
self["stop_at_pos_ms"] = int(audio.info.length * 1000)
|
self["stop_at_pos_ms"] = int(audio.info.length * 1000)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue