Kodi Community Forum
[RELEASE] Logo Downloader Script - 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: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: [RELEASE] Logo Downloader Script (/showthread.php?tid=74912)



- ppic - 2010-08-12

it python librairy available for skinners Wink


- mcborzu - 2010-08-15

Is there any way when running the script via the info screen that we can pull that actuall image rather than the url?


- ppic - 2010-08-15

not without including some gui in script, i want to keep it simple


- giantpopples - 2010-08-22

Hi !

I have a bug with the logos for the different views in TV Shows (using Night, mod Confluence or any other sskin that support TV logos), even ppic script doesn't work.. (tried version 1.4 and 2.0).

Here are my problems :
- For ppic's plugin : I use a central mysql DB so the plugin does not work

- More generally several of my tvshows are across 2 or 3 hdd, i added in every show folder the right logo.png, it works well where TV show path is unique but when the path is on multiple folders it can't load logo. png ..

What can i do ? Is there a simple fix for it ?

Thank you very much for you superb skin and great plugin Wink


- ppic - 2010-08-22

well, i've never made skin lol !

can you post a debug log


- giantpopples - 2010-08-22

Sure !

A little update first, logo appears on episodes view but not in show or season view (one season is across 2 hdds)

With debugging On :

When i launch your script (db error because i use a mysql DB)

Quote:07:22:05 T:2860 M:1439952896 INFO: -->Python script returned the following error<--
07:22:05 T:2860 M:1439952896 ERROR: Error Type: pysqlite2.dbapi2.OperationalError
07:22:05 T:2860 M:1439952896 ERROR: Error Contents: no such table: tvshow
07:22:05 T:2860 M:1439948800 ERROR: Traceback (most recent call last):
File "C:\XBMC\portable_data\addons\script.logo-downloader\default.py", line 249, in ?
TVshow_list = listing()
File "C:\XBMC\portable_data\addons\script.logo-downloader\default.py", line 86, in listing
except: c.execute('select tvshow.c00 , tvshow.c12 , path.strPath from tvshow , path , tvshowlinkpath where path.idPath = tvshowlinkpath.idPath AND tvshow.idShow = tvshowlinkpath.idShow')
OperationalError: no such table: tvshow
07:22:05 T:2860 M:1439948800 INFO: -->End of Python script error report<--

And a more general error when entering a TV Show view that support logo.png :

Quote:07:26:26 T:5232 M:1432043520 DEBUG: CVideoDatabase::GetTvShowsByWhere query: SELECT tvshow.*,path.strPath AS strPath,counts.totalcount AS totalCount,counts.watchedcount AS watchedCount,counts.totalcount=counts.watchedcount AS watched FROM tvshow JOIN tvshowlinkpath ON tvshow.idShow=tvshowlinkpath.idShow JOIN path ON path.idpath=tvshowlinkpath.idPath LEFT OUTER join ( SELECT tvshow.idShow AS idShow,count(1) AS totalcount,count(files.playCount) AS watchedcount FROM tvshow JOIN tvshowlinkepisode ON tvshow.idShow=tvshowlinkepisode.idShow JOIN episode ON episode.idEpisode=tvshowlinkepisode.idEpisode JOIN files ON files.idFile=episode.idFile GROUP BY tvshow.idShow) counts ON tvshow.idShow=counts.idShow
07:26:26 T:5232 M:1432043520 DEBUG: Time for actual SQL query = 5
07:26:26 T:5232 M:1432027136 DEBUG: Time to retrieve tvshows from dataset = 11
07:26:26 T:5232 M:1432018944 DEBUG: Saving fileitems [videodb://2/2/]
07:26:26 T:5232 M:1432018944 DEBUG: -- items: 27, sort method: 24, ascending: true
07:26:26 T:4308 M:1432023040 DEBUG: thread start, auto delete: 0
07:26:26 T:4308 M:1430441984 DEBUG: Thread 4308 terminating
07:26:26 T:6108 M:1430679552 DEBUG: CTextureCache::GetImageHash - unable to stat url multipath://smb://serveur/series/Gossip Girl//smb://serveur/series2/Gossip Girl//smb://serveur/series3/Gossip Girl//logo.png
07:26:26 T:6108 M:1430679552 DEBUG: msg: PICTURE::LoadImage: Unable to open image: multipath://smb://serveur/series/Gossip Girl//smb://serveur/series2/Gossip Girl//smb://serveur/series3/Gossip Girl//logo.png Error: (3)
07:26:26 T:6108 M:1430679552 ERROR: Texture manager unable to load file: multipath://smb://serveur/series/Gossip Girl//smb://serveur/series2/Gossip Girl//smb://serveur/series3/Gossip Girl//logo.png
07:26:26 T:6108 M:1430679552 DEBUG: CTextureCache::GetImageHash - unable to stat url multipath://smb://serveur/series/Gossip Girl//smb://serveur/series2/Gossip Girl//smb://serveur/series3/Gossip Girl//../logo.png
07:26:26 T:6108 M:1430233088 DEBUG: msg: PICTURE::LoadImage: Unable to open image: multipath://smb://serveur/series/Gossip Girl//smb://serveur/series2/Gossip Girl//smb://serveur/series3/Gossip Girl//../logo.png Error: (3)
07:26:26 T:6108 M:1430200320 ERROR: Texture manager unable to load file: multipath://smb://serveur/series/Gossip Girl//smb://serveur/series2/Gossip Girl//smb://serveur/series3/Gossip Girl//../logo.png
07:26:26 T:5232 M:1430208512 DEBUG: HttpApi Start command: broadcastlevel paras: broadcastlevel; OnAction:7;2
07:26:26 T:2204 M:1430208512 DEBUG: UDPCLIENT TX: 15366677 -> '<b>OnAction:7;192.168.1.11;2</b>'
07:26:27 T:5716 M:1430769664 DEBUG: CTextureCache::GetImageHash - unable to stat url multipath://smb://serveur/series/House//smb://serveur/series2/House//smb://serveur/series3/House//logo.png
07:26:27 T:5716 M:1430769664 DEBUG: msg: PICTURE::LoadImage: Unable to open image: multipath://smb://serveur/series/House//smb://serveur/series2/House//smb://serveur/series3/House//logo.png Error: (3)
07:26:27 T:5716 M:1430769664 ERROR: Texture manager unable to load file: multipath://smb://serveur/series/House//smb://serveur/series2/House//smb://serveur/series3/House//logo.png
07:26:27 T:5716 M:1430769664 DEBUG: CTextureCache::GetImageHash - unable to stat url multipath://smb://serveur/series/House//smb://serveur/series2/House//smb://serveur/series3/House//../logo.png
07:26:27 T:5716 M:1430769664 DEBUG: msg: PICTURE::LoadImage: Unable to open image: multipath://smb://serveur/series/House//smb://serveur/series2/House//smb://serveur/series3/House//../logo.png Error: (3)
07:26:27 T:5716 M:1430769664 ERROR: Texture manager unable to load file: multipath://smb://serveur/series/House//smb://serveur/series2/House//smb://serveur/series3/House//../logo.png

Hope it will help !


- ppic - 2010-08-22

your are not using the current script version, current don't use sqlitedb, but http api


- giantpopples - 2010-08-23

Hi again !

After downloading version 2.0 from google code and modifying Night skin (from git), i could run your script.

I t works fine when a show is in a single drive but fails on downloading when show is in multiple drive, here is the end of the log (debug on), it only fails when downloading so i don't post the whole log..

Quote:17:56:03 T:5844 M:1353236480 NOTICE: ###show name: Dr. House
17:56:03 T:5844 M:1353236480 NOTICE: ###mode: solo
17:56:03 T:5844 M:1353236480 NOTICE: ###clearart: False
17:56:03 T:5844 M:1353236480 NOTICE: ###logo: True
17:56:03 T:5844 M:1353236480 NOTICE: ###thumb: False
17:56:03 T:5844 M:1353236480 NOTICE: ###show path: multipath://smb%3a%2f%2fserveur%2fseries%2fHouse%2f/smb%3a%2f%2fserveur%2fseries2%2fHouse%2f/smb%3a%2f%2fserveur%2fseries3%2fHouse%2f/
17:56:03 T:5844 M:1353236480 NOTICE: ###id: 73255
17:56:03 T:5844 M:1353236480 NOTICE: ###lockstock xml: <?xml version="1.0"?>
<logos show="House"><logo url="http://www.lockstockmods.net/logos/73255/clearart/house-73255.png"/><logo url="http://www.lockstockmods.net/logos/73255/clearart/House-73255-2.png"/></logos>
17:56:03 T:5844 M:1353236480 NOTICE: ###image list: ['http://www.lockstockmods.net/logos/73255/clearart/house-73255.png', 'http://www.lockstockmods.net/logos/73255/clearart/House-73255-2.png']
17:56:03 T:5844 M:1353236480 NOTICE: ###image url: http://www.lockstockmods.net/logos/73255/clearart/house-73255.png
17:56:03 T:5844 M:1353236480 NOTICE: ###filename: logo.png
17:56:03 T:5844 M:1353236480 NOTICE: ###xbmcstuff_xml: False
17:56:03 T:5844 M:1353236480 INFO: Loading skin file: DialogProgress.xml
17:56:03 T:5844 M:1353232384 DEBUG: ------ Window Init (DialogProgress.xml) ------
17:56:03 T:5844 M:1353211904 NOTICE: ### download :http://www.lockstockmods.net/logos/73255/clearart/house-73255.png
17:56:03 T:5844 M:1353203712 NOTICE: problem with path: multipath://smb%3a%2f%2fserveur%2fseries%2fHouse%2f/smb%3a%2f%2fserveur%2fseries2%2fHouse%2f/smb%3a%2f%2fserveur%2fseries3%2fHouse%2f/
17:56:03 T:5844 M:1352605696 INFO: Loading skin file: DialogOK.xml

Anyway, i already have logo.png in each tvshow folder, but when on multiple drives he logo does not appear, can i do something about it ? I don't know where to look for this functionality, i'd like xbmc (or the skin) to pick up for example, the logo from the first path if it's a multiple one..

Merci pour ton aide Wink


- ppic - 2010-08-23

this doesn't support multipath, it's a better way to use one path per source.

for logo not appearing, you should post a debug log in logo thread, it's not script problem.


- nozomi - 2010-08-27

Hi!
Been trying to use this script with Night on OSX. I get these errors and the script cannot load:

Code:
15:18:58 T:2958848000 M:425959424   DEBUG: Python thread: start processing
15:18:58 T:2958848000 M:425922560  NOTICE: -->Python Interpreter Initialized<--
15:18:58 T:2958848000 M:425922560   DEBUG: Process - The source file to load is /Users/k/Library/Application Support/XBMC/addons/script.logo-downloader/default.py
15:18:58 T:2958848000 M:425922560   DEBUG: Process - Setting the Python path to /Users/k/Library/Application Support/XBMC/addons/script.logo-downloader:/Applications/XBMC.app/Contents/Resources/XBMC/addons/script.module.pil/lib:/Applications/XBMC.app/Contents/Resources/XBMC/addons/script.module.pysqlite/lib:/Applications/XBMC.app/Contents/Resources/XBMC/system/python/Lib:/Applications/XBMC.app/Contents/Resources/XBMC/system/python/lib/python24.zip:/Applications/XBMC.app/Contents/Resources/XBMC/system/python/lib/python2.4/:/Applications/XBMC.app/Contents/Resources/XBMC/system/python/lib/python2.4/plat-darwin:/Applications/XBMC.app/Contents/Resources/XBMC/system/python/lib/python2.4/plat-mac:/Applications/XBMC.app/Contents/Resources/XBMC/system/python/lib/python2.4/plat-mac/lib-scriptpackages:/Applications/XBMC.app/Contents/Resources/XBMC/system/python/lib/python2.4/lib-tk:/Applications/XBMC.app/Contents/Resources/XBMC/system/python/lib/python2.4/lib-dynload
15:18:58 T:2958848000 M:425922560   DEBUG: Process - Entering source directory /Users/k/Library/Application Support/XBMC/addons/script.logo-downloader
15:18:58 T:2958848000 M:425877504    INFO: -->Python script returned the following error<--
15:18:58 T:2958848000 M:425877504   ERROR: Error Type: exceptions.SystemError
15:18:58 T:2958848000 M:425877504   ERROR: Error Contents: dynamic module not initialized properly
15:18:58 T:2958848000 M:425861120   ERROR: Traceback (most recent call last):
                                              File "/Users/k/Library/Application Support/XBMC/addons/script.logo-downloader/default.py", line 36, in ?
                                                from pysqlite2 import dbapi2 as sqlite3
                                              File "/Applications/XBMC.app/Contents/Resources/XBMC/addons/script.module.pysqlite/lib/pysqlite2/dbapi2.py", line 27, in ?
                                                from pysqlite2._sqlite import *
                                            SystemError: dynamic module not initialized properly
15:18:58 T:2958848000 M:425861120    INFO: -->End of Python script error report<--
15:18:59 T:2958848000 M:425861120    INFO: Python script stopped
15:18:59 T:2958848000 M:425861120   DEBUG: Thread 2958848000 terminating
15:18:59 T:2694505728 M:425914368   DEBUG: python thread 2 destructed

I guess it is because my python version says:
Code:
K-iMac:~ k$ python
Python 2.6.5 (r265:79063, Aug 11 2010, 18:37:32)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

I need a newer version than 2.4 of python because I also use Deluge which wont work with python below 2.5. Sad
Is there a way around this? Huh

Please help


- ppic - 2010-08-27

no, this is because your not using the script version automatically installed from the repo with the skin, you're using an old version, as you can see above, it's not using sqlite anymore.
your python version isn't a matter, it the one with xbmc which is used.


- nozomi - 2010-08-27

ppic Wrote:no, this is because your not using the script version automatically installed from the repo with the skin, you're using an old version, as you can see above, it's not using sqlite anymore.
your python version isn't a matter, it the one with xbmc which is used.

Yeah, you are correct. I installed the skin from passion-xbmc.org now and everything works. Thanks!


- DataFran - 2010-09-01

This might be a dumb question, but under the Dharma beta I cannot figure out how to run this script. I dropped it into the home folder and "installed from zip", and I can't figure out how I browse to it and run it.

Secondary question. Once I figure that out, is there a way to have this script run on library update or to trigger it with the HTTP API?

Thanks,

--
Francis


- ppic - 2010-09-01

this script is used by skins, if the one you use is not compatible, check the changelog if you want to integrate it in the by modding it Wink


- DataFran - 2010-09-01

Aah, and given your post in the Cirrus thread I gather it hasn't been integrated there yet.

Rats. Lots of space for logos in this skin and none of them are populated.

--
Francis