mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-22 18:36:34 +02:00
fix: exclude Jellyfin stop event on song change (#2243)
This commit is contained in:
@@ -67,9 +67,9 @@ Jellyfin progress APIs still use playback position (ticks), not listen time:
|
|||||||
- pause / unpause
|
- pause / unpause
|
||||||
|
|
||||||
Other events:
|
Other events:
|
||||||
- When the song changes: sends 'stop' for the previous track; sends 'start'
|
- When the song changes: sends 'stop' for the previous non-Jellyfin track;
|
||||||
when the new track is playing; clears submission flag and listen accumulator
|
sends 'start' when the new track is playing; clears submission flag and
|
||||||
for the new track.
|
listen accumulator for the new track.
|
||||||
|
|
||||||
- When the song is restarted (near 0 after 10s+): clears submission flag
|
- When the song is restarted (near 0 after 10s+): clears submission flag
|
||||||
and listen accumulator.
|
and listen accumulator.
|
||||||
@@ -403,8 +403,10 @@ export const useScrobble = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send stop scrobble for the track that was playing before the change
|
// Jellyfin does not need a stop event when advancing to another song.
|
||||||
if (previousSong?.id) {
|
const skipStopScrobble = previousSong?._serverType === ServerType.JELLYFIN;
|
||||||
|
|
||||||
|
if (previousSong?.id && !skipStopScrobble) {
|
||||||
sendScrobble.mutate(
|
sendScrobble.mutate(
|
||||||
{
|
{
|
||||||
apiClientProps: { serverId: previousSong._serverId || '' },
|
apiClientProps: { serverId: previousSong._serverId || '' },
|
||||||
|
|||||||
Reference in New Issue
Block a user