Index at 0 if song does not have more parts after the -
This commit is contained in:
@@ -240,9 +240,9 @@ def check_title_songname(x: str, audio):
|
|||||||
audio["TIT2"] = TIT2(encoding=3,text=str(items[1].strip().rstrip()))
|
audio["TIT2"] = TIT2(encoding=3,text=str(items[1].strip().rstrip()))
|
||||||
audio["title"] = TIT2(encoding=3,text=str(items[1].strip().rstrip()))
|
audio["title"] = TIT2(encoding=3,text=str(items[1].strip().rstrip()))
|
||||||
else:
|
else:
|
||||||
logging.info("song title has only 1 part after the -: " + items[1])
|
logging.info("song title has only 1 part after the -: " + items[0])
|
||||||
if ("TIT2" not in audio.keys()):
|
if ("TIT2" not in audio.keys()):
|
||||||
song_title = items[1].strip().rstrip()
|
song_title = items[0].strip().rstrip()
|
||||||
logging.info("TIT2 tag not found, creating it. Using song title: " + song_title)
|
logging.info("TIT2 tag not found, creating it. Using song title: " + song_title)
|
||||||
audio["TIT2"] = TIT2(encoding=3,text=song_title)
|
audio["TIT2"] = TIT2(encoding=3,text=song_title)
|
||||||
audio["title"] = TIT2(encoding=3,text=song_title)
|
audio["title"] = TIT2(encoding=3,text=song_title)
|
||||||
|
|||||||
Reference in New Issue
Block a user