File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
composeApp/src/commonMain/kotlin/com/jankinwu/fntv/client Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -28,4 +28,5 @@ data class PlayingInfoCache(
2828 var currentSubtitleStreamList : List <SubtitleStream >? = null ,
2929 var isUseDirectLink : Boolean = false ,
3030 var isEpisode : Boolean = false ,
31+ var previousSubtitle : SubtitleStream ? = null ,
3132)
Original file line number Diff line number Diff line change @@ -496,7 +496,9 @@ fun PlayerOverlay(
496496 // Reload HLS subtitle repository to fetch new segments
497497 hlsSubtitleUtil?.reload()
498498 // Don't restart playback for internal subtitles
499- shouldStartPlayback = false
499+ if (cache.previousSubtitle?.isExternal == 0 ) {
500+ shouldStartPlayback = false
501+ }
500502 }
501503 } catch (e: Exception ) {
502504 logger.w(" ResetSubtitle: Failed to parse m3u8: ${e.message} " )
@@ -1050,6 +1052,7 @@ fun PlayerOverlay(
10501052 if (cache != null ) {
10511053 playerViewModel.updatePlayingInfo(
10521054 cache.copy(
1055+ previousSubtitle = cache.currentSubtitleStream,
10531056 currentSubtitleStream = subtitle
10541057 )
10551058 )
Original file line number Diff line number Diff line change @@ -60,10 +60,10 @@ class HlsSubtitleUtil(
6060 }
6161
6262 return client.get(fullUrl) {
63- if (AccountDataCache .cookieState.isNotBlank()) {
64- header(" cookie" , AccountDataCache .cookieState)
65- header(" Authorization" , AccountDataCache .authorization)
66- }
63+ // if (AccountDataCache.cookieState.isNotBlank()) {
64+ // header("cookie", AccountDataCache.cookieState)
65+ // header("Authorization", AccountDataCache.authorization)
66+ // }
6767 }.bodyAsText()
6868 }
6969
You can’t perform that action at this time.
0 commit comments