Skip to content

Commit

Permalink
Set listened_at to start of playback
Browse files Browse the repository at this point in the history
This is more consistent with most other integrations and the prefered
way of setting this timestamp.
  • Loading branch information
phw committed Oct 26, 2023
1 parent cb0bcf6 commit 087b120
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ namespace lbz
else if (type == listen_type::single)
{
j["listen_type"] = "single";
j["payload"][0]["listened_at"] = pfc::fileTimeWtoU(pfc::fileTimeNow());
// Set listening time to start of playback
j["payload"][0]["listened_at"] = pfc::fileTimeWtoU(pfc::fileTimeNow()) - m_counter;
}

const char* album = info.meta_get("album", 0);
Expand Down

0 comments on commit 087b120

Please sign in to comment.