mirror of
https://github.com/nims11/IPod-Shuffle-4g.git
synced 2025-12-08 00:18:01 +09:00
encode error bugs due to absent ID3 tag resolved
This commit is contained in:
parent
8b38b0fb90
commit
b408be48de
1 changed files with 3 additions and 1 deletions
|
|
@ -246,7 +246,9 @@ class Track(Record):
|
||||||
text = " - ".join(audio.get("title", "") + audio.get("artist", ""))
|
text = " - ".join(audio.get("title", "") + audio.get("artist", ""))
|
||||||
|
|
||||||
# Handle the VoiceOverData
|
# Handle the VoiceOverData
|
||||||
self["dbid"] = hashlib.md5(text.encode("latin-1", "ignore")).digest()[:8] #pylint: disable-msg=E1101
|
if type(text) != type(''):
|
||||||
|
text = text.encode('utf8', 'ignore')
|
||||||
|
self["dbid"] = hashlib.md5(text).digest()[:8] #pylint: disable-msg=E1101
|
||||||
self.text_to_speech(text, self["dbid"])
|
self.text_to_speech(text, self["dbid"])
|
||||||
|
|
||||||
class PlaylistHeader(Record):
|
class PlaylistHeader(Record):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue