feat: Enable downloading of song lyrics for offline viewing

This commit is contained in:
le-firehawk 2025-09-29 22:04:38 +09:30
parent 8bb6c02e46
commit c2b6d7eed5
12 changed files with 1652 additions and 67 deletions

View file

@ -51,7 +51,25 @@
app:layout_constraintTop_toTopOf="parent" />
</androidx.core.widget.NestedScrollView>
<Button
<com.google.android.material.button.MaterialButton
android:id="@+id/download_lyrics_button"
style="@style/Widget.Material3.Button.TonalButton.Icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_margin="16dp"
android:alpha="0.7"
android:contentDescription="@string/player_lyrics_download_content_description"
android:insetLeft="0dp"
android:insetTop="0dp"
android:insetRight="0dp"
android:insetBottom="0dp"
android:visibility="gone"
app:cornerRadius="64dp"
app:icon="@drawable/ic_download"
app:layout_constraintBottom_toTopOf="@+id/sync_lyrics_tap_button"
app:layout_constraintEnd_toEndOf="@+id/now_playing_song_lyrics_sroll_view" />
<com.google.android.material.button.MaterialButton
android:id="@+id/sync_lyrics_tap_button"
style="@style/Widget.Material3.Button.TonalButton.Icon"
android:layout_width="48dp"

View file

@ -199,6 +199,10 @@
<string name="player_playback_speed">%1$.2fx</string>
<string name="player_queue_clean_all_button">Clean play queue</string>
<string name="player_queue_save_queue_success">Saved play queue</string>
<string name="player_lyrics_download_content_description">Download lyrics for offline playback</string>
<string name="player_lyrics_downloaded_content_description">Lyrics downloaded for offline playback</string>
<string name="player_lyrics_download_success">Lyrics saved for offline playback.</string>
<string name="player_lyrics_download_failure">Lyrics are not available to download.</string>
<string name="player_server_priority">Server Priority</string>
<string name="player_unknown_format">Unknown format</string>
<string name="player_transcoding">Transcoding</string>
@ -327,6 +331,8 @@
<string name="settings_queue_syncing_title">Sync play queue for this user [Not Fully Baked]</string>
<string name="settings_radio">Show radio</string>
<string name="settings_radio_summary">If enabled, show the radio section. Restart the app for it to take full effect.</string>
<string name="settings_auto_download_lyrics">Auto download lyrics</string>
<string name="settings_auto_download_lyrics_summary">Automatically save lyrics when they are available so they can be shown while offline.</string>
<string name="settings_replay_gain">Set replay gain mode</string>
<string name="settings_rounded_corner">Rounded corners</string>
<string name="settings_rounded_corner_size">Corners size</string>

View file

@ -86,6 +86,12 @@
android:summary="@string/settings_radio_summary"
android:key="radio_section_visibility" />
<SwitchPreference
android:title="@string/settings_auto_download_lyrics"
android:defaultValue="false"
android:summary="@string/settings_auto_download_lyrics_summary"
android:key="auto_download_lyrics" />
<SwitchPreference
android:title="@string/settings_music_directory"
android:defaultValue="true"