Conversation
Initial commit.
Currently translated at 92.7% (686 of 740 strings) Translated using Weblate (Swedish) Currently translated at 100.0% (84 of 84 strings) Translated using Weblate (Turkish) Currently translated at 100.0% (740 of 740 strings) Translated using Weblate (Georgian) Currently translated at 83.3% (70 of 84 strings) Translated using Weblate (Estonian) Currently translated at 16.6% (14 of 84 strings) Translated using Weblate (Estonian) Currently translated at 100.0% (740 of 740 strings) Translated using Weblate (Mainfränkisch) Currently translated at 1.0% (8 of 740 strings) Translated using Weblate (Bavarian) Currently translated at 3.9% (29 of 740 strings) Translated using Weblate (German) Currently translated at 100.0% (84 of 84 strings) Added translation using Weblate (Mainfränkisch) Translated using Weblate (Thai) Currently translated at 36.6% (271 of 740 strings) Translated using Weblate (Armenian) Currently translated at 28.2% (209 of 740 strings) Translated using Weblate (Georgian) Currently translated at 85.7% (72 of 84 strings) Translated using Weblate (Thai) Currently translated at 34.3% (254 of 740 strings) Translated using Weblate (Gujarati) Currently translated at 11.3% (84 of 740 strings) Translated using Weblate (Hungarian) Currently translated at 100.0% (84 of 84 strings) Translated using Weblate (Slovak) Currently translated at 100.0% (84 of 84 strings) Translated using Weblate (Nepali) Currently translated at 1.1% (1 of 84 strings) Translated using Weblate (Slovak) Currently translated at 100.0% (84 of 84 strings) Translated using Weblate (French) Currently translated at 100.0% (84 of 84 strings) Translated using Weblate (Portuguese) Currently translated at 100.0% (740 of 740 strings) Translated using Weblate (Gujarati) Currently translated at 11.0% (82 of 740 strings) Translated using Weblate (Arabic) Currently translated at 100.0% (740 of 740 strings) Co-authored-by: Alex25820 <alexs25820@gmail.com> Co-authored-by: Bruno Fragoso <darth_signa@hotmail.com> Co-authored-by: Davit Mayilyan <davit.mayilyan@protonmail.ch> Co-authored-by: Emin Tufan Çetin <etcetin@gmail.com> Co-authored-by: Garfield2150 <knd.garfield@gmail.com> Co-authored-by: Ghost of Sparta <makesocialfoss32@keemail.me> Co-authored-by: Goudarz Jafari <goudarz.jafari@gmail.com> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Kchenik Poudel <Kakapoudel7@gmail.com> Co-authored-by: Kuko <kuko7@protonmail.ch> Co-authored-by: Paul Sibila <p.aul@mail.de> Co-authored-by: Priit Jõerüüt <hwlate@joeruut.com> Co-authored-by: Rex_sa <rex.sa@pm.me> Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com> Co-authored-by: freddyLovesUs <compteperso@outlook.com> Co-authored-by: રાજ ભાતેલીઆ <rajbhatelia@gmail.com> Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/de/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/et/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/fr/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/hu/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ka/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ne/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/sk/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/sv/ Translation: NewPipe/Metadata
Read the comments in the lines changed to understand more
Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
This changes significantly how the MediaSessionCompat and MediaSessionConnector objects are used: - now they are tied to the service and not to the player, and so they might be reused with multiple players (which should be allowed) - now they can exist even if there is no player (which is fundamental to be able to answer media browser queries)
Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
This class will receive the media URLs generated by [MediaBrowserImpl] and will start playback of the corresponding streams or playlists. Co-authored-by: Haggai Eran <haggai.eran@gmail.com> Co-authored-by: Profpatsch <mail@profpatsch.de>
This class implements the media browser service interface as a standalone class for clearer separation of concerns (otherwise everything would need to go in PlayerService, since PlayerService overrides MediaBrowserServiceCompat) Co-authored-by: Haggai Eran <haggai.eran@gmail.com> Co-authored-by: Profpatsch <mail@profpatsch.de>
Now the media browser queries are replied to by MediaBrowserImpl Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
If a playbackPreparer is set, then instead of calling `player.prepare()`, the MediaSessionConnector will call `playbackPreparer.onPrepare(true)` instead, as seen below.
This commit makes it so that playbackPreparer.onPrepare(true) restores the original behavior of just calling player.prepare().
From MediaSessionConnector -> MediaSessionCompat.Callback implementation:
```java
@OverRide
public void onPlay() {
if (canDispatchPlaybackAction(PlaybackStateCompat.ACTION_PLAY)) {
if (player.getPlaybackState() == Player.STATE_IDLE) {
if (playbackPreparer != null) {
playbackPreparer.onPrepare(/* playWhenReady= */ true);
} else {
player.prepare();
}
} else if (player.getPlaybackState() == Player.STATE_ENDED) {
seekTo(player, player.getCurrentMediaItemIndex(), C.TIME_UNSET);
}
Assertions.checkNotNull(player).play();
}
}
```
This commit is a consequence of the commit "Drop some assumptions on how PlayerService is started and reused". Since the assumptions on how the PlayerService is started and reused have changed, we also need to adapt the way it is stopped. This means allowing the service to remain alive even after the player is destroyed, in case the system is still accessing PlayerService e.g. through the media browser interface. The foreground service needs to be stopped and the notification removed in any case.
Non-item errors, i.e. critical parsing errors of the page, are still handled properly.
Update translations
Fixes mini-player not appearing on app start if the player service is already playing something. The PlayerService (and the player) may be started from an external intent that does not involve the MainActivity (e.g. RouterActivity or Android Auto's media browser interface). This PR tries to bind to the PlayerService as soon as the MainActivity starts, but only does so in a passive way, i.e. if the service is not already running it is not started. Once the connection between PlayerHolder and PlayerService is setup, the ACTION_PLAYER_STARTED broadcast is sent to MainActivity so that it can setup the bottom mini-player. Another important thing this commit does is to check whether the player is open before actually adding the mini-player view, since the PlayerService could be bound even without a running player (e.g. Android Auto's media browser is being used). This is a consequence of commit "Drop some assumptions on how PlayerService is started and reused".
This bug started appearing because the way to close the player is now unified in PlayerHolder.stopService(), which causes the player to reach back to the video detail fragment with a notification of the shutdown (i.e. onServiceStopped() is called). This is fixed by adding a nullability check on the binding.
This is, again, a consequence of the commit "Drop some assumptions on how PlayerService is started and reused". This commit notified VideoDetailFragment of player starting and stopping independently of the player. Read the comments in the code changes for more information.
* Ugly fix for broken text colors in dark mode * Add comment for clarification * Added error prevention * Update app/src/main/java/org/schabi/newpipe/MainActivity.java --------- Co-authored-by: Stypox <stypox@pm.me>
…12408) * fix: handle nullable nextPage behavior when searching albums #12401 * feat: add nullable annotation to newPage attribute in SearchFragment * Updated more usages of InfoItemsPage#getNextPage. Nullability is already handled in these areas so no other changes needed --------- Co-authored-by: Siddhesh Naik <siddheshnaik20@protonmail.com>
…n SearchFragment.handleNextItems()
and reset them when the language is changed/changing. This way they will be re-initialized on the next call. Also Remove a bunch of outdated/non-thread safe code (STRING_FORMATTER)
formatters() is called again by the player before the user has a chance to click on the language in the language chooser. So the correct solution would probably be to attach to https://developer.android.com/reference/android/content/Intent#ACTION_LOCALE_CHANGED, but let's keep it simple. I added `PlayerHelper.resetFormat();` in `ContentSettingsFragment.onDestroy()` and it works. It will mean the player formatters will be reset every time the user exits content settings, but whatever.
Currently translated at 100.0% (748 of 748 strings) Translated using Weblate (Arabic) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Russian) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Arabic) Currently translated at 100.0% (748 of 748 strings) Translated using Weblate (Arabic) Currently translated at 100.0% (748 of 748 strings) Translated using Weblate (Russian) Currently translated at 100.0% (748 of 748 strings) Translated using Weblate (Turkish) Currently translated at 100.0% (748 of 748 strings) Translated using Weblate (Indonesian) Currently translated at 100.0% (748 of 748 strings) Translated using Weblate (French) Currently translated at 100.0% (748 of 748 strings) Translated using Weblate (Icelandic) Currently translated at 99.4% (745 of 749 strings) Translated using Weblate (Estonian) Currently translated at 18.6% (16 of 86 strings) Translated using Weblate (Slovak) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Portuguese (Portugal)) Currently translated at 99.5% (746 of 749 strings) Translated using Weblate (Belarusian) Currently translated at 99.7% (747 of 749 strings) Translated using Weblate (Estonian) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Bulgarian) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Hebrew) Currently translated at 99.7% (747 of 749 strings) Translated using Weblate (Chinese (Traditional Han script)) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Chinese (Simplified Han script)) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Polish) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Ukrainian) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Czech) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Slovak) Currently translated at 99.7% (747 of 749 strings) Translated using Weblate (Greek) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Portuguese) Currently translated at 99.5% (746 of 749 strings) Translated using Weblate (Italian) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Hungarian) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (German) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (German) Currently translated at 100.0% (749 of 749 strings) Translated using Weblate (Tamazight (Central Atlas)) Currently translated at 19.2% (144 of 749 strings) Translated using Weblate (Macedonian) Currently translated at 79.3% (594 of 749 strings) Translated using Weblate (Slovenian) Currently translated at 54.6% (409 of 749 strings) Translated using Weblate (Tigrinya) Currently translated at 12.7% (95 of 747 strings) Translated using Weblate (Tigrinya) Currently translated at 3.4% (3 of 86 strings) Translated using Weblate (Icelandic) Currently translated at 99.4% (743 of 747 strings) Translated using Weblate (Chinese (Simplified Han script)) Currently translated at 90.6% (78 of 86 strings) Translated using Weblate (Slovak) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (French) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Italian) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Italian) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Polish) Currently translated at 58.1% (50 of 86 strings) Translated using Weblate (Hindi) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Hungarian) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Punjabi) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Czech) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Ukrainian) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (German) Currently translated at 100.0% (86 of 86 strings) Translated using Weblate (Belarusian) Currently translated at 100.0% (747 of 747 strings) Translated using Weblate (Punjabi) Currently translated at 100.0% (747 of 747 strings) Translated using Weblate (Hindi) Currently translated at 100.0% (747 of 747 strings) Translated using Weblate (Czech) Currently translated at 100.0% (747 of 747 strings) Translated using Weblate (Slovak) Currently translated at 100.0% (747 of 747 strings) Translated using Weblate (Slovak) Currently translated at 100.0% (747 of 747 strings) Translated using Weblate (German) Currently translated at 100.0% (747 of 747 strings) Co-authored-by: 439JBYL80IGQTF25UXNR0X1BG <439JBYL80IGQTF25UXNR0X1BG@users.noreply.hosted.weblate.org> Co-authored-by: Agnieszka C <aga_04@o2.pl> Co-authored-by: Drugi Sapog <dindrugi@users.noreply.hosted.weblate.org> Co-authored-by: Dual Natan <dvapatinatan@gmail.com> Co-authored-by: Emin Tufan Çetin <etcetin@gmail.com> Co-authored-by: Fjuro <fjuro@alius.cz> Co-authored-by: Ghost of Sparta <makesocialfoss32@keemail.me> Co-authored-by: Hakim Oubouali <hakim.oubouali.skr@gmail.com> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Igor Rückert <igorruckert@yahoo.com.br> Co-authored-by: Igor Sorocean <sorocean.igor@gmail.com> Co-authored-by: Jeff Huang <s8321414@gmail.com> Co-authored-by: Marian Hanzel <marulinko@gmail.com> Co-authored-by: Matej U <mateju@src.gnome.org> Co-authored-by: Michael Moroni <michaelmoroni@disroot.org> Co-authored-by: Mickaël Binos <mickaelbinos@outlook.com> Co-authored-by: Milan <mobrcian@hotmail.com> Co-authored-by: NTFSynergy <ntfsynergy@gmail.com> Co-authored-by: Priit Jõerüüt <jrthwlate@users.noreply.hosted.weblate.org> Co-authored-by: Random <random-r@users.noreply.hosted.weblate.org> Co-authored-by: Rex_sa <rex.sa@pm.me> Co-authored-by: Stypox <stypox@pm.me> Co-authored-by: Sveinn í Felli <sv1@fellsnet.is> Co-authored-by: Trunars <trunars@abv.bg> Co-authored-by: Vasilis K <skyhirules@gmail.com> Co-authored-by: VfBFan <drop0815@posteo.de> Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com> Co-authored-by: Yassin Amir <y6b5@proton.me> Co-authored-by: erti <erti@users.noreply.hosted.weblate.org> Co-authored-by: ikanakova <ikanakova@users.noreply.hosted.weblate.org> Co-authored-by: nautilusx <translate@disroot.org> Co-authored-by: ssantos <ssantos@web.de> Co-authored-by: whistlingwoods <72640314+whistlingwoods@users.noreply.github.com> Co-authored-by: zmni <zmni@outlook.com> Co-authored-by: Максим Горпиніч <gorpinicmaksim5@gmail.com> Co-authored-by: 大王叫我来巡山 <hamburger2048@users.noreply.hosted.weblate.org> Co-authored-by: 赖诚俊 <cosmic.universe.glitch@gmail.com> Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ar/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/cs/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/de/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/et/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/fr/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/hi/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/hu/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/it/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pa/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/pl/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ru/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/sk/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/ti/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/uk/ Translate-URL: https://hosted.weblate.org/projects/newpipe/metadata/zh_Hans/ Translation: NewPipe/Metadata
You can use this command to test instead:
adb shell run-as org.schabi.newpipe.debug.pr12450 'sed -i '"'"'s#<int name="last_used_preferences_version" value="8" />#<int name="last_used_preferences_version" value="6" />#'"'"' shared_prefs/org.schabi.newpipe.debug.pr12450_preferences.xml' && adb shell run-as org.schabi.newpipe.debug.pr12450 'sed -i '"'"'s#\]}</string>#,{\"tab_id\":5,\"service_id\":0,\"kiosk_id\":\"Trending\"},{\"tab_id\":5,\"service_id\":1,\"kiosk_id\":\"Top 50\"}]}</string>#'"'"' shared_prefs/org.schabi.newpipe.debug.pr12450_preferences.xml'
Currently translated at 12.7% (95 of 748 strings) Co-authored-by: fool <thing-sauna-cussed@duck.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Do not report regressions here, but rather in the corresponding issue: #12436
The changelog is also there.