bigretromike / nakamori

Nakamori is Kodi addon that use Shoko (known as Japanese Media Manager (JMM)) Server as back-end for metadata information.
https://shokunin.monogatari.pl/nakamori/
49 stars 5 forks source link

Watched states seem to break again #213

Closed da3dsoul closed 7 years ago

da3dsoul commented 7 years ago

I'm not sure what causes it. I think Kodi is now automatically uses 'ToggleWatched' on everything, which caches the value and makes it annoying.

bigretromike commented 7 years ago

I notice few mistakes also but not that much. If I recall it should Toggle as fallback (that you made), right ?

da3dsoul commented 7 years ago

Yeah, but I tested, and that doesn't get called. It's something else.

bigretromike commented 7 years ago

but kodi send mark api call to shoko and get 200 code right ?

da3dsoul commented 7 years ago

Yes, it actually does get marked in Shoko. It just desyncs the state in Kodi

bigretromike commented 7 years ago

maybe its something with daily ? on stable version I have minimal problem with that issue - which was know before

bigretromike commented 7 years ago

Also Kodi version and Platform ?

da3dsoul commented 7 years ago

17.3 Windows

bigretromike commented 7 years ago

Is this related to https://github.com/bigretromike/nakamori/issues/178 or is this bigger problem ?

da3dsoul commented 7 years ago

Nope

da3dsoul commented 7 years ago

This one https://github.com/bigretromike/nakamori/issues/71

bigretromike commented 7 years ago

So the solution was took from https://forum.kodi.tv/showthread.php?tid=140906&page=2 as #71 point out. I will try to look it and see whats going on 👍

da3dsoul commented 7 years ago

Okay, just remember that "Letting Kodi handle it all" is not an option. Thanks

bigretromike commented 7 years ago

'All' is out of question because it would be impossible

On June 30, 2017 7:11:57 PM GMT+02:00, da3dsoul notifications@github.com wrote:

Okay, just remember that "Letting Kodi handle it all" is not an option. Thanks

-- You are receiving this because you were assigned. Reply to this email directly or view it on GitHub: https://github.com/bigretromike/nakamori/issues/213#issuecomment-312323193

bigretromike commented 7 years ago

most thing happens when video end by itself, so need to handle those:

da3dsoul commented 7 years ago

It's just cosmetic, as in it doesn't show in the menu properly. It's actually marked in Shoko and returned properly

bigretromike commented 7 years ago

cosmetic for sure! but it annoying me more and more ;-)

da3dsoul commented 7 years ago

Oh it's pissed me off every step of the way

bigretromike commented 7 years ago

that cache thing is hell broken. with playcount >0 and forced overlay = 5 (watched) its still drop sync its best to see it via menu when nakamori say "mark episode as watched" and kodi "mark as unwatched"

bigretromike commented 7 years ago

if we would be able to access itemList that we want to change, and check it overlay icon then we would use toggleWatch which is favored by kodi;

da3dsoul commented 7 years ago

Toggle watched doesn't work. If you watch an episode elsewhere, and then use Nakamori, then it'll be desynced, and there would be no clean way to fix it automatically

bigretromike commented 7 years ago

I wouldnt call it clean right now as it get desync as easly as now, in theory it should work flawless right now because we dont use toggle and we hand pick what icon should be to every item on list. But it not flawless. Maybe switching from video to file would help maybe then it wouldnt mark it by itself I dont know. I just know that more i test current code the more broken it look like that the kodi is broken.

On August 6, 2017 1:08:56 AM GMT+02:00, da3dsoul notifications@github.com wrote:

Toggle watched doesn't work. If you watch an episode elsewhere, and then user Nakamori, then it'll be desynced, and there would be no clean way to fix it automatically

-- You are receiving this because you were assigned. Reply to this email directly or view it on GitHub: https://github.com/bigretromike/nakamori/issues/213#issuecomment-320475436

da3dsoul commented 7 years ago

It worked before 17.3....

bigretromike commented 7 years ago

It never work flawlessly. It was always 'not perfect' The close to perfect was when you started to refresh list - but then kodi pushed 2 versions more (17.2 and 3). Dunno when it stoped working. If you sure it was flawless then point me to commit I made (because probably I did it) and we will go back to that solution.

da3dsoul commented 7 years ago

The refresh was it working. No it wasn't perfect, but it was way better. 3.8 improves load times even more as well, so refreshing is even less painful

bigretromike commented 7 years ago

yes, but now we are using refresh which tend to desync watch mark;

da3dsoul commented 7 years ago

Only because Kodi devs broke it even more... I'm waiting for them to say no more plugins, we don't feel like supporting them any more

bigretromike commented 7 years ago

hahaha. I will experiment with that 'files' thing then.

bigretromike commented 7 years ago

as files episodes dont get marked -_- but context menu work great. also the index/position have different order by so its not working as intended;

bigretromike commented 7 years ago

Currently when ever video stops at 100% it get 'toggle' which break our marker (but we dont see it because we finished video at 100%); This is most problematic when you test this, you get 'toggle' and you are out of luck now. it looks like kodi save his own "watched' db and anything that is there is force to use same status - this would be easy fixable if we could somehow read this information ahead of drawing.

I posted question at kodi forum but probably end up with not related answer or 'its that way'

bigretromike commented 7 years ago

This is also the case for v18. Also you may notice sometimes (I'm noticing this right now) that Nakamori set Video Info for videos but they arent full one because if the 'watch mark' is saved the mediaInfo is also saved and for me when I focus selection on those episodes I got wrong duration (398h) and extra 720HD ICON on right bottom corner, while those not broken episodes have proper duration (23min) and are missing 720HD ICON.

bigretromike commented 7 years ago

%appdata%/kodi/Databases/MyVideo{number}.db table: files, streamdetails @da3dsoul just need to prevent player from saving it...


<advancedsettings>
    <video>
        <playcountminimumpercent>101</playcountminimumpercent>
        <ignorepercentatend>101</ignorepercentatend>
    </video>
</advancedsettings>

This won't prevent it from being saved but prevent playcount to not be saved (streamdetails/file/path) will be saved... no we need proper json-rpc (can't find it dunno if there is any for deleting files entry) to clean this up so it wont break with toggle

edit: we could clear out our data from database using something like this: https://github.com/the-black-eagle/script.database.cleaner/blob/master/default.py