Skip to content

Add preferred subtitle language#46

Merged
ModerRAS merged 1 commit into
masterfrom
feature/preferred-subtitle-language
Jul 14, 2026
Merged

Add preferred subtitle language#46
ModerRAS merged 1 commit into
masterfrom
feature/preferred-subtitle-language

Conversation

@ModerRAS

@ModerRAS ModerRAS commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • add shared automatic subtitle-language preference and alias recognition across Android TV, WebUI, and desktop
  • apply preferred tracks in Exo, embedded mpv, external sidecars, and next-episode playback while preserving manual selections
  • persist settings through Android, desktop JSON, and WebAPI with legacy-safe AUTO defaults
  • decode remote subtitle filenames for language and format detection without changing playable URLs

Validation

  • npm run build in web-control/frontend
  • ./gradlew :core:model:test :repository-api:test :repository-desktop:test :data:testDebugUnitTest :player-core:testDebugUnitTest :ui-tv:testDebugUnitTest :web-control-core:test :web-control:testDebugUnitTest :desktop-app:test :app:assembleDebug
  • HK1 adb install -r and startup health check
  • HK1 Exo and embedded mpv: automatic Simplified Chinese selection for embedded Chinese and external zh-CN.srt tracks

Version

  • keep baseAppVersionName at 1.1.0; this completes the subtitle feature line already released as v1.1.x

Summary by CodeRabbit

  • New Features

    • Added a preferred subtitle language setting with options for automatic selection, Chinese variants, English, and Japanese.
    • Subtitle tracks are now prioritized based on the selected language, including language information detected from filenames, titles, and remote URLs.
    • Added subtitle language controls to TV, desktop, and web playback settings.
    • The preference is saved and restored across sessions and can be updated through web controls.
  • Bug Fixes

    • Improved subtitle filename decoding and language recognition for URL-based and percent-encoded paths.
    • Manual subtitle selections are preserved instead of being automatically replaced.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a preferred subtitle language model with detection and prioritization, persists it across repositories, exposes it through web and TV/desktop settings, and applies it automatically in Exo and embedded mpv playback unless the user manually selects a subtitle.

Changes

Preferred subtitle language

Layer / File(s) Summary
Language model and subtitle detection
core/model/src/main/kotlin/com/miruplay/tv/model/*, core/model/src/test/kotlin/com/miruplay/tv/model/*
Defines language preferences, localized labels, URL-aware subtitle parsing, language detection, scoring, prioritization, and tests.
Preference repository and persistence
repository-api/src/main/kotlin/com/miruplay/tv/repository/*, repository-desktop/src/main/kotlin/com/miruplay/tv/repository/desktop/*, data/src/main/kotlin/com/miruplay/tv/data/preferences/*, related tests
Adds repository APIs and persists the preference in shared preferences and desktop repository state, including legacy defaults.
Web playback settings flow
web-control-core/src/main/kotlin/com/miruplay/tv/webcontrol/*, web-control/src/main/kotlin/com/miruplay/tv/webcontrol/*, desktop-app/src/main/kotlin/com/miruplay/tv/desktop/DesktopWebControlService.kt, related tests
Adds the preference to playback settings requests and responses, saves it through web services, and verifies round-trip persistence.
Desktop settings and launch wiring
desktop-app/src/main/kotlin/com/miruplay/tv/desktop/*, desktop-app/src/test/kotlin/com/miruplay/tv/desktop/*
Adds desktop controls and keyboard navigation, loads and persists the setting, and prioritizes subtitle paths during launches.
TV settings surface
ui-tv/src/main/kotlin/com/miruplay/tv/ui/settings/*, ui-tv/src/test/kotlin/com/miruplay/tv/ui/settings/*
Adds TV settings state, language selection controls, display labels, and playback-setting summaries.
Playback subtitle auto-selection
player-core/src/main/kotlin/com/miruplay/tv/player/ExoPlaybackController.kt
Loads the preference for playback and applies matching subtitle tracks in Exo and embedded mpv while preserving manual selections.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SettingsUI
  participant WebControlService
  participant PlaybackPreferencesRepository
  participant ExoPlaybackController
  participant SubtitleLanguagePreference
  SettingsUI->>WebControlService: save preferred subtitle language
  WebControlService->>PlaybackPreferencesRepository: persist preference
  ExoPlaybackController->>PlaybackPreferencesRepository: load preference on play
  ExoPlaybackController->>SubtitleLanguagePreference: resolve preferred track
  SubtitleLanguagePreference-->>ExoPlaybackController: return matching track index
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a preferred subtitle language setting.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/preferred-subtitle-language

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
ui-tv/src/test/kotlin/com/miruplay/tv/ui/settings/SettingsViewModelTokenTest.kt (1)

91-93: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add test coverage for setPreferredSubtitleLanguage.

The mock stub is added, but no test exercises SettingsViewModel.setPreferredSubtitleLanguage(...). Consider mirroring the existing setCurrentAppMode persists next launch mode and updates state flow test.

✅ Suggested test
`@Test`
fun `setPreferredSubtitleLanguage persists preference and updates state flow`() = runTest {
    every { playbackPreferences.preferredSubtitleLanguage = any() } just Runs
    val viewModel = createViewModel()
    advanceUntilIdle()

    viewModel.setPreferredSubtitleLanguage(SubtitleLanguagePreference.CHINESE_SIMPLIFIED)

    verify(exactly = 1) {
        playbackPreferences.preferredSubtitleLanguage = SubtitleLanguagePreference.CHINESE_SIMPLIFIED
    }
    assertEquals(SubtitleLanguagePreference.CHINESE_SIMPLIFIED, viewModel.preferredSubtitleLanguage.value)
}

As per path instructions, **/src/test/**/*.kt should "Write test methods with backtick-quoted, descriptive names" and "use JUnit 4, MockK ... for Flow testing".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@ui-tv/src/test/kotlin/com/miruplay/tv/ui/settings/SettingsViewModelTokenTest.kt`
around lines 91 - 93, Add a JUnit 4 test in SettingsViewModelTokenTest for
SettingsViewModel.setPreferredSubtitleLanguage, using a backtick-quoted
descriptive name. Stub playbackPreferences.preferredSubtitleLanguage assignment,
create the view model, invoke the method with CHINESE_SIMPLIFIED, verify the
preference is persisted exactly once, and assert the preferredSubtitleLanguage
state flow updates accordingly using the existing MockK and runTest patterns.

Source: Path instructions

desktop-app/src/main/kotlin/com/miruplay/tv/desktop/MiruPlayDesktopComposeApp.kt (1)

1049-1084: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Prefer the local preferredSubtitleLanguage state over re-reading the repository on every launch.

launchSubtitlePreference is fetched via repositories.playbackPreferences.getPreferredSubtitleLanguage() on every playbackLaunchRequestFor call, even though the already-loaded Compose state preferredSubtitleLanguage holds the same value and is kept in sync at startup and on every change. This adds an unnecessary suspend/I-O read on the playback hot path (unused entirely when hasSubtitleOverride is true), and diverges from the sibling playbackEndAction, which is read directly from local state at its use site (line 1287) rather than re-fetched from the repository. Since onPreferredSubtitleLanguageChange persists asynchronously inside scope.launch before updating the local var, reading straight from the repository also opens a narrow staleness window between a just-changed setting and its persisted value.

♻️ Suggested fix
-        val launchSubtitlePreference = repositories.playbackPreferences.getPreferredSubtitleLanguage()
+        val launchSubtitlePreference = preferredSubtitleLanguage
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@desktop-app/src/main/kotlin/com/miruplay/tv/desktop/MiruPlayDesktopComposeApp.kt`
around lines 1049 - 1084, Update playbackLaunchRequestFor to use the existing
preferredSubtitleLanguage Compose state instead of calling
repositories.playbackPreferences.getPreferredSubtitleLanguage(). Keep the local
value in the existing subtitle prioritization flow, preserving manual override
behavior and avoiding the suspend/I/O repository read on each launch.
web-control-core/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlModels.kt (1)

337-342: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Hardcoded subtitle-language option list duplicates the SubtitleLanguagePreference enum in two places.

The allowed values (auto, zh_hans, zh_hant, zh, en, ja) already exist as SubtitleLanguagePreference.entries (with storageValue), but are re-declared as literal string lists here and on the frontend. Since no call site overrides the DTO default, this literal is what production responses actually return — a future enum addition (e.g. Korean) would silently be missing from the API/UI unless both copies are remembered and updated together.

  • web-control-core/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlModels.kt#L337-L342: derive the default from SubtitleLanguagePreference.entries.map { it.storageValue } instead of a hardcoded list.
  • web-control/frontend/src/App.vue#L1638-L1649: update the preferredSubtitleLanguageOptions fallback array (or drop it in favor of always trusting the server payload) to avoid a second copy of the same literal.
♻️ Proposed fix
+import com.miruplay.tv.model.SubtitleLanguagePreference
+
 `@Serializable`
 data class PlaybackSettingsDto(
     val endAction: String,
     val preferredSubtitleLanguage: String,
     val formatAwareToneMapping: FormatAwareToneMappingPreferences,
     val endActionOptions: List<String> = listOf("return_to_detail", "play_next_episode"),
     val preferredSubtitleLanguageOptions: List<String> =
-        listOf("auto", "zh_hans", "zh_hant", "zh", "en", "ja"),
+        SubtitleLanguagePreference.entries.map { it.storageValue },
 )

Note: this mirrors the existing endActionOptions hardcoding pattern already present in the codebase, so it's a pre-existing style choice rather than a new regression — flagging for awareness rather than as a blocker.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@web-control-core/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlModels.kt`
around lines 337 - 342, The subtitle-language options are duplicated as
hardcoded literals instead of deriving from SubtitleLanguagePreference. In
web-control-core/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlModels.kt
lines 337-342, derive preferredSubtitleLanguageOptions from
SubtitleLanguagePreference.entries using each entry’s storageValue; in
web-control/frontend/src/App.vue lines 1638-1649, update or remove the fallback
array so it does not maintain a second literal copy and continues relying on the
server-provided options.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt`:
- Around line 78-84: Update subtitleFileName() so URL decoding is performed only
for URL-like paths, preserving local filenames exactly; retain URL suffix
stripping for remote inputs. Tighten SUBTITLE_LANGUAGE_SUFFIX validation so
ordinary filename endings such as “Part One.srt” and “The End.srt” are rejected
and resolve to the existing und fallback.
- Around line 57-66: Update subtitleLanguageFromPath and
SUBTITLE_LANGUAGE_SUFFIX handling so trailing 2–3 character suffixes are
accepted only when they are recognized language tags. Preserve the existing
Chinese mappings and return "und" for unrecognized suffixes such as "one" or
"end", preventing them from being used as subtitle labels.

---

Nitpick comments:
In
`@desktop-app/src/main/kotlin/com/miruplay/tv/desktop/MiruPlayDesktopComposeApp.kt`:
- Around line 1049-1084: Update playbackLaunchRequestFor to use the existing
preferredSubtitleLanguage Compose state instead of calling
repositories.playbackPreferences.getPreferredSubtitleLanguage(). Keep the local
value in the existing subtitle prioritization flow, preserving manual override
behavior and avoiding the suspend/I/O repository read on each launch.

In
`@ui-tv/src/test/kotlin/com/miruplay/tv/ui/settings/SettingsViewModelTokenTest.kt`:
- Around line 91-93: Add a JUnit 4 test in SettingsViewModelTokenTest for
SettingsViewModel.setPreferredSubtitleLanguage, using a backtick-quoted
descriptive name. Stub playbackPreferences.preferredSubtitleLanguage assignment,
create the view model, invoke the method with CHINESE_SIMPLIFIED, verify the
preference is persisted exactly once, and assert the preferredSubtitleLanguage
state flow updates accordingly using the existing MockK and runTest patterns.

In
`@web-control-core/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlModels.kt`:
- Around line 337-342: The subtitle-language options are duplicated as hardcoded
literals instead of deriving from SubtitleLanguagePreference. In
web-control-core/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlModels.kt
lines 337-342, derive preferredSubtitleLanguageOptions from
SubtitleLanguagePreference.entries using each entry’s storageValue; in
web-control/frontend/src/App.vue lines 1638-1649, update or remove the fallback
array so it does not maintain a second literal copy and continues relying on the
server-provided options.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1147097f-12e8-4f3c-a784-921ea1014f2b

📥 Commits

Reviewing files that changed from the base of the PR and between 4a7f4d3 and 2eafaed.

📒 Files selected for processing (25)
  • core/model/src/main/kotlin/com/miruplay/tv/model/PlaybackUiConventions.kt
  • core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleLanguagePreference.kt
  • core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt
  • core/model/src/test/kotlin/com/miruplay/tv/model/SubtitleTracksTest.kt
  • data/src/main/kotlin/com/miruplay/tv/data/preferences/PlaybackPreferencesManager.kt
  • data/src/test/kotlin/com/miruplay/tv/data/preferences/PlaybackPreferencesManagerTest.kt
  • desktop-app/src/main/kotlin/com/miruplay/tv/desktop/DesktopPlaybackPanels.kt
  • desktop-app/src/main/kotlin/com/miruplay/tv/desktop/DesktopWebControlService.kt
  • desktop-app/src/main/kotlin/com/miruplay/tv/desktop/MiruPlayDesktopComposeApp.kt
  • desktop-app/src/test/kotlin/com/miruplay/tv/desktop/DesktopPlaybackPanelTest.kt
  • desktop-app/src/test/kotlin/com/miruplay/tv/desktop/DesktopWebControlServerTest.kt
  • player-core/src/main/kotlin/com/miruplay/tv/player/ExoPlaybackController.kt
  • repository-api/src/main/kotlin/com/miruplay/tv/repository/PlaybackPreferencesRepository.kt
  • repository-api/src/main/kotlin/com/miruplay/tv/repository/SettingsPreferenceActionCoordinator.kt
  • repository-api/src/test/kotlin/com/miruplay/tv/repository/SettingsPreferenceActionCoordinatorTest.kt
  • repository-desktop/src/main/kotlin/com/miruplay/tv/repository/desktop/DesktopRepositoryStore.kt
  • repository-desktop/src/main/kotlin/com/miruplay/tv/repository/desktop/FileBackedPlaybackPreferencesRepository.kt
  • repository-desktop/src/test/kotlin/com/miruplay/tv/repository/desktop/DesktopRepositoriesTest.kt
  • ui-tv/src/main/kotlin/com/miruplay/tv/ui/settings/AddSourceScreen.kt
  • ui-tv/src/main/kotlin/com/miruplay/tv/ui/settings/SettingsViewModel.kt
  • ui-tv/src/test/kotlin/com/miruplay/tv/ui/settings/SettingsViewModelTokenTest.kt
  • web-control-core/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlModels.kt
  • web-control-core/src/test/kotlin/com/miruplay/tv/webcontrol/WebControlSettingsRouteTest.kt
  • web-control/frontend/src/App.vue
  • web-control/src/main/kotlin/com/miruplay/tv/webcontrol/WebControlService.kt

Comment on lines 57 to +66
private fun subtitleLanguageFromPath(path: String): String {
val stem = MediaPathConventions.stem(MediaPathConventions.fileName(path))
val candidate = listOf('.', '_')
.map { separator -> stem.substringAfterLast(separator, "") }
.firstOrNull(::isSubtitleLanguageCode)
val stem = MediaPathConventions.stem(subtitleFileName(path)).replace('_', '-')
val candidate = SUBTITLE_LANGUAGE_SUFFIX.find(stem)
?.groupValues
?.get(1)
?.lowercase()
?: return "und"
return when (candidate) {
"chs" -> "zh-Hans"
"cht" -> "zh-Hant"
"chs", "sc" -> "zh-Hans"
"cht", "tc" -> "zh-Hant"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- SubtitleTracks.kt outline ---'
ast-grep outline core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt --view expanded || true

echo '--- Relevant file excerpt ---'
sed -n '1,220p' core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt

echo '--- Search usages of SubtitleTrack.language ---'
rg -n "SubtitleTrack\.language|language\s*[:=]" core -g '*.kt' || true

Repository: ModerRAS/MiruPlay

Length of output: 5969


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
p = Path('core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt')
print(p.exists(), p.stat().st_size)
print(p.read_text()[:5000])
PY

Repository: ModerRAS/MiruPlay

Length of output: 3659


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the exact function and related constants.
nl -ba core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt | sed -n '1,180p'

echo '--- occurrences of subtitleLanguageFromPath and SubtitleTrack.language ---'
rg -n "subtitleLanguageFromPath|SubtitleTrack\\(|language" core/model/src/main/kotlin/com/miruplay/tv/model -g '*.kt'

Repository: ModerRAS/MiruPlay

Length of output: 195


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '1,140p' core/model/src/main/kotlin/com/miruplay/tv/model/PlaybackUiConventions.kt
echo '---'
sed -n '1,220p' core/model/src/test/kotlin/com/miruplay/tv/model/PlaybackUiConventionsTest.kt

Repository: ModerRAS/MiruPlay

Length of output: 12698


Restrict trailing filename suffixes to real language tags
Trailing 2–3 letter suffixes are treated as language codes without validation, so Part One.srt / The End.srt can produce language = "one" / "end" and surface in subtitle picker labels when the track title is blank.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt` around
lines 57 - 66, Update subtitleLanguageFromPath and SUBTITLE_LANGUAGE_SUFFIX
handling so trailing 2–3 character suffixes are accepted only when they are
recognized language tags. Preserve the existing Chinese mappings and return
"und" for unrecognized suffixes such as "one" or "end", preventing them from
being used as subtitle labels.

Comment on lines +78 to 84
private fun subtitleFileName(path: String): String {
val pathWithoutUrlSuffix = if ("://" in path) path.substringBefore('?').substringBefore('#') else path
val encodedName = pathWithoutUrlSuffix.substringAfterLast('/').substringAfterLast('\\')
return runCatching {
URLDecoder.decode(encodedName.replace("+", "%2B"), StandardCharsets.UTF_8)
}.getOrDefault(encodedName)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the target file and nearby logic.
wc -l core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt
cat -n core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt | sed -n '1,220p'

# Find related subtitle language detection code and usages.
rg -n "subtitleLanguageFromPath|detectSubtitleLanguage|detectedSubtitleLanguage|SubtitleTrack.language|SUBTITLE_LANGUAGE_SUFFIX|subtitleFileName" core -S

Repository: ModerRAS/MiruPlay

Length of output: 6842


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the subtitle language preference logic.
cat -n core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleLanguagePreference.kt | sed -n '1,220p'

# Inspect any tests covering subtitle filename/language parsing.
rg -n "subtitleFileName|subtitleLanguageFromPath|SUBTITLE_LANGUAGE_SUFFIX|buildExternalSubtitleTracks|externalSubtitleTrackFromPath|SubtitleTrack\\(" core/model/src/test -S

Repository: ModerRAS/MiruPlay

Length of output: 8676


🏁 Script executed:

#!/bin/bash
set -euo pipefail

wc -l core/model/src/test/kotlin/com/miruplay/tv/model/SubtitleTracksTest.kt
cat -n core/model/src/test/kotlin/com/miruplay/tv/model/SubtitleTracksTest.kt | sed -n '1,240p'

Repository: ModerRAS/MiruPlay

Length of output: 7447


Scope remote decoding and tighten suffix parsing.

  • subtitleFileName() decodes local paths too, so valid %XX sequences in filenames can be rewritten unexpectedly. Gate decoding to URL-like inputs.
  • SUBTITLE_LANGUAGE_SUFFIX is too permissive; ordinary endings like Part One.srt or The End.srt can be treated as language codes instead of falling back to und.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@core/model/src/main/kotlin/com/miruplay/tv/model/SubtitleTracks.kt` around
lines 78 - 84, Update subtitleFileName() so URL decoding is performed only for
URL-like paths, preserving local filenames exactly; retain URL suffix stripping
for remote inputs. Tighten SUBTITLE_LANGUAGE_SUFFIX validation so ordinary
filename endings such as “Part One.srt” and “The End.srt” are rejected and
resolve to the existing und fallback.

@ModerRAS ModerRAS merged commit a217cfa into master Jul 14, 2026
11 checks passed
@ModerRAS ModerRAS deleted the feature/preferred-subtitle-language branch July 14, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant