Initial commit: SimVision tvOS streaming app

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>
This commit is contained in:
2026-01-21 22:12:08 -06:00
commit 872354b834
283 changed files with 338296 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
@testable import KSPlayer
import XCTest
class M3UParseTest: XCTestCase {
func testParsePlaylist() {
let data = """
#EXTM3U url-tvg="http://epg.tvfor.pro/epgtv.xml"
#EXTINF:-1 tvg-id="2365" tvg-name="Первый канал" tvg-logo="http://tvfor.pro/img/images/Chanels/perviy_k.png" group-title="Базовые" catchup="default" catchup-source="http://vandijk.tvfor.pro/ORT/TOKEN?utc=${start}" catchup-days="5" timeshift="5",Первый канал
#EXTGRP:Базовые
http://vandijk.tvfor.pro/Perviykanal/TOKEN
#EXTINF:-1 tvg-id="2379" tvg-name="Первый канал HD" tvg-logo="http://tvfor.pro/img/images/Chanels/1tv_hd.png" group-title="Базовые" catchup="default" catchup-source="http://vandijk.tvfor.pro/CupLeTaWkn/TOKEN?utc=${start}" catchup-days="3" timeshift="3",Первый канал HD
#EXTGRP:Базовые
http://vandijk.tvfor.pro/CupLeTaWkn/TOKEN
""".data(using: .utf8)
if let data {
let result = data.parsePlaylist()
XCTAssertEqual(result.count == 2, true)
}
}
func testURLParse() async {
// let url = Bundle(for: M3UParseTest.self).url(forResource: "test.m3u", withExtension: nil)!
// if let result = try? await url.parsePlaylist() {
// XCTAssertEqual(result.count > 0, true)
// }
}
}