Replace the previous string-based resolution/fps/etc. handling for VideoStreams
by parsing the 'getResolution()'-string to a data class to improve maintainability.
Video resolutions (e.g. "720p60") were previously compared and matched using
regex-based string manipulation all over the place. This was fragile,
required repeated parsing and made it difficult to extend the matching logic.
It can handle all the strings like before: "720p", "720p60"
Additionally this patch can also handle strings like: "720p60@123k", or "720p@2m"
Main changes:
- Introduce internal data class VideoQuality (resolution, fps, bitrate, formatRank).
- Introduce internal VideoStreamWithQuality to associate streams with parsed quality.
- Parse quality only once.
- Replace resolution string sorting with a comparator based on
resolution -> fps -> formatRank -> bitrate.
- Rework stream selection to use a priority-based matching algorithm
(format, resolution, fps, bitrate).
- Prefer candidates with bitrate closest to the requested one when multiple
streams match the same priority class.
- Completed the UI and logic for pending items of Debug screen using Jetpack Compose.
- Implemented a new navigation system for settings using the navigation3
lib as it is now stable.
- Reuses the `ScaffoldWithToolbar` composable and removed the previous
`Toolbar` composable to avoid redundancy in code.
- Refactored the `SettingsViewModel` to use a `BooleanPreference` helper
class to reuse and reducing boilerplate for state management.
- Created a shared `TextBase` composable to remove duplicated UI logic
between `SwitchPreference` and `TextPreference`.
- Move the build-variant-dependent logic for LeakCanary and reused it in
Compose and Fragment, this logic is used for ensuring the leak canary
fields are only enabled in debug variants.
- Fixed a layout bug in `SwitchPreference` where long summary text could
misalign the switch component and also adjusted the paddings for consistency.
They should be fixed by translators or weblate in general.
../../src/main/res/values-lt/strings.xml:87: For locale "lt" (Lithuanian) the following quantity should also be defined: many (e.g. "1.1 obuolio")
../../src/main/res/values-is/strings.xml:318: The quantity 'one' matches more than one specific number in this locale (1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, …), but the message did not include a formatting argument (such as %d). This is usually an internationalization error. See full issue explanation for more.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
../../src/main/res/layout/activity_player_queue_control.xml:208: Must use app:tint instead of android:tint
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
../../src/main/java/org/schabi/newpipe/local/subscription/dialog/FeedGroupDialog.kt:509: Must be one or more of: InputMethodManager.HIDE_IMPLICIT_ONLY, InputMethodManager.HIDE_NOT_ALWAYS
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
../../src/main/java/us/shandian/giga/get/sqlite/FinishedMissionStore.java:105: Value must be ≥ 0 but getColumnIndex can be -1
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Notifications can be disabled manually even after permission has been granted once.
Always check if they are enabled before notifying the user.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
AGP 9.0.0 has introduced additional resource shrinking tasks. Its better
to enable and fix this.
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Currently translated at 100.0% (764 of 764 strings)
Translated using Weblate (Dutch)
Currently translated at 57.3% (51 of 89 strings)
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (764 of 764 strings)
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (764 of 764 strings)
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (764 of 764 strings)
Translated using Weblate (Somali)
Currently translated at 72.1% (551 of 764 strings)
Translated using Weblate (Russian)
Currently translated at 100.0% (764 of 764 strings)
Translated using Weblate (Portuguese (Brazil))
Currently translated at 66.2% (59 of 89 strings)
Translated using Weblate (Portuguese (Brazil))
Currently translated at 66.2% (59 of 89 strings)
Translated using Weblate (Spanish)
Currently translated at 100.0% (764 of 764 strings)
Translated using Weblate (Dutch)
Currently translated at 99.8% (763 of 764 strings)
Translated using Weblate (Latvian)
Currently translated at 97.6% (746 of 764 strings)
Translated using Weblate (Portuguese (Portugal))
Currently translated at 99.8% (763 of 764 strings)
Translated using Weblate (Portuguese (Brazil))
Currently translated at 53.9% (48 of 89 strings)
Translated using Weblate (Spanish)
Currently translated at 99.8% (763 of 764 strings)
Translated using Weblate (Croatian)
Currently translated at 100.0% (764 of 764 strings)
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (89 of 89 strings)
Translated using Weblate (Marathi)
Currently translated at 30.4% (233 of 764 strings)
Translated using Weblate (Portuguese)
Currently translated at 99.8% (763 of 764 strings)
Translated using Weblate (Polish)
Currently translated at 56.1% (50 of 89 strings)
Co-authored-by: 439JBYL80IGQTF25UXNR0X1BG <439JBYL80IGQTF25UXNR0X1BG@users.noreply.hosted.weblate.org>
Co-authored-by: AMOL GHORPADE <amolghorpade4u@gmail.com>
Co-authored-by: Daria Szatan <bla_ke@tuta.io>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Kairos <private.snazzy673@simplelogin.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Miq Maq <maqdishi@gmail.com>
Co-authored-by: Nicolás Pérez <nicoperez241@proton.me>
Co-authored-by: Philip Goto <philip.goto@gmail.com>
Co-authored-by: delvani <del.cidrak@gmail.com>
Co-authored-by: igoroliveira-letras <igoroliveiradasilvaofc@gmail.com>
Co-authored-by: ojppe <ojppe@users.noreply.hosted.weblate.org>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: ℂ𝕠𝕠𝕠𝕝 (𝕘𝕚𝕥𝕙𝕦𝕓.𝕔𝕠𝕞/ℂ𝕠𝕠𝕠𝕝) <coool@mail.lv>
Co-authored-by: 大王叫我来巡山 <hamburger2048@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/nl/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pl/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/zh_Hans/
Translation: NewPipe/Metadata