mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-13 01:10:22 +01:00
small cleanup
This commit is contained in:
@@ -255,7 +255,7 @@ export default function page() {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const reportPlaybackProgress = useCallback(async () => {
|
const reportPlaybackProgress = useCallback(async () => {
|
||||||
if (!api || offline || !stream) return;
|
if (!api || offline || !stream || !hasReportedRef.current) return;
|
||||||
await getPlaystateApi(api).reportPlaybackProgress({
|
await getPlaystateApi(api).reportPlaybackProgress({
|
||||||
playbackProgressInfo: currentPlayStateInfo() as PlaybackProgressInfo,
|
playbackProgressInfo: currentPlayStateInfo() as PlaybackProgressInfo,
|
||||||
});
|
});
|
||||||
@@ -276,7 +276,6 @@ export default function page() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (stream && !hasReportedRef.current) {
|
if (stream && !hasReportedRef.current) {
|
||||||
reportPlaybackStart();
|
reportPlaybackStart();
|
||||||
hasReportedRef.current = true; // Mark as reported
|
|
||||||
}
|
}
|
||||||
}, [stream]);
|
}, [stream]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user