2017-01-05, 02:19
Hi Marcel.
Ultimately #1 would be best, as ideally Kodi should handle GIF artwork in a similar way it does current non-GIF artwork. I'm a little undecided if GIF artwork should be cached, as the files can be quite large, but to be consistent with other artwork then it should be cached, as this also means remote (internet-based) GIF artwork can be used.
However until that happens, placing these GIF files in a different location would avoid filling the Thumbnails folder with (currently) uncacheable artwork, particularly if users subsequently try to "fix" their cache by running a command such as "texturecache.py R" as this will delete all the GIF files.
OK, that's half the battle.
So you are creating entries such as the following, from this post:
In that case the only risk texturecache.py poses to these GIF images is when the "R" (orphan) command is run, as it will identify all of the files in the animatedgifs folder as "orphan" files since they're not being referenced by a row in Textures13.db.
Two options here... 1) don't run the "R" command, or 2) I add an option to ignore certain "classes" of orphan files.
If the animated files were stored outside of the Thumbnails folder, then #2 isn't necessary as #1 no longer poses a problem.
If better GIF integration ever happens in Kodi, then #2 again won't be required as any cached GIF artwork would no longer be seen as "orphaned" (unless it really is an orphan!) However I realise that improved GIF support in Kodi is going to take a long time, and may never happen at all.
So yes, relocating the GIF artwork outside of the Thumbnails folder would IMHO be a good first step, with a long term aim to improve GIF integration (best of luck!) ;-)
(2017-01-04, 23:44)marcelveldt Wrote: What would be the best solution in your opinion:
1) Try the fix the root cause so the texture cache is ignored for multiframe/animated gif files.
2) Place the gifs in another local location, like temp or addon_data folder
3) ....
Ultimately #1 would be best, as ideally Kodi should handle GIF artwork in a similar way it does current non-GIF artwork. I'm a little undecided if GIF artwork should be cached, as the files can be quite large, but to be consistent with other artwork then it should be cached, as this also means remote (internet-based) GIF artwork can be used.
However until that happens, placing these GIF files in a different location would avoid filling the Thumbnails folder with (currently) uncacheable artwork, particularly if users subsequently try to "fix" their cache by running a command such as "texturecache.py R" as this will delete all the GIF files.
(2017-01-04, 23:44)marcelveldt Wrote: BTW: The artwork is actually written to the Kodidb by json API, meaning an artwork item animatedposter is added.
OK, that's half the battle.
So you are creating entries such as the following, from this post:
Code:
osmc@SimorghOSMC:~$ ./texturecache.py jd movies Zootopia
[
{
"art": {
"animatedfanart": "image://special://thumbnails/animatedgifs/tt2948356_fanart.gif/",
"animatedposter": "image://special://thumbnails/animatedgifs/tt2948356_poster.gif/",
"fanart": "image://smb://10.0.1.120:445/Sohrab15/Muvees 15/Zootopia (2016)/Zootopia 2016 1080p BluRay x264 DTS-JYK-fanart.jpg/",
"poster": "image://smb://10.0.1.120:445/Sohrab15/Muvees 15/Zootopia (2016)/Zootopia 2016 1080p BluRay x264 DTS-JYK-poster.jpg/"
},
"file": "smb://10.0.1.120:445/Sohrab15/Muvees 15/Zootopia (2016)/Zootopia 2016 1080p BluRay x264 DTS-JYK.mkv",
"label": "Zootopia",
"movieid": 434,
"title": "Zootopia"
}
In that case the only risk texturecache.py poses to these GIF images is when the "R" (orphan) command is run, as it will identify all of the files in the animatedgifs folder as "orphan" files since they're not being referenced by a row in Textures13.db.
Two options here... 1) don't run the "R" command, or 2) I add an option to ignore certain "classes" of orphan files.
If the animated files were stored outside of the Thumbnails folder, then #2 isn't necessary as #1 no longer poses a problem.
If better GIF integration ever happens in Kodi, then #2 again won't be required as any cached GIF artwork would no longer be seen as "orphaned" (unless it really is an orphan!) However I realise that improved GIF support in Kodi is going to take a long time, and may never happen at all.
So yes, relocating the GIF artwork outside of the Thumbnails folder would IMHO be a good first step, with a long term aim to improve GIF integration (best of luck!) ;-)