Kodi Community Forum
Release Visual Thumbs - (Create thumbs for subfolders in picture library) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: Release Visual Thumbs - (Create thumbs for subfolders in picture library) (/showthread.php?tid=280680)

Pages: 1 2 3 4 5


Visual Thumbs - (Create thumbs for subfolders in picture library) - DaLanik - 2016-06-24

http://projects.lanik.org/KodiProject_VisualThumbs.htm

Visual Thumbs

This is my second add-on for KODI, or better yes, a script. It is installed under "programs".

What bothered me with KODI is that it doesn't create thumbnails for all image folders. You see, I have my photos structured under the year/month/date folder structure, and KODI only creates thumbnails for folders on the last level. So that means my years and months are just generic folder icons instead of thumbnails. This plugin takes care of that. It scans all your pictures folders and creates folder.jpg image in each that is not the last level.

Now, I only tested this on 3 level depth. So this should work on levels 3 and lower (2). If you run in on pictures of 1 level depth it simply won't do anything. Never tested with levels greater than 3.

Anyways, just go to programs and run "Visual Thumbs" and it will scan ALL of the folders specified in sources.xml for pictures and create thumbnails for each level...

Available from my repository: Lanik Repo

Image


D.

Donate Here

Image


RE: Visual Thumbs - peppe_sr - 2016-06-24

interesting! i will do a test


RE: Visual Thumbs - DaLanik - 2016-06-24

Be sure you have backup Smile Don't worry this doesn't delete anything, it only overwrites "folder.jpg" files if they already exist.... Smile


RE: Visual Thumbs - DaLanik - 2016-06-24

Also, it might take a while on slower systems.On my Win 10 P5 maching it takes like 10-15 seconds, bot on my android box it takes a minute.


RE: Visual Thumbs - peppe_sr - 2016-06-24

i works on lan? i have photos on a nas.
i'm having this script error
Code:
15:06:30 T:632  NOTICE: THUMBS >> PICTURES PATH NR: 1 >>smb://NSA325-V2/photo/Foto/<<
15:06:30 T:632  NOTICE: THUMBS >> TOTAL PATHS FOUND: >>1<<
15:06:30 T:632   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: max() arg is an empty sequence
                                            Traceback (most recent call last):
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 237, in <module>
                                                scanPaths( path )
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 158, in scanPaths
                                                xbmc.log("THUMBS >> BEGIN PATH: >>" + path + "<< FOLDERS IN PATH: >>" + str(objects) + "<< MAX LEVELS: >>" + str(max(countlevel)) + "<<" )
                                            ValueError: max() arg is an empty sequence
                                            -->End of Python script error report<--
you can see my smb share, under "foto" i have year/date/


RE: Visual Thumbs - DaLanik - 2016-06-24

To tell the truth, didn't test it with SMB shares, only local drives in Win and Android... Will have a look. Thanx.


RE: Visual Thumbs - DaLanik - 2016-06-24

Just tested it and it works with 2 levels but fails with the same error on SMB share on my PC as well.... so it should be reproducable and fixable Wink Back to drawing board Smile


RE: Visual Thumbs - peppe_sr - 2016-06-24

ok, when you are ready i'm here to test again.
Peppe


RE: Visual Thumbs - DaLanik - 2016-06-25

Found the error - just have to remove the smb: at the beginning and it works. Will upload over weekend.


RE: Visual Thumbs - DaLanik - 2016-06-25

OK, it should be updated in the repository, v1.1


RE: Visual Thumbs - peppe_sr - 2016-06-25

i'm here, addon updated but i think there is something strange with names of my folders.
addon starts, i confirm with yes the scan request the "working" popup appers in confluence and it stay there in a loop.
in the log i found this
Code:
20:47:50 T:6456  NOTICE: THUMBS >> PATH: >>//NSA325-V2/photo/Foto/2001\07-27-2001_Minareto<<
20:47:51 T:6456  NOTICE: THUMBS >> PATH: >>//NSA325-V2/photo/Foto/2001\09-02-2001_Yaris<<
20:47:51 T:6456   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeEncodeError'>
                                            Error Contents: 'ascii' codec can't encode character u'\xf2' in position 60: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 243, in <module>
                                                scanPaths( path )
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 175, in scanPaths
                                                xbmc.log("THUMBS >> PATH: >>" + root + "<<" )
                                            UnicodeEncodeError: 'ascii' codec can't encode character u'\xf2' in position 60: ordinal not in range(128)
                                            -->End of Python script error report<--



RE: Visual Thumbs - DaLanik - 2016-06-26

You probably have some "non standard" characters in file or folder name, I'll have a look

Yes, this is probalby it: ò


RE: Visual Thumbs - DaLanik - 2016-06-26

OK, new version is in repo, tried foldername with ò character and it works....


RE: Visual Thumbs - peppe_sr - 2016-06-27

good morning, i tried new versiont.
it started scan and create a couple of folder.jpg, have to say that i haven't understood the scan order. surely it is not alphabetical.
after a while, i have lots of pictures and folders to scan, looking the log i found an error about some type of unkown kind of image.
if the error is in the latest folder shown in the log before the error appears i could say that the pics in that folder are normal .jpg
i can't post the log ATM but i will in next hours.
Peppe


RE: Visual Thumbs - DaLanik - 2016-06-27

You are a good source for bug fixes Smile Smile Smile