Kodi Community Forum

Full Version: [RELEASE] Video Fanart Splitter Script - Movie and TV Show FanArt Seperation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Nice 1, must have addon Wink No probs with WinXP-Beta1.. Cheers, nice work..
Steveb Wrote:Nice 1, must have addon Wink No probs with WinXP-Beta1.. Cheers, nice work..

Same with WIN7 Beta 1
Edit: Unnecessary post, but can't delete.
Anyway, I seem to be having the same issue as a few other guys, below is the crash-log from the script.

Code:
20:12:00 T:2959880192 M:2593615872    INFO: -->Python script returned the following error<--
20:12:00 T:2959880192 M:2593615872   ERROR: Error Type: exceptions.IndexError
20:12:00 T:2959880192 M:2593615872   ERROR: Error Contents: list index out of range
20:12:00 T:2959880192 M:2593615872   ERROR: Traceback (most recent call last):
                                              File "/Users/sean/Library/Application Support/XBMC/addons/script.video-fanart-splitter/default.py", line 54, in ?
                                                if os.path.isfile(xbmc.translatePath("special://profile/Thumbnails/Video/Fanart/" + getCrc(row[0] + row[1]) + ".tbn")):
                                              File "/Users/sean/Library/Application Support/XBMC/addons/script.video-fanart-splitter/default.py", line 24, in getCrc
                                                crc     = hex(g(filename.lower()))
                                              File "/Users/sean/Library/Application Support/XBMC/addons/script.video-fanart-splitter/crcmod.py", line 403, in crcfun
                                                return fun(data, crc, table)
                                              File "/Users/sean/Library/Application Support/XBMC/addons/script.video-fanart-splitter/_crcfunpy.py", line 67, in _crc32
                                                crc = table[ord(x) ^ (int(crc>>24) & 0xFF)] ^ ((crc << 8) & 0xFFFFFF00L)
                                            IndexError: list index out of range
20:12:00 T:2959880192 M:2593615872    INFO: -->End of Python script error report<--
Smenus Wrote:Anyway, I seem to be having the same issue as a few other guys, below is the crash-log from the script.

Code:
20:12:00 T:2959880192 M:2593615872    INFO: -->Python script returned the following error<--
20:12:00 T:2959880192 M:2593615872   ERROR: Error Type: exceptions.IndexError
20:12:00 T:2959880192 M:2593615872   ERROR: Error Contents: list index out of range
20:12:00 T:2959880192 M:2593615872   ERROR: Traceback (most recent call last):
                                              File "/Users/sean/Library/Application Support/XBMC/addons/script.video-fanart-splitter/default.py", line 54, in ?
                                                if os.path.isfile(xbmc.translatePath("special://profile/Thumbnails/Video/Fanart/" + getCrc(row[0] + row[1]) + ".tbn")):
                                              File "/Users/sean/Library/Application Support/XBMC/addons/script.video-fanart-splitter/default.py", line 24, in getCrc
                                                crc     = hex(g(filename.lower()))
                                              File "/Users/sean/Library/Application Support/XBMC/addons/script.video-fanart-splitter/crcmod.py", line 403, in crcfun
                                                return fun(data, crc, table)
                                              File "/Users/sean/Library/Application Support/XBMC/addons/script.video-fanart-splitter/_crcfunpy.py", line 67, in _crc32
                                                crc = table[ord(x) ^ (int(crc>>24) & 0xFF)] ^ ((crc << 8) & 0xFFFFFF00L)
                                            IndexError: list index out of range
20:12:00 T:2959880192 M:2593615872    INFO: -->End of Python script error report<--

OK, as I really wanted to split my fanart, I had a look into what the issue was. Apparently, it's a text encoding issue, the movie that caused the problem for me had an umlaut in the middle.

As I don't understand the crc code at all, I took the easy route and just caught the exception, and went on to the next movie.

Line 53:
Code:
for row in db_cursor:
    try:
        if os.path.isfile(xbmc.translatePath("special://profile/Thumbnails/Video/Fanart/" + getCrc(row[0] + row[1]) + ".tbn")):
            moviesadded += 1
            shutil.copyfile(xbmc.translatePath("special://profile/Thumbnails/Video/Fanart/" + getCrc(row[0] + row[1]) + ".tbn"), xbmc.translatePath(addon_work_folder + "/Movies/" + getCrc(row[0] + row[1]) + ".tbn"))
    except IndexError:
        pass

Line 74:
Code:
for row in db_cursor:
    try:
        if os.path.isfile(xbmc.translatePath("special://profile/Thumbnails/Video/Fanart/" + getCrc(row[0]) + ".tbn")):
            tvadded += 1
            shutil.copyfile(xbmc.translatePath("special://profile/Thumbnails/Video/Fanart/" + getCrc(row[0]) + ".tbn"), xbmc.translatePath(addon_work_folder + "/TV/" + getCrc(row[0]) + ".tbn"))
    except IndexError:
        pass

I hope this helps someone with the same issue.

Cheers, Sean.
Thanks to all for making this work.

I found that I could not get the script to auto launch on my Win7 DharmaB2 setup - so I had to make a change to the autoexec.py file

Code:
import xbmc, time
time.sleep(5)
xbmc.executescript('special://[b]home[/b]//addons//script.video-fanart-splitter//default.py')


Hope that helps someone,

Steve
hi guys,
im really new at xbmc (coming from mediaportal) but i just "need" this script running. It created the movie and the tv folder and copied some fanart in there but ended with an error.

i tried the fixes Smenus mentioned, but i still got the error.

Heres the log:
18:00:15 T:3456 M:1183596544 ERROR: Error Type: exceptions.OSError
18:00:15 T:3456 M:1183596544 ERROR: Error Contents: [Errno 13] Permission denied: 'C:\\Users\\bigbear\\AppData\\Roaming\\XBMC\\userdata\\addon_data\\script.video-fanart-splitter\\Movies\\2a7d3b1e.tbn'
18:00:15 T:3456 M:1183563776 ERROR: Traceback (most recent call last):
File "C:\Users\bigbear\AppData\Roaming\XBMC\addons\script.video-fanart-splitter\default.py", line 50, in ?
shutil.rmtree(os.path.join(addon_work_folder,"Movies"))
File "special://xbmc/system/python/Lib\shutil.py", line 168, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "special://xbmc/system/python/Lib\shutil.py", line 166, in rmtree
os.remove(fullname)
OSError: [Errno 13] Permission denied: 'C:\\Users\\bigbear\\AppData\\Roaming\\XBMC\\userdata\\addon_data\\script.video-fanart-splitter\\Movies\\2a7d3b1e.tbn'
18:08:58 T:3624 M:1210183680 NOTICE: -->Python Interpreter Initialized<--


Im really not sure about the \\ in the filestructure. shouldnt it be just one?
Also i tried renaming one of the files in the movie folder. works fine, so i cant imagine it really is a permissions problem, right?

OS is Win7 32bit
Dharma beta 3
aeon65 skin

thanks for any help!
hey bigbear77 i know nothing of python, but "userd ata" seems a bit strange to me
hi jeron, thanks for your reply.

yes this "userd ata" and the "mo vies" a bit before that seems strange, but as far as i could see in the python file there are no fixed path-settings in there. that would mean, the script "reads" the path wrong...

or so i guess...

never seen a python script before today Sad

Edit:
Maybe i can just put the fixed path settings in the file and replace the variables??

Edit2:
sorry guys, its working... i didnt paste the information that Smenus postet quite right...
how do i go about adding this in dharma?
i put it in my addons folder and called it script.video.fanart.splitter but how can i now launch this from xbmc dharma?
please help!
Tried following the provided fixes, and still xbmc.log rages about some pysqlite module. OpenELEC, running MQ2 which includes this script
pseudoheld Wrote:how do i go about adding this in dharma?
i put it in my addons folder and called it script.video.fanart.splitter but how can i now launch this from xbmc dharma?
please help!

How I installed mine

1: Uploaded zip file to somewhere you can find
2: Goto plugins and install via Zip (find file and install)
3:Im using Aeon65 skin, so I had to enable the home menu scripts then it will be in there just click and it should give you a result (there is a short period where you dont know if its working but mine seems to take about 10-20sec aprox 250 films
WIN7 & Dharma & Trasparency. I install the script, but where I can find the folders?
Sory for maybe bad spell..
As a follow up, I think this script is dependent on pysqlite2, from python 2.4... openelec, which I'm using, uses python 2.6, and isn't compatible with this plugin as written.

Sad face.
Added code from Smenus.

Script Video Fanart Splitter 0.1.5
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14