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)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45


- thezoggy - 2010-10-01

So I added a new show, "Law & Order LA" so I ran your script to pick up the new logo:
Quote: <onclick>XBMC.RunScript(script.logo-downloader,mode=bulk,clearart=False,logo=True,showthumb=False)</onclick>
(showthumb = one word.. this forum splits it for some reason if there is a , before it.)

but it downloaded clearart, thumbs, and no logos for the whole collection. wtf?


- ppic - 2010-10-01

it can't with this line... debug log please


- thezoggy - 2010-10-01

ppic Wrote:it can't with this line... debug log please

When I'm home from work I'll provide some debug info. It worked fine the first day I ran this command but now after a week it appears not to work like it should.


- ppic - 2010-10-01

strange, i wait your log to see what's append.


- thezoggy - 2010-10-01

ppic Wrote:strange, i wait your log to see what's append.

here you go: http://pastebin.com/Z1vZpsgr

I deleted my log and created a fresh one. Started up XBMC waited for it to do its startup thing then ran the script and closed out XBMC. I removed the startup scrap debug block (figured you don't need to see my music/movies).

As you can see, the arguments are set and picked up:

09:59:26 T:3968 M:3021598720 DEBUG: CApplication::ExecuteXBMCAction : Translating XBMC.RunScript(script.logo-downloader,mode=bulk,clearart=False,logo=True,showthumb=False)

09:59:26 T:1820 M:3018498048 NOTICE: ['script.logo-downloader', 'mode=bulk', 'clearart=False', 'logo=True', 'showthumb=False']
09:59:26 T:1820 M:3018498048 NOTICE: arg 0: script.logo-downloader
09:59:26 T:1820 M:3018498048 NOTICE: arg 1: mode=bulk
09:59:26 T:1820 M:3018498048 NOTICE: arg 2: clearart=False
09:59:26 T:1820 M:3018498048 NOTICE: arg 3: logo=True
09:59:26 T:1820 M:3018498048 NOTICE: arg 4: showthumb=False
09:59:26 T:1820 M:3018498048 NOTICE: no arg5

But it clearly did not follow the arguments,
10:01:30 T:1820 M:3017576448 NOTICE: total tvshow = 64
10:01:30 T:1820 M:3017576448 NOTICE: logo found = 54
10:01:30 T:1820 M:3017576448 NOTICE: logo download = 0
10:01:30 T:1820 M:3017576448 NOTICE: thumb found = 1
10:01:30 T:1820 M:3017576448 NOTICE: thumb download = 41
10:01:30 T:1820 M:3017576448 NOTICE: clearart found = 0
10:01:30 T:1820 M:3017576448 NOTICE: clearart download = 39

let me know if you need anything else

--z


- thezoggy - 2010-10-01

Since i'm doing a bulk search, does it matter if i have arg5 not set? (showname)

btw I noticed that you have one line still in french listed in default.py,
Quote: print "### ERROR impossible d'ouvrir la page %s" % url

"error- not able to open a page"

Also to note, when your script is running.. the cancel button doesn't work on the popup.


- ppic - 2010-10-01

yes this 2 point are normal.

i'll check that later.


- ppic - 2010-10-01

ok, i've found the problem !

i was gathering the information in a wrong way, no it's good, i'll upload soon.

here is the working code :

Code:
for item in sys.argv:
            match = re.search("mode=(.*)" , item)
            if match: self.mode = match.group(1)            
            match = re.search("clearart=(.*)" , item)
            if match:
                if match.group(1): self.clearart = match.group(1)
                else: pass
            match = re.search("logo=(.*)" , item)
            if match:
                if match.group(1): self.logo = match.group(1)
                else: pass
            match = re.search("showthumb=(.*)" , item)
            if match:
                if match.group(1): self.show_thumb = match.group(1)
                else: pass
            match = re.search("showname=" , item)
            if match: self.show_name = item.replace( "showname=" , "" )
            else: pass



- ppic - 2010-10-01

well, not enought Sad

Code:
['script.logo-downloader', 'mode=bulk', 'clearart=False', 'logo=True', 'showthumb=False']

strange thing is that catch each True or False states in variable, But "False" return a True Boolean, i was assuming that Python catch the "False" string as False boolean, seems not ...

i've worked on it it's good now, i also add the ability to cancel the script Wink


- thezoggy - 2010-10-02

Ok neat, I'll wait your next release to test out. Nerd


- darkscout - 2010-10-05

For those that don't want to use a required Skin (or you just can't find the button like me in Night), you can use the API and xbmc-send



Code:
xbmc-send -a "XBMC.RunScript(script.logo-downloader,mode=bulk,clearart=True,logo=True,showthumb=True)"

Make sure you have xbmc-eventclients-xbmc-send - XBMC Media Center (Event Client XBMC-SEND package) installed.


- djon - 2010-10-05

mcborzu Wrote:With XBMC closed delete userdata/Database/textures.db

If it was a coding error all logos wouldn't show not just one. All others show just fine, correct?

I wrote before about missing one logo and I deleted textures.db and it came back. Now however 3 logos have disappeared and no matter how many times I delete textures.db they don't show up again. What can I try to attempt to reset something to make them come back again?

Debug log is now full of lines like this:

19:58:13 T:3908 M:1239638016 ERROR: Texture manager unable to load file: D:\TVShows\Dexter\/landscape.jpg
19:58:13 T:4040 M:1239629824 ERROR: Texture manager unable to load file: D:\TVShows\Family Guy\/landscape.jpg
19:58:13 T:3908 M:1239531520 ERROR: Texture manager unable to load file: D:\TVShows\House\/landscape.jpg
19:58:13 T:4040 M:1239134208 ERROR: Texture manager unable to load file: D:\TVShows\Burn Notice\/landscape.jpg
19:58:27 T:3908 M:1234026496 ERROR: Texture manager unable to load file: D:\TVShows\30 Rock\/landscape.jpg
19:58:27 T:1636 M:1234026496 ERROR: Texture manager unable to load file: D:\TVShows\The Big Bang Theory\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Boardwalk Empire\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Breaking Bad\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Brothers And Sisters\/landscape.jpg
19:58:27 T:4040 M:1234030592 ERROR: Texture manager unable to load file: D:\TVShows\Burn Notice\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\CSI NY\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Dexter\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Chuck\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Eureka\/landscape.jpg
19:58:27 T:4040 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Entourage\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\House\/landscape.jpg
19:58:27 T:1636 M:1234026496 ERROR: Texture manager unable to load file: D:\TVShows\How I Met Your Mother\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Family Guy\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\The Simpsons\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Spartacus Blood And Sand\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Two And A Half Men\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Weeds\/landscape.jpg
19:58:27 T:4020 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Modern Family\/landscape.jpg
19:58:27 T:4040 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\The Pacific\/landscape.jpg
19:58:33 T:3908 M:1228644352 ERROR: Texture manager unable to load file: D:\TVShows\The Simpsons\/logo.png
19:58:34 T:4040 M:1217703936 ERROR: Texture manager unable to load file: D:\TVShows\Two And A Half Men\/logo.png
19:58:35 T:4040 M:1218248704 ERROR: Texture manager unable to load file: D:\TVShows\Weeds\/logo.png
19:58:36 T:4040 M:1212035072 ERROR: Texture manager unable to load file: D:\TVShows\The Simpsons\/logo.png


- thezoggy - 2010-10-05

djon Wrote:I wrote before about missing one logo and I deleted textures.db and it came back. Now however 3 logos have disappeared and no matter how many times I delete textures.db they don't show up again. What can I try to attempt to reset something to make them come back again?

Debug log is now full of lines like this:

19:58:13 T:3908 M:1239638016 ERROR: Texture manager unable to load file: D:\TVShows\Dexter\/landscape.jpg
19:58:13 T:4040 M:1239629824 ERROR: Texture manager unable to load file: D:\TVShows\Family Guy\/landscape.jpg
19:58:13 T:3908 M:1239531520 ERROR: Texture manager unable to load file: D:\TVShows\House\/landscape.jpg
19:58:13 T:4040 M:1239134208 ERROR: Texture manager unable to load file: D:\TVShows\Burn Notice\/landscape.jpg
19:58:27 T:3908 M:1234026496 ERROR: Texture manager unable to load file: D:\TVShows\30 Rock\/landscape.jpg
19:58:27 T:1636 M:1234026496 ERROR: Texture manager unable to load file: D:\TVShows\The Big Bang Theory\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Boardwalk Empire\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Breaking Bad\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Brothers And Sisters\/landscape.jpg
19:58:27 T:4040 M:1234030592 ERROR: Texture manager unable to load file: D:\TVShows\Burn Notice\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\CSI NY\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Dexter\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Chuck\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Eureka\/landscape.jpg
19:58:27 T:4040 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Entourage\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\House\/landscape.jpg
19:58:27 T:1636 M:1234026496 ERROR: Texture manager unable to load file: D:\TVShows\How I Met Your Mother\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Family Guy\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\The Simpsons\/landscape.jpg
19:58:27 T:1636 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Spartacus Blood And Sand\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Two And A Half Men\/landscape.jpg
19:58:27 T:3908 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Weeds\/landscape.jpg
19:58:27 T:4020 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\Modern Family\/landscape.jpg
19:58:27 T:4040 M:1234022400 ERROR: Texture manager unable to load file: D:\TVShows\The Pacific\/landscape.jpg
19:58:33 T:3908 M:1228644352 ERROR: Texture manager unable to load file: D:\TVShows\The Simpsons\/logo.png
19:58:34 T:4040 M:1217703936 ERROR: Texture manager unable to load file: D:\TVShows\Two And A Half Men\/logo.png
19:58:35 T:4040 M:1218248704 ERROR: Texture manager unable to load file: D:\TVShows\Weeds\/logo.png
19:58:36 T:4040 M:1212035072 ERROR: Texture manager unable to load file: D:\TVShows\The Simpsons\/logo.png

what version of xbmc are you using? dharma beta2?
does the logo.png exist in the tv folder that you are 'missing' from xbmc? if the file is there, make sure the file isn't set to read-only/hidden.


- ppic - 2010-10-05

well, all i can say there is that has nothing to do with the script.
have you got a logo.png stored in path tell by the log*?


- thezoggy - 2010-10-05

hey ppic, any eta for 2.0.1? (fix argument options/revised summary screen)