Skip to content

Commit

Permalink
Fix nonstandard apple music lyrics
Browse files Browse the repository at this point in the history
  • Loading branch information
justin025 committed Dec 17, 2024
1 parent 6e003f0 commit 6fa827c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/onthespot/api/apple_music.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def apple_music_get_lyrics(session, item_id, item_type, metadata, filepath):
else: # Format: SS.mmm
seconds, milliseconds = begin_time.split('.')
minutes = '0'
formatted_time = f"{int(minutes):02}:{int(seconds):02}.{int(milliseconds)}"
formatted_time = f"{int(minutes):02}:{int(seconds):02}.{int(milliseconds.replace('s', ''))}"
lyric = f'[{formatted_time}] {lyric}'

lyrics_list.append(lyric)
Expand Down

0 comments on commit 6fa827c

Please sign in to comment.