Address review: rename to trackName, use isBlank, point at merged extractor

- serviceName -> trackName, since 'service' means YouTube/SoundCloud
  elsewhere in this codebase.
- isEmpty() -> isBlank(), per review suggestion.
- Extractor dependency now points at TeamNewPipe/NewPipeExtractor at
  the commit that merged (#1551), instead of my fork.
This commit is contained in:
ibrahim-iqbal
2026-10-06 11:42:07 +02:00
committed by Tobi
parent cd68d95ad5
commit cc79c90bc7
2 changed files with 5 additions and 5 deletions
@@ -116,9 +116,9 @@ public final class PlayerHelper {
@NonNull
public static String captionLanguageOf(@NonNull final Context context,
@NonNull final SubtitlesStream subtitles) {
final String serviceName = subtitles.getName();
final String displayName = serviceName != null && !serviceName.isEmpty()
? serviceName
final String trackName = subtitles.getName();
final String displayName = trackName != null && !trackName.isBlank()
? trackName
: subtitles.getDisplayLanguageName();
return displayName + (subtitles.isAutoGenerated()
? " (" + context.getString(R.string.caption_auto_generated) + ")" : "");
+2 -2
View File
@@ -73,7 +73,7 @@ teamnewpipe-nanojson = "e9d656ddb49a412a5a0a5d5ef20ca7ef09549996"
# the corresponding commit hash, since JitPack sometimes deletes artifacts.
# If there’s already a git hash, just add more of it to the end (or remove a letter)
# to cause jitpack to regenerate the artifact.
teamnewpipe-newpipe-extractor = "d66acff2536c68db2abbfa308399337e8dd686e2"
teamnewpipe-newpipe-extractor = "65cabc2ba5216ee871ace4a9963c08bdbf5d5dc0"
viewpager2 = "1.1.0"
webkit = "1.15.0" # New versions require minSdk 24
work = "2.11.2"
@@ -152,7 +152,7 @@ lisawray-groupie-core = { module = "com.github.lisawray.groupie:groupie", versio
lisawray-groupie-viewbinding = { module = "com.github.lisawray.groupie:groupie-viewbinding", version.ref = "groupie" }
livefront-bridge = { module = "com.github.livefront:bridge", version.ref = "bridge" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockitoCore" }
newpipe-extractor = { module = "com.github.ibrahim-iqbal:NewPipeExtractor", version.ref = "teamnewpipe-newpipe-extractor" }
newpipe-extractor = { module = "com.github.TeamNewPipe:NewPipeExtractor", version.ref = "teamnewpipe-newpipe-extractor" }
newpipe-filepicker = { module = "com.github.TeamNewPipe:NoNonsense-FilePicker", version.ref = "teamnewpipe-filepicker" }
newpipe-nanojson = { module = "com.github.TeamNewPipe:nanojson", version.ref = "teamnewpipe-nanojson" }
noties-markwon-core = { module = "io.noties.markwon:core", version.ref = "markwon" }