Use ITEM_COUNT_UNKNOWN

This commit is contained in:
Stypox 2020-03-20 22:01:56 +01:00 committed by wb9688
parent 914d3c4a66
commit 63e489f134
2 changed files with 9 additions and 5 deletions

View File

@ -136,7 +136,7 @@ dependencies {
exclude module: 'support-annotations'
})
implementation 'com.github.XiangRongLin:NewPipeExtractor:f9a084f8f9611a87d0f8d6f309a40429304b2ac9'
implementation 'com.github.XiangRongLin:NewPipeExtractor:34073527498a22e1f7c1feb18132bf62fb544825'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.23.0'

View File

@ -155,10 +155,12 @@ public final class Localization {
public static String localizeStreamCount(final Context context, final long streamCount) {
switch ((int) streamCount) {
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
return context.getResources().getString(R.string.more_than_100_videos);
case (int) ListExtractor.ITEM_COUNT_UNKNOWN:
return "";
case (int) ListExtractor.ITEM_COUNT_INFINITE:
return context.getResources().getString(R.string.infinite_videos);
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
return context.getResources().getString(R.string.more_than_100_videos);
default:
return getQuantity(context, R.plurals.videos, R.string.no_videos, streamCount,
localizeNumber(context, streamCount));
@ -167,10 +169,12 @@ public final class Localization {
public static String localizeStreamCountMini(final Context context, final long streamCount) {
switch ((int) streamCount) {
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
return context.getResources().getString(R.string.more_than_100_videos_mini);
case (int) ListExtractor.ITEM_COUNT_UNKNOWN:
return "";
case (int) ListExtractor.ITEM_COUNT_INFINITE:
return context.getResources().getString(R.string.infinite_videos_mini);
case (int) ListExtractor.ITEM_COUNT_MORE_THAN_100:
return context.getResources().getString(R.string.more_than_100_videos_mini);
default:
return String.valueOf(streamCount);
}