Commit Graph

55 Commits

Author SHA1 Message Date
bg1722 13baaa31cd add an intuitive prefix for the duration of lists on UI, and avoid using the new prefix for single videos 2024-04-06 07:58:05 +02:00
bg1722 bef5907ec3
show OverallDuration in Playlist
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
2024-03-29 14:11:27 +01:00
Stypox aa84d6fc8f
Add @NonNull annotations 2023-12-22 18:52:42 +01:00
Stypox 3f37e27852
Add some documentation and javadocs
Also further simplify CommentRepliesInfo and RelatedItemsInfo
2023-12-22 11:57:55 +01:00
Stypox ad68f784ae
Extract some utility methods from CommentInfoItemHolder 2023-12-22 11:48:07 +01:00
Stypox 059db6fb31
Add replies button to comments 2023-12-22 11:48:05 +01:00
ThetaDev 4e837e838d
fix docs in app/src/main/java/org/schabi/newpipe/util/Localization.java
Co-authored-by: Audric V. <74829229+AudricV@users.noreply.github.com>
2023-05-01 00:02:37 +02:00
ThetaDev 9b8ffdd2aa fix: improve track name localization 2023-03-19 21:20:21 +01:00
ThetaDev 87a88e4df7 feat: localized audio track names 2023-03-19 15:45:52 +01:00
Isira Seneviratne 5c1af6d296 Group private Localization methods together. 2022-11-09 08:54:47 +05:30
Isira Seneviratne 6d812b86aa Use Locale.forLanguageTag(). 2022-11-09 08:51:12 +05:30
Isira Seneviratne 5c7dfd1d69 Remove unused method. 2022-08-06 06:54:21 +05:30
Isira Seneviratne 7aacaf8c38 Use Collectors.joining(). 2022-08-06 06:54:21 +05:30
Isira Seneviratne d62cdc659f Use MathUtils.clamp().
Co-authored-by: Stypox <stypox@pm.me>
2022-07-20 05:36:01 +05:30
Agnieszka C 43e91ae4ae
Added plural forms for download related strings (#6930)
Co-authored-by: Tobi <TobiGr@users.noreply.github.com>
2021-08-29 13:28:01 +02:00
Isira Seneviratne 74e20a8c52 Use PrettyTime's new formatUnrounded(OffsetDateTime) method.
Also change the types of the relevant variables from Calendar to OffsetDateTime.
2021-03-18 06:38:12 +05:30
TiA4f8R 79e98db3bd
Apply the requested changes and little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.

Apply the requested changes and do little improvements
Apply the requested changes, use ShareUtils.shareText to share an stream in the play queue and optimize imports for Java files, using Android Studio functionality.
2021-01-16 13:23:42 +01:00
Robin c90696e67e
Merge pull request #5371 from Stypox/merge-player
Merge player classes into a single one
2021-01-14 10:43:11 +01:00
Stypox f6e2dd1480
Merge player classes into a single one 2021-01-14 10:25:44 +01:00
XiangRongLin 50a026183d Make Localization.relativeTime testable
Problem is global state in static variable prettyTime. But for performance reasons on Android that is preferred.
Now allow injecting prettyTime dependency by making init function public.
2021-01-06 14:48:34 +01:00
Stypox 19f9b4f502
Improve meta info layout and merge duplicate code 2020-12-20 15:10:18 +01:00
Isira Seneviratne c0d6c8aeb3 Add a workaround for a possible null offset ID. 2020-12-10 15:23:30 +05:30
Isira Seneviratne eb1cddd85a Call DateWrapper's offsetDateTime() instead of date(). 2020-11-19 18:37:07 +05:30
Isira Seneviratne c745b845c5 Switch to the Java 8 Date/Time API. 2020-11-05 15:02:51 +05:30
TacoTheDank 1e1fb32558 Fix some version checks to use android.os.Build 2020-10-31 15:54:02 -04:00
mitosagi 8347d8700a Translate the numeric notation 2020-10-18 11:01:06 +09:00
bopol 2b1469e02e update to PrettyTime 4.0.6
fixes #4324
2020-10-03 19:04:44 +02:00
TacoTheDank ba6c7de35a
Use AndroidX preference 2020-09-06 12:52:42 +02:00
wb9688 87228673b4 Use final where possible 2020-08-16 10:25:09 +02:00
wb9688 2852815e1a Use suggested layout for search filters 2020-04-10 10:35:54 +02:00
Stypox 63e489f134 Use ITEM_COUNT_UNKNOWN 2020-04-10 10:35:54 +02:00
Stypox 914d3c4a66 Use "mini" stream count alternatives for info items
Note: more_than_100_videos_mini and infinite_videos_mini are untranslatable
2020-04-10 10:35:54 +02:00
Stypox 625419a7db Detect ITEM_COUNT_* in localizeStreamCount()
ITEM_COUNT_INFINITE and ITEM_COUNT_MORE_THAN_100.
Use localizeStreamCount in PlaylistFragment and PlaylistItemHolder
2020-04-10 10:35:54 +02:00
wb9688 fda5405e48 Improve code style to be more consistent 2020-04-02 15:57:50 +02:00
Mauricio Colli ac44ed0862
Localize duration strings used in feed settings using plurals 2020-03-14 00:12:53 -03:00
bopol 22aa6d16a2 public Utils.round() moved to private Localization.round() 2020-02-28 17:04:25 +01:00
bopol dfaa5675b6 Round at one place for Localization.shortCount() 2020-02-28 17:04:25 +01:00
bopol e62e34fd5c created default_localization_key 2020-02-16 22:41:32 +01:00
bopol f089cd027e Multiple localization fixes
With the extractor PR, fixes title & description shown in the wrong language.
Fixed views / spectators counts possibly in the wrong language
Fixed live spectators not showing full count on detail page
Fixed LIVE shown on players, it shows translated instead

Fixed Videos string in search / three dots not available in Weblate
(because it was videos, but there already was a plural string named videos, in Weblate)

Subscriber count is always giving the short count.
We can't get exact number since this YouTube update: https://support.google.com/youtube/thread/6543166
But only short count (B, M, k), so showing full number, eg for 1.9M: 1,900,000, is wrong because the number could be 1,923,490 or 1,897,789…

Added a « sytem default » option to content language and country language selector.
It's the one selected by default (not en-GB anymore then), and correspond to the
language of the system / country of the system
By system I mean phone, tablet, TV…

Fixed russian showing - before time ago (eg 19hrs ago)
This is a workaround fix, I opened an issue on prettytime library repo.

Fixed russian plurals:
other was used instead of many for videos and subscribers

Fixed seek_duration english only
2020-02-15 12:40:23 +01:00
bopol edc9d47da7 app language: refactoring
renamed NewPipe's language into App language, and same for all the
concerning thing (keys, comments…)

we now call assureCorrectAppLanguage(CONTEXT) in activities needing it
instead of changeAppLanguage(getAppLocale(CONTEXT), RESOURCES)
changeAppLanguage becomes private.
2020-01-29 21:21:00 +01:00
bopol e08e724573 upload date in description now matches newpipe's language 2020-01-18 10:46:53 +01:00
bopol 8f46432391 fixed some activities where the wrong languages would be set 2020-01-10 15:50:15 +01:00
bopol b32935a1b0 app language now changes time formatting (3hrs ago), was system language b4 2020-01-09 15:51:41 +01:00
bopol 3ad0e313ca changed the way to change language, now is «NewPipe's language» selector 2020-01-09 09:40:05 +01:00
bopol dea1e0dcb9 Update localizations settings
1) now, on « content language » change, it will also change the app language
2) added Esperanto to the list of language in content language
2020-01-04 21:38:27 +01:00
Mauricio Colli b125ff702a
Show parsed relative times instead of whatever the service gives us
Before, the direct value was given to the user, now it uses the parsed
date so we can match the device's language.

To get the relative time from the parsed dates, we use the PrettyTime
library.

Also introduces a debug option to check the service's original value.
2019-11-17 23:58:55 -03:00
Mauricio Colli 6e546703a9
Show proper text for live streams watching/listening count 2019-11-17 23:58:54 -03:00
Mauricio Colli 71f1bbdcc1
Use new Localization and Downloader implementations from extractor 2019-11-17 23:58:52 -03:00
Robin bf2a3ca043 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Christian Schabesberger 52bf5690c0 add support for content language and content country 2018-10-05 16:20:27 +02:00