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

tool for fixing mark watched episode #288

Closed bigretromike closed 6 years ago

bigretromike commented 6 years ago

when you mark them with kodi, the fix part is a mess. let me help you with it;

da3dsoul commented 6 years ago

We should throw in other command with it, but I'll need to look into it. Clear Nakamori image cache!

bigretromike commented 6 years ago

thats not nakamori image cache, its kodi cache aand thats a delete file based command, not sql - something more powerfull.

da3dsoul commented 6 years ago

It's both. Textures13.db3 holds the mapping.

Index Path cached_path hash date
3 http://15.129.x.z:8111/api/image/1/9409 4/46049948.jpg d0s94627  
4 http://15.129.x.z:8111/api/image/1/11731 3/34aa4e9e.jpg d0s98041  
5 http://15.129.x.z:8111/api/image/7/11381 6/6c598dd2.jpg d0s779538  
6 http://15.129.x.z:8111/api/image/7/871 6/6650310e.jpg d0s533847  
7 http://15.129.x.z:8111/api/image/1/12048 4/44d03510.jpg d0s91710  
8 http://15.129.x.z:8111/api/image/7/1359 7/772889b2.jpg d0s453616  
9 http://15.129.x.z:8111/api/image/1/13589 5/55aace70.jpg d0s101228  
10 http://15.129.x.z:8111/api/image/7/31278 6/60d52368.jpg d0s439472  
11 http://15.129.x.z:8111/api/image/1/12954 a/acd8a717.jpg d0s86775  
12 http://15.129.x.z:8111/api/image/7/31384 e/e98629a3.jpg d0s595038  
13 http://15.129.x.z:8111/api/image/1/13750 6/69a7c456.jpg d0s144856  
14 http://15.129.x.z:8111/api/image/7/31197 3/356d97a8.jpg d0s444036  
15 http://15.129.x.z:8111/api/image/1/6031 f/f0edff5e.jpg d0s48711  
16 http://15.129.x.z:8111/api/image/7/2328 2/24515811.jpg d0s350150  
17 http://15.129.x.z:8111/api/image/1/7582 d/dfda412a.jpg d0s38221  
18 http://15.129.x.z:8111/api/image/7/25632 3/38e14d83.jpg d0s99100  
19 http://15.129.x.z:8111/api/image/1/8794 f/f19cf22b.jpg d0s77588  
26 C:\Users\da3ds\AppData\Roaming\Kodi\addons\resource.images.nakamori\resources\media\backgrounds\calendar.jpg 6/6f57d052.jpg d1534385524s237860 8/15/2018 22:30
bigretromike commented 6 years ago

delete from texture where url like '%shoko_ip:shoko_port/api/image/%';

da3dsoul commented 6 years ago

We could do something like

'DELETE FROM texture WHERE url LIKE "%' + port + '/api/%"'
'DELETE FROM texture WHERE url LIKE "%nakamori%"'
da3dsoul commented 6 years ago

Haha just barely beat me. I would just do port to clean up any other IPs

bigretromike commented 6 years ago

kodi use LOCAL db, and you dont change shoko ip. and if you do it make new cache and old one is ignored;

da3dsoul commented 6 years ago

We can also ignore the files. Kodi will overwrite them.

I change Shoko IP, but I'm not normal. I have 127.0.0.1, localhost, da3dsoul.yyy da3dsoul.xxx, and 15.129.z.y

bigretromike commented 6 years ago

that, of if you use one DB for many kodi-s then you run it against one kodi that you have issue with. I prefer no to delete something if anyother plugin use this port. also you could change shoko port to something common for lols. and then what..

da3dsoul commented 6 years ago

Then you're fucked for other reasons. OS's don't let you run things like that

da3dsoul commented 6 years ago

All of those IPs point to the same server, but I have a bunch of trash because I was testing remote access

bigretromike commented 6 years ago

yes you can, thats why shoko allow for that :-)

bigretromike commented 6 years ago

I assume you are making that clear command. You cleaning cache directory with cacheurl from rows you deleting ?

da3dsoul commented 6 years ago

No I mean you can't use the same port for two things

da3dsoul commented 6 years ago

Nah we'll let Kodi deal with the cached images. It does that itself.

bigretromike commented 6 years ago

so its an easy command then :-) go ahead. I will be preparing release right now. We can include that too.

da3dsoul commented 6 years ago

mk. I'll need to fix your English haha. You fixed one but not the other.

bigretromike commented 6 years ago

sure. I will then pull those to poeditor ;-)

bigretromike commented 6 years ago

I assume the issues with cache are because you change manualy pictures in Desktop and those don't get populated in cache or what ? I know there are shit tones of tvdb wrong pictures...

da3dsoul commented 6 years ago

No it'll happen if you wipe your DB or boot up an old Kodi and connect to a new server. It's also just nice for dev work

da3dsoul commented 6 years ago

Done

bigretromike commented 6 years ago

arrr.. i just finished too..

da3dsoul commented 6 years ago

Hmm? Were you working on stuff?

bigretromike commented 6 years ago

yeah, I was thinking that it shouldn't take you 30mintus so I just did it. but it looks like you fix/broke other things. the fun part is that the cache part was almost 1:1