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
Nowhere else does this (write a setting if it’s not set).
It took me a while to see that this code does not do what it intends,
because `defaultFormat` is already the default value in the first
`context.getString`, so calling `getMediaFormatFromKey` again is the
exact same call (“do you know the definition of insanity…”) and will
return `null` again …
So let’s drop the setting write and just rely on the default values.
This format is not supported by ExoPlayer when returned as HLS streams, so we
can't play streams using this format and this delivery method.
Also improve the Javadoc of ListHelper.getPlayableStreams.
Instead of searching for the first audio stream matching a compatible media
format, this change makes SecondaryStreamHelper.getAudioStreamFor use methods
isLimitingDataUsage, getAudioFormatComparator and getAudioIndexByHighestRank of
ListHelper to get an audio stream which can be muxed into a video-only stream,
if available.
This allows users to download videos with the highest audio quality available
if no resolution limit on mobile data usage has been set.
The order of formats used to search a compatible audio stream has been kept.
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.