···11+import { GenericPlayerState } from "./GenericPlayerState.js";
22+33+/**
44+ * This Player is only used for displaying data reported to EndpointListenbrainzSource, and parsed from ListenbrainzSource, as playing_now
55+ * and the behvior for Listenbrainz server is to display playing now info with a timeout equal to duraion of the submitted track
66+ * https://github.com/FoxxMD/multi-scrobbler/discussions/338
77+ *
88+ * We'll use duration as a generic timeout for any Source that *only* parses Now Playing data for Player
99+ */
1010+export class NowPlayingPlayerState extends GenericPlayerState {
1111+1212+ protected getStaleInterval() {
1313+ if(this.currentPlay !== undefined && this.currentPlay.data.duration !== undefined) {
1414+ return this.currentPlay.data.duration;
1515+ }
1616+ return super.getStaleInterval();
1717+ }
1818+1919+ protected getOrphanedInterval() {
2020+ if(this.currentPlay !== undefined && this.currentPlay.data.duration !== undefined) {
2121+ return this.currentPlay.data.duration;
2222+ }
2323+ return super.getOrphanedInterval();
2424+ }
2525+2626+}