Skip to content

Commit

Permalink
Send track duration with scrobble and updateNowPlaying requests
Browse files Browse the repository at this point in the history
  • Loading branch information
napieralla committed Aug 4, 2020
1 parent c8a8f9d commit c969e84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/components/Providers/LastfmProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ const LastfmProvider: React.FC<LastfmProviderProps> = ({ children, mk }: LastfmP
'timestamp[0]': Math.floor(Date.now() / 1000),
'album[0]': item.albumName,
'trackNumber[0]': item.trackNumber,
'duration[0]': Math.round(item.playbackDuration / 1000),
}
: {
artist: item.artistName,
track: item.title,
album: item.albumName,
trackNumber: item.trackNumber,
duration: Math.round(item.playbackDuration / 1000),
};

try {
Expand Down

0 comments on commit c969e84

Please sign in to comment.