earlier only overall amount of videos was shown. Now overall duration is shown there too - as formatted by existing Localization.concatenateStrings() and Localization.getDurationString().
show all videos OverallDuration in local Playlist too
refactor to make implementation in LocalPlaylistFragment and PlaylistFragment more obviously similar
unfortunately could not refactor upto BaseLocalListFragment
revert the changes for online Playlists
because they are paginated and may be infinite i.e. correct count may come only from the service->extractor chain which unfortunately does not give overall duration yet
next try to improve user-experience with online Playlist
just show that duration is longer (">") than the calculated value in case there is more page(s)
even more improve user-experience for online Playlist
by adding the duration of next items as soon as they are made visible
make showing of playlists duration configurable, disabled by default
adjusted duration to be handled as long because it comes as long from extractor
no idea why I handled it as int earlier
Revert "make showing of playlists duration configurable, disabled by default", refactor
This reverts commit bc1ba17a20d3dd1763210f81d7ca67c5f1734a3d.
Fix rebase
Apply review
Rename video -> stream
Remove unused settings keys
`streamInfo` and `channelInfo` have to be initialized, since the only
way to construct the class it to pass them. So we can remove the null
check boilerplate and make some of the accessors `NonNull`.
Disable loading all tabs at once, since there can be many of them, and use default strategy of only keeping in memory the two tabs adjacent to the current tab.
The fix just involves removing some really outdated code (6 years ago) added in 33e29be7db (diff-38bd2cf1b92659b499c08e1cf6ac9ef384c7e13381b906f2f98c57cbb758756dR778) (blame: 9318bb5306/app/src/main/java/org/schabi/newpipe/detail/VideoItemDetailActivity.java (L778)).
What that code did was setting the 'buddy' image to the uploader avatar as a placeholder, and then setting the actual image if it existed and after it had loaded.
That code remained there up until now, but now it doesn't make sense anymore, since Picasso already takes care of setting placeholders.
The problem is, starting from #10066 the actual uploader image is set before (not after) those lines of code, making them do the wrong thing, i.e. always overwrite the currently set image.
But then why did the channel avatar image work normally sometimes?
My guess is that since Picasso loads images in the background, when opening a video from scratch setting the placeholder still happened before Picasso finished loading the image.
However when the image is already cached it's loaded much faster and therefore setting the placeholder happens after, effectively hiding the loaded image.
imageListToDbUrl should be used if the URL is going to be saved to the database, to avoid saving nothing in case at the moment of saving the user preference is to not show images.
Add the separate utility class PlayButtonHelper to handle the initialization of the listeners.
The ClickListeners on playlist controls had different behaviours. This commit fixes that.
The commit also refactors the way how the app determines whether it is started for the first time. The previous version was not clean and recent in this PR caused it to fail.