Posts: 1,152
Joined: Mar 2018
Reputation:
25
Hi,
while working on the PVR control of the Kodi Remote for iOS I was recognizing that I always receive a "playcount" of "0" via the Kodi API, even when the recording was just played via Kodi. Is this a known issue or a limitation of the PVR add-on?
Kodi: Kodi 19.1 on Linux
Add-on: Enigma2 Client 7.411
PVR: Vu+ Solo2
Thanks,
Buschel
Posts: 2,517
Joined: May 2007
Reputation:
118
Do you also have a playcount of zero in Kodi? Or just via the API?
Once you have Enigma2 running it should work. What image are you using?
Posts: 1,152
Joined: Mar 2018
Reputation:
25
I just retested again, and I get the same result in Kodi UI and via API. But: If I trigger playback of a recording from the Kodi UI, the playcount increases. If I trigger the playback via the API, the playcount does not increase. You still need the VTi image version I am running?
Posts: 2,517
Joined: May 2007
Reputation:
118
2021-10-17, 00:05
(This post was last modified: 2021-10-17, 00:08 by phunkyfish.)
The version of OpenWebIf should be enough. Once it’s at least 1.3.0 it should be ok.
Posts: 2,517
Joined: May 2007
Reputation:
118
Yes, it makes it clear thanks. Let me see if I can find a reason why it does doesn’t work from JSON.
Question: if you play from the kodi UI twice does the playcount report as 2?
Posts: 1,152
Joined: Mar 2018
Reputation:
25
2021-10-17, 15:34
(This post was last modified: 2021-10-17, 15:56 by Buschel.)
It is even more interesting. If I am playing back a recording via "file": "path-to-recording" Kodi internally increases the playcount, but does not report this to the outside via the JSON API (I cannot see the playcount directly in Kodi UI, I just see the recording marked as "watched"). After I then play the file via "recordingid": id the reported playcount is including the playbacks which were triggered via "file": as well.
Example:
1. play-via-file -> playcount=0
2. play-via-file -> playcount=0
3. play-via-id -> playcount=3
4. play-via-file -> playcount=3
5. play-via-id -> playcount=5
A positive side effect of using play-via-id is that I get more details like plot or description via Player.GetItem. Sadly it is not an option for the Remote App to call play-via-id as it violates the concept of adding all items to a playlist and play from there. Overall it would be good the add support for recordingid to Playlist.Add and Playlist.Insert. How would I raise such a feature request?
Posts: 2,517
Joined: May 2007
Reputation:
118
Ah, sorry. I thought maybe you were using http URL to play the recording hence the first statement.
I think I know what is happening. Under the hood recordings are just video items. It appears the count is correct using either method but the PVR backend only gets informed when using the recording ID. As the pvr:// url is being used it really should work for both. I’ll see if I can figure why it’s not working.