Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

get_history api - started timestamp wrong when playing completed #112

Closed
tfonfara opened this issue Aug 16, 2018 · 9 comments
Closed

get_history api - started timestamp wrong when playing completed #112

tfonfara opened this issue Aug 16, 2018 · 9 comments

Comments

@tfonfara
Copy link

Version: v2.1.18-beta
Branch: beta
Commit hash: a8a676b79496b4dc3dea9596dfd09a4eeeae60e0
Operating system: Linux 4.15.0-24-generic
Python version: 2.7.14 (default, Dec 14 2017, 15:51:29) [GCC 6.4.0]
What you did? Called get_history api as shown in the api docs while item is playing, wait until playing completes (or next entry in list starts) and call api again
What happened? started timstamp is correct while playing, but jumps ~1 month into past after playing completed
What you expected? Started timestamp shouldn't change
How can we reproduce your issue? See above.

@samwiseg0
Copy link

samwiseg0 commented Aug 16, 2018

I am trying to replicate. Does it have to be a new item?

Edit: Meaning does it have to be media that has never been played in the past?

@tfonfara
Copy link
Author

I actually reproduced it with a non-new item, but seems that this happens randomly, for a lot of items I get correct timestamps (testing with tracks).

@samwiseg0
Copy link

samwiseg0 commented Aug 16, 2018

Interesting... that is why the few times I tried it seemed to work just fine.

@tfonfara
Copy link
Author

This is what I get for example:

started: 1527189393
paused_counter: 270
duration: 5031
date: 1534415262
percent_complete: 100
stopped: 1534418435

I'll have an eye on that to find out how to reproduce it.

@samwiseg0
Copy link

samwiseg0 commented Aug 16, 2018

I was able to reproduce. I think it maybe specific to Music.

{
"group_count": 2,
"started": 1533935756 (Fri Aug 10 2018 17:15:56 GMT-0400 (Eastern Daylight Time)),
"original_title": "",
"transcode_decision": "direct play",
"parent_rating_key": 131811,
"year": 2015,
"paused_counter": 0,
"duration": 143,
"full_title": "Heads Up - Jain",
"reference_id": 23691,
"parent_title": "Zanaka",
"stopped": 1534425309 (Thu Aug 16 2018 09:15:09 GMT-0400 (Eastern Daylight Time)),
}

@samwiseg0
Copy link

@tfonfara If you turn off "Group Play History" in Settings --> General. Do you still see the issue?

@tfonfara
Copy link
Author

@samwiseg00 nope, when turned off the timestamp is correct (even for previously wrong timestamps)

@samwiseg0
Copy link

After looking into it. It's not a bug but by design. What you are seeing is the start time of the first grouped item. With grouping enabled it will display the start item of the first history item. You can disable grouping by adding grouping=0 as referenced in the API docs below. You can also use grouping=0&reference_id=XYZ to get the sub table.

https://github.com/Tautulli/Tautulli/blob/master/API.md#get_history

@tfonfara
Copy link
Author

Got it, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants