Features: - VOD library with movie grouping and version detection - TV show library with season/episode organization - TMDB integration for trending shows and recently aired episodes - Recent releases section with TMDB release date sorting - Watch history tracking with continue watching - Playlist caching (12-hour TTL) for offline support - M3U playlist parsing with XStream API support - Authentication with credential storage Technical: - SwiftUI for tvOS - Actor-based services for thread safety - Persistent caching for playlists, TMDB data, and watch history - KSPlayer integration for video playback Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
30 lines
672 B
Swift
30 lines
672 B
Swift
//
|
|
// EmbedDataSouce.swift
|
|
// KSPlayer-7de52535
|
|
//
|
|
// Created by kintan on 2018/8/7.
|
|
//
|
|
import Foundation
|
|
import Libavcodec
|
|
import Libavutil
|
|
|
|
extension FFmpegAssetTrack: SubtitleInfo {
|
|
public var subtitleID: String {
|
|
String(trackID)
|
|
}
|
|
}
|
|
|
|
extension FFmpegAssetTrack: KSSubtitleProtocol {
|
|
public func search(for time: TimeInterval) -> [SubtitlePart] {
|
|
subtitle?.outputRenderQueue.search { item -> Bool in
|
|
item.part == time
|
|
}.map(\.part) ?? []
|
|
}
|
|
}
|
|
|
|
extension KSMEPlayer: SubtitleDataSouce {
|
|
public var infos: [any SubtitleInfo] {
|
|
tracks(mediaType: .subtitle).compactMap { $0 as? (any SubtitleInfo) }
|
|
}
|
|
}
|