CyferShepard / Jellystat

Jellystat is a free and open source Statistics App for Jellyfin
MIT License
1.09k stars 32 forks source link

Import playback plugin data doesn't do anything #236

Open nathangur opened 3 months ago

nathangur commented 3 months ago

I had my Jellystat container down for a while and brought it back up. But after trying to import the jellyfin playback reporting plugin data, it says it completed it but nothing gets populated.

The container logs don't say anything about updating and don't have entries after starting the container.

image

CyferShepard commented 3 months ago

Hey @nathangur , this is done by design, the function is meant to run once as a sort of migration. Once its run, it will not pull any new information past a certain date based on the last activity in jellystat and the previously migrated data.

This is to prevent duplicate entries for the same watch, 1 from Jellystat and 1 from the plugin. Its almost impossible to exclude the duplicates as the plugins time stamp varies by a few milliseconds and it also does not give enough info to use besides the recorded time to try and identify duplicates.

Its not impossible and Il try to see if there is some other solution but this will be a low priority task for now due to the restrictions

nathangur commented 3 months ago

So even though jellystat has zero records in it (I recreated it and the database it had) it can't pull past items from the plugin?

CyferShepard commented 3 months ago

no in that scenario it should pull info. I was under the assumption this was an existing install with already migrated data

CyferShepard commented 3 months ago

Was the library sync completed before the migration?

nathangur commented 3 months ago

Was the library sync completed before the migration?

Yes

CyferShepard commented 3 months ago

If there are any errors in the docker logs, please send those aswell as it will help

nathangur commented 3 months ago

Unfortunately no, the only ones are that Jellystat was querying the database while it was starting up

nathangur commented 3 months ago

The only thing I could think of that might be a factor (maybe?) is that I have around 150 malformed entries in the playback database due to a device having the media playing, the device goes offline, comes back online and it assumes that it was playing the whole time which it then reports 40 hours for a 3 minute song.

Some of these malformed entries have incorrect itemId's for some reason (could be file change, directory change, etc), meaning I can't edit these with a automated script as I can't get the original runtime length of the file to patch the database with.

tobiasdosdal commented 2 months ago

i have the same problem jellystat 1.1.1 and emby image

image

CyferShepard commented 2 months ago

Hi @tobiasdosdal , emby is still WIP, importer is not actually functional yet

tobiasdosdal commented 2 months ago

Hi @tobiasdosdal , emby is still WIP, importer is not actually functional yet

Ah my bad, did not know.

narucx commented 2 months ago

Yea same for me with Jellyfin
image

I also can't find any relating errors to it

jozlod commented 2 months ago

Did a fresh install, ran full sync, and data import, seems to have worked fine for me. 9536 Rows. I'm on the release 1.1.0 Compiled and running native in windows, not using docker. So could be something different if you're on unstable. I wasn't sure which is best to use.

image

karserasl commented 2 months ago

In unstable import: image

Yet, in Statistics, in Activity etc, its empty image

It imported 9500+ rows, but shows nothing

EDIT: I found the why.. I change abit my directories, and the ids in playback reporting dont match to anything, since they are all changed.