mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
remove stale start event on song change for jellyfin scrobble (#1332)
This commit is contained in:
@@ -86,31 +86,6 @@ export const useScrobble = () => {
|
|||||||
currentTime < 5 && // Reset to near 0
|
currentTime < 5 && // Reset to near 0
|
||||||
previousTime >= 10 // Was playing for at least 10 seconds
|
previousTime >= 10 // Was playing for at least 10 seconds
|
||||||
) {
|
) {
|
||||||
// Send start event for Jellyfin on restart
|
|
||||||
if (currentSong._serverType === ServerType.JELLYFIN) {
|
|
||||||
sendScrobble.mutate(
|
|
||||||
{
|
|
||||||
apiClientProps: { serverId: currentSong._serverId || '' },
|
|
||||||
query: {
|
|
||||||
event: 'start',
|
|
||||||
id: currentSong.id,
|
|
||||||
position: 0,
|
|
||||||
submission: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
onSuccess: () => {
|
|
||||||
logFn.debug(logMsg[LogCategory.SCROBBLE].scrobbledStart, {
|
|
||||||
category: LogCategory.SCROBBLE,
|
|
||||||
meta: {
|
|
||||||
id: currentSong.id,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
setIsCurrentSongScrobbled(false);
|
setIsCurrentSongScrobbled(false);
|
||||||
lastProgressEventRef.current = 0;
|
lastProgressEventRef.current = 0;
|
||||||
previousTimestampRef.current = 0;
|
previousTimestampRef.current = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user