Split software arch desc for easier manintenance. Many fixes related to next video playing and remote playback
This commit is contained in:
@@ -14,7 +14,8 @@ import { player, playbackPosition } from "$lib/stores/player";
|
||||
import { queue, currentQueueItem } from "$lib/stores/queue";
|
||||
import { playbackMode } from "$lib/stores/playbackMode";
|
||||
import { sleepTimer } from "$lib/stores/sleepTimer";
|
||||
import { nextEpisode } from "$lib/stores/nextEpisode";
|
||||
import { nextEpisode, nextEpisodeItem as nextEpisodeItemStore } from "$lib/stores/nextEpisode";
|
||||
import { autoPlayNext } from "$lib/services/nextEpisodeService";
|
||||
import { preloadUpcomingTracks } from "$lib/services/preload";
|
||||
import type { MediaItem } from "$lib/api/types";
|
||||
import { get } from "svelte/store";
|
||||
@@ -320,8 +321,17 @@ function handleShowNextEpisodePopup(
|
||||
|
||||
/**
|
||||
* Handle countdown tick event.
|
||||
* When countdown reaches 0, automatically trigger playback of the next episode.
|
||||
*/
|
||||
function handleCountdownTick(remainingSeconds: number): void {
|
||||
// Update next episode store with new countdown value
|
||||
nextEpisode.updateCountdown(remainingSeconds);
|
||||
|
||||
// Auto-play when countdown reaches 0
|
||||
if (remainingSeconds === 0) {
|
||||
const episode = get(nextEpisodeItemStore);
|
||||
if (episode) {
|
||||
autoPlayNext(episode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user