Skip to content

Commit

Permalink
Merge branch 'z-huang:dev' into confirm-age-check
Browse files Browse the repository at this point in the history
  • Loading branch information
gechoto authored Oct 27, 2024
2 parents 333f6d0 + a7da937 commit 93ac477
Show file tree
Hide file tree
Showing 68 changed files with 3,354 additions and 452 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ A Material 3 YouTube Music client for Android
<img src="https://raw.githubusercontent.com/z-huang/InnerTune/dev/fastlane/metadata/android/en-US/images/phoneScreenshots/05.png" width="200" />
</p>

> **Warning**
> [!WARNING]
>
>If you're in a region where YouTube Music is not supported, you won't be able to use this app
***unless*** you have a proxy or VPN to connect to a YTM supported region.
Expand Down Expand Up @@ -89,7 +89,8 @@ Android development.
## Disclaimer

This project and its contents are not affiliated with, funded, authorized, endorsed by, or in any
way associated with YouTube, Google LLC or any of its affiliates and subsidiaries.
way associated with YouTube, Google LLC, Innertune Media Inc., or any of its affiliates and
subsidiaries.

Any trademark, service mark, trade name, or other intellectual property rights used in this project
are owned by the respective owners.
are owned by the respective owners.
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ android {
}
lint {
disable += "MissingTranslation"
disable += "MissingQuantity"
disable += "ImpliedQuantity"
}
// avoid DEPENDENCY_INFO_BLOCK for IzzyOnDroid
dependenciesInfo {
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/zionhuang/music/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.zionhuang.music.constants.ProxyEnabledKey
import com.zionhuang.music.constants.ProxyTypeKey
import com.zionhuang.music.constants.ProxyUrlKey
import com.zionhuang.music.constants.SYSTEM_DEFAULT
import com.zionhuang.music.constants.UseLoginForBrowse
import com.zionhuang.music.constants.VisitorDataKey
import com.zionhuang.music.extensions.toEnum
import com.zionhuang.music.extensions.toInetSocketAddress
Expand Down Expand Up @@ -71,6 +72,10 @@ class App : Application(), ImageLoaderFactory {
}
}

if (dataStore[UseLoginForBrowse] == true) {
YouTube.useLoginForBrowse = true
}

GlobalScope.launch {
dataStore.data
.map { it[VisitorDataKey] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ val MaxSongCacheSizeKey = intPreferencesKey("maxSongCacheSize")

val PauseListenHistoryKey = booleanPreferencesKey("pauseListenHistory")
val PauseSearchHistoryKey = booleanPreferencesKey("pauseSearchHistory")
val UseLoginForBrowse = booleanPreferencesKey("useLoginForBrowse")
val DisableScreenshotKey = booleanPreferencesKey("disableScreenshot")

val DiscordTokenKey = stringPreferencesKey("discordToken")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import com.zionhuang.innertube.YouTube
import com.zionhuang.music.LocalDatabase
import com.zionhuang.music.LocalPlayerAwareWindowInsets
import com.zionhuang.music.R
import com.zionhuang.music.constants.DisableScreenshotKey
import com.zionhuang.music.constants.PauseListenHistoryKey
import com.zionhuang.music.constants.PauseSearchHistoryKey
import com.zionhuang.music.constants.UseLoginForBrowse
import com.zionhuang.music.ui.component.DefaultDialog
import com.zionhuang.music.ui.component.IconButton
import com.zionhuang.music.ui.component.PreferenceEntry
Expand All @@ -48,6 +50,7 @@ fun PrivacySettings(
val database = LocalDatabase.current
val (pauseListenHistory, onPauseListenHistoryChange) = rememberPreference(key = PauseListenHistoryKey, defaultValue = false)
val (pauseSearchHistory, onPauseSearchHistoryChange) = rememberPreference(key = PauseSearchHistoryKey, defaultValue = false)
val (useLoginForBrowse, onUseLoginForBrowseChange) = rememberPreference(key = UseLoginForBrowse, defaultValue = false)
val (disableScreenshot, onDisableScreenshotChange) = rememberPreference(key = DisableScreenshotKey, defaultValue = false)

var showClearListenHistoryDialog by remember { mutableStateOf(false) }
Expand Down Expand Up @@ -155,6 +158,21 @@ fun PrivacySettings(
onClick = { showClearSearchHistoryDialog = true }
)

PreferenceGroupTitle(
title = stringResource(R.string.account)
)

SwitchPreference(
title = { Text(stringResource(R.string.use_login_for_browse)) },
description = stringResource(R.string.use_login_for_browse_desc),
icon = { Icon(painterResource(R.drawable.person), null) },
checked = useLoginForBrowse,
onCheckedChange = {
YouTube.useLoginForBrowse = it
onUseLoginForBrowseChange(it)
}
)

PreferenceGroupTitle(
title = stringResource(R.string.misc)
)
Expand Down
28 changes: 14 additions & 14 deletions app/src/main/res/values-DE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<string name="history">Hörverlauf</string>
<string name="stats">Statistiken</string>
<string name="mood_and_genres">Stimmungen und Genres</string>
<string name="account">Account</string>
<string name="account">Konto</string>
<string name="quick_picks">Schnellauswahl</string>
<string name="quick_picks_empty">Hören Sie sich einige Songs an, um Ihre Schnellauswahl zu treffen</string>
<string name="new_release_albums">Neu veröffentlichte Alben</string>
Expand Down Expand Up @@ -43,7 +43,6 @@
<string name="filter_playlists">Wiedergabelisten</string>
<string name="filter_community_playlists">Community-Wiedergabelisten</string>
<string name="filter_featured_playlists">Ausgewählte Wiedergabelisten</string>
<string name="filter_bookmarked">Bookmarked</string>
<string name="no_results_found">Keine Ergebnisse gefunden</string>
<!-- Artist screen -->
<string name="from_your_library">Aus der Bibliothek</string>
Expand All @@ -54,19 +53,19 @@
<!-- Button -->
<string name="retry">Wiederholen</string>
<string name="radio">Radio</string>
<string name="shuffle">Shuffle</string>
<string name="reset">Reset</string>
<string name="shuffle">Mischen</string>
<string name="reset">Zurücksetzen</string>
<!-- Menu -->
<string name="details">Details</string>
<string name="edit">Bearbeiten</string>
<string name="start_radio">Radio starten</string>
<string name="play">Wiedergegeben</string>
<string name="play">Wiedergeben</string>
<string name="play_next">Als nächstes wiedergeben</string>
<string name="add_to_queue">Zur Warteschlange hinzufügen</string>
<string name="add_to_library">Zur Bibliothek hinzufügen</string>
<string name="remove_from_library">Aus der Bibliothek entfernen</string>
<string name="download">Herunterladen</string>
<string name="downloading">Downloading</string>
<string name="downloading">Wird heruntergeladen</string>
<string name="remove_download">Download entfernen</string>
<string name="import_playlist">Wiedergabeliste importieren</string>
<string name="add_to_playlist">Zur Wiedergabeliste hinzufügen</string>
Expand All @@ -77,7 +76,7 @@
<string name="delete">Löschen</string>
<string name="remove_from_history">aus dem Wiedergabeverlauf entfernen</string>
<string name="search_online">Online-Suche</string>
<string name="sync">Sync</string>
<string name="sync">Synchronisieren</string>
<string name="advanced">Erweitert</string>
<!-- Sort menu -->
<string name="sort_by_create_date">Datum hinzugefügt</string>
Expand All @@ -90,12 +89,12 @@
<string name="sort_by_custom">Individuelle Reinfolge</string>
<!-- Dialog -->
<string name="media_id">Medien-ID</string>
<string name="mime_type">MIME type</string>
<string name="mime_type">MIME-Typ</string>
<string name="codecs">Codecs</string>
<string name="bitrate">Bitrate</string>
<string name="sample_rate">Abtastfrequenz</string>
<string name="loudness">Lautstärke</string>
<string name="volume">Volume</string>
<string name="volume">Lautstärke</string>
<string name="file_size">Dateigröße</string>
<string name="unknown">Unbekannt</string>
<string name="copied">In die Zwischenablage kopiert</string>
Expand All @@ -118,7 +117,7 @@
<!-- Noun -->
<plurals name="n_song">
<item quantity="one">%d Lied</item>
<item quantity="other">%d Lied</item>
<item quantity="other">%d Lieder</item>
</plurals>
<plurals name="n_artist">
<item quantity="one">%d Künstler</item>
Expand Down Expand Up @@ -244,9 +243,9 @@
<string name="default_">Standard</string>
<string name="auto_load_more">Automatisch mehr Lieder laden</string>
<string name="logout">Abmeldung</string>
<string name="theme">Theme</string>
<string name="theme">Thema</string>
<string name="other_versions">Andere Versionen</string>
<string name="stop_music_on_task_clear">Stop music on task clear</string>
<string name="stop_music_on_task_clear">Musik stoppen wenn die App aus dem Hintergrund gelöscht wird</string>
<string name="library_album_empty">Alben aus der Bibliothek werden hier angezeigt</string>
<string name="add_all_to_library">Alle zur Bibliothek hinzufügen</string>
<string name="similar_to">Ähnlich wie</string>
Expand All @@ -257,7 +256,7 @@
<string name="auto_skip_next_on_error">Automatisch zum nächsten Lied springen, wenn ein Fehler auftritt</string>
<string name="sided">Seite</string>
<string name="library_artist_empty">Künstler aus der Bibliothek werden hier angezeigt</string>
<string name="player">Player</string>
<string name="player">Abspieler</string>
<string name="preview">Vorschau</string>
<string name="misc">Sonstiges</string>
<string name="add_anyway">Trotzdem hinzufügen</string>
Expand All @@ -280,7 +279,7 @@
<string name="your_youtube_playlists">Ihre YouTube-Wiedergabelisten</string>
<string name="library_playlist_empty">Ihre Wiedergabelisten werden hier angezeigt</string>
<string name="disable_screenshot_desc">Wenn diese Option aktiviert ist, sind Screenshots und die App-Ansicht in „Zuletzt gesehen“ deaktiviert.</string>
<string name="discord_information">InnerTune verwendet die KizzyRPC-Bibliothek, um den Status Ihres Discord-Kontos zu setzen. Dazu wird die Discord-Gateway-Verbindung verwendet, was als Verstoß gegen die AGB von Discord angesehen werden kann. Es sind jedoch keine Fälle bekannt, in denen Benutzerkonten aus diesem Grund gesperrt wurden. Die Verwendung erfolgt auf eigene Gefahr. InnerTune extrahiert nur dein Token, alles andere wird lokal gespeichert.</string>
<string name="discord_information">InnerTune verwendet die KizzyRPC-Bibliothek, um den Status Ihres Discord-Kontos zu setzen. Dazu wird die Discord-Gateway-Verbindung verwendet, was als Verstoß gegen die AGB von Discord angesehen werden kann. Es sind jedoch keine Fälle bekannt, in denen Benutzerkonten aus diesem Grund gesperrt wurden. Die Verwendung erfolgt auf eigene Gefahr.\n\nInnerTune extrahiert nur dein Token, alles andere wird lokal gespeichert.</string>
<string name="squiggly">Verschnörkelt</string>
<string name="grid_cell_size">Größe der Rasterzellen</string>
<string name="search_history">Suchverlauf</string>
Expand All @@ -295,4 +294,5 @@
<string name="remove_all_from_library">Alle aus der Bibliothek entfernen</string>
<string name="persistent_queue_desc">Wiederherstellung der letzten Warteschlange beim Starten der App</string>
<string name="auto_load_more_desc">Automatisches Hinzufügen weiterer Lieder, wenn das Ende der Warteschlange erreicht ist, sofern möglich</string>
<string name="filter_bookmarked">Als Lesezeichen gespeichert</string>
</resources>
Loading

0 comments on commit 93ac477

Please sign in to comment.