mirror of
https://github.com/nims11/IPod-Shuffle-4g.git
synced 2025-12-07 07:58:01 +09:00
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
|
||||
|
||||
text = os.path.splitext(os.path.basename(filename))[0]
|
||||
audio = mutagen.File(filename, easy = True)
|
||||
audio = None
|
||||
try:
|
||||
audio = mutagen.File(filename, easy = True)
|
||||
except:
|
||||
print "Error calling mutagen. Possible invalid filename/ID3Tags (hyphen in filename?)"
|
||||
if audio:
|
||||
# Note: Rythmbox IPod plugin sets this value always 0.
|
||||
self["stop_at_pos_ms"] = int(audio.info.length * 1000)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue