Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[WIP] [iOS & tvOS] Internal Text Subtitle Offset #1462

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hide unusable external subtitles.
  • Loading branch information
JPKribs committed Mar 25, 2025
commit dbdfc6540459e0e985882d7fc95eec4b21d06e7d
10 changes: 7 additions & 3 deletions Shared/Extensions/JellyfinAPI/MediaStream.swift
Original file line number Diff line number Diff line change
@@ -247,8 +247,12 @@ extension [MediaStream] {
let externalSubtitles = externalTracks.filter { $0.type == .subtitle }

/// Transcodes with only internal text-subtitles the first and last track switch places???
if subtitleInternal.count > 1 && externalSubtitles.isEmpty && subtitleInternal == subtitleInternal.filter({ $0.isTextSubtitleStream == true }) {
var reorderedSubtitleInternal = subtitleInternal
if subtitleInternal.count > 1 &&
externalSubtitles.isEmpty &&
subtitleInternal == subtitleInternal.filter({ $0.isTextSubtitleStream == true })
{
/// Remove invalid subtitles for transcodes
var reorderedSubtitleInternal = subtitleInternal.filter { $0.isSupportsExternalStream == true }

let firstDeliveryURL = subtitleInternal.first?.deliveryURL
let lastDeliveryURL = subtitleInternal.last?.deliveryURL
@@ -263,7 +267,7 @@ extension [MediaStream] {

orderedInternal += reorderedSubtitleInternal
} else {
orderedInternal += subtitleInternal
orderedInternal += subtitleInternal.filter { $0.isSupportsExternalStream == true }
}

orderedInternal += otherInternal