From 6fa827c248a6322b778bcbea92ac1e3fffbd02c8 Mon Sep 17 00:00:00 2001 From: Justin Donofrio Date: Tue, 17 Dec 2024 13:30:54 -0500 Subject: [PATCH] Fix nonstandard apple music lyrics --- src/onthespot/api/apple_music.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onthespot/api/apple_music.py b/src/onthespot/api/apple_music.py index b8ed012..2c8da34 100644 --- a/src/onthespot/api/apple_music.py +++ b/src/onthespot/api/apple_music.py @@ -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)