Kodi Community Forum
[Release] Artwork Organizer 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] Artwork Organizer Script (/showthread.php?tid=109304)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


RE: [Release] Artwork Organizer Script - Fra-HTPC - 2012-09-30

It's running on Win7 x64 under an admin account, UAC is disabled, so I'm assuming it wouldn't be a rights issue.

I'll have another mess around with it later and will check created/modified dates for any files left behind.



RE: [Release] Artwork Organizer Script - Rads - 2012-11-03

Has there been an update in the latest nightly build that prevents the script from functioning properly? I'm running the latest nightly build (02.11).
When i run the script i doesn't copy anything to the folders.

Any idea what the cause is?

full log file here: http://pastebin.com/625H2Fwv


RE: [Release] Artwork Organizer Script - ronie - 2012-11-04

(2012-11-03, 15:23)Rads Wrote: Has there been an update in the latest nightly build that prevents the script from functioning properly?

yeah... the script was completely broken indeed.
thanx for the heads up :-)

try v1.0.1, available in the first post.


RE: [Release] Artwork Organizer Script - ronie - 2012-11-04

(2012-11-04, 01:26)ronie Wrote: try v1.0.1, available in the first post.

make that v1.0.2 :-)


RE: [Release] Artwork Organizer Script - Twinsen - 2012-11-27

Is there a way to configure Artwork Organizer to grab fanart1.jpg fanart2.jpg, etc. from extrafanart and put them in these folders also?




RE: [Release] Artwork Organizer Script - ronie - 2012-11-27

(2012-11-27, 01:04)Twinsen Wrote: Is there a way to configure Artwork Organizer to grab fanart1.jpg fanart2.jpg, etc. from extrafanart and put them in these folders also?

nope, only artwork that is stored in the xbmc db can be fetched by this addon.


RE: [Release] Artwork Organizer Script - Twinsen - 2012-11-27

(2012-11-27, 01:17)ronie Wrote:
(2012-11-27, 01:04)Twinsen Wrote: Is there a way to configure Artwork Organizer to grab fanart1.jpg fanart2.jpg, etc. from extrafanart and put them in these folders also?

nope, only artwork that is stored in the xbmc db can be fetched by this addon.

Ah, gotcha, manually it is then! Thanks for the quick reply Big Grin


RE: [Release] Artwork Organizer Script - D-tyme - 2012-12-04

OK, I must be missing something...

Frodo Beta-2
Transparency SVN 5.0.1

The only thing I see in the repo is v0.1.10

...but 5-day forecast in weather is working for me for the first time!

EDIT - nevermind, it just updated 10 1.1.10 on XBMC restart.


RE: [Release] Artwork Organizer Script - paschy - 2013-01-07

Hello, nice script, i had to customize it a little bit. So it does split the banners in anime and tvshows.

@Raytestrak: i read that your python skills are directing towards nil, but i hope you can read the part you need out of it:

My starting situation is, that i have mapped following paths for tv-series in XBMC:

\\NAS\Anime\
\\NAS\Serien\

I want my fanarts do be in different directories to set it as background in my home window of xbmc.

Code:
def _copy_tvshowfanart( self ):
        animedir = os.path.join(self.tvshowfanartpath,'Animes');
        tvshowdir = os.path.join(self.tvshowfanartpath,'Tvshows');
        xbmcvfs.mkdir(animedir);
        xbmcvfs.mkdir(tvshowdir);
        count = 0
        processeditems = 0
        json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": {"properties": ["title", "fanart","file"]}, "id": 1}')
        json_query = unicode(json_query, 'utf-8', errors='ignore')
        json_response = simplejson.loads(json_query)
        if (json_response['result'] != None) and (json_response['result'].has_key('tvshows')):
            totalitems = len( json_response['result']['tvshows'] )
            for item in json_response['result']['tvshows']:
                if self.dialog.iscanceled():
                    log('script cancelled')
                    return
                processeditems = processeditems + 1
                self.dialog.update( int( float( processeditems ) / float( totalitems ) * 100), __language__(32002) + ': ' + str( count + 1 ) )
        copypath = self.tvshowfanartpath;    
        
        if 'Anime' in item['file']:
            copypath = animedir;    
        if 'Serien' in item['file']:
            copypath = tvshowdir;    
                name = item['title']
                artwork = item['fanart']
                tmp_filename = name + '.jpg'                
                filename = clean_filename( tmp_filename )
                if artwork != '':
                    try:
                        xbmcvfs.copy( xbmc.translatePath( artwork ) , os.path.join( copypath, filename ) )
                        count += 1
                    except:
                        count -= 1
                        log( 'failed to copy tvshowfanart' )
        log( 'tvshowfanart copied: %s' % count )

In my case i only need to use the manager for tvshow-fanarts.

what i did:

Code:
animedir = os.path.join(self.tvshowfanartpath,'Animes');
tvshowdir = os.path.join(self.tvshowfanartpath,'Tvshows');
xbmcvfs.mkdir(animedir);
xbmcvfs.mkdir(tvshowdir);
create the directories "Animes" and "Tvshows" inside the TVShowFanart - folder

Code:
json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.GetTVShows", "params": {"properties": ["title", "fanart","file"]}, "id": 1}')
add "file" to the query, so i know where the file came from...

Code:
copypath = self.tvshowfanartpath;
made a new copypath variable that will be our tvshowfanartpath in default

Code:
if 'Anime' in item['file']:
    copypath = animedir;    
if 'Serien' in item['file']:
    copypath = tvshowdir;
change our default copy path variable as needed

Code:
xbmcvfs.copy( xbmc.translatePath( artwork ) , os.path.join( copypath, filename ) )
copy the image to our path

Thats way I end up having a folder "Animes" and a folder "Tvshows" inside my TVShowFanart folder containing the fanarts (that i need as backgrounds in my Aeon-Nox) Smile



RE: [Release] Artwork Organizer Script - Raytestrak - 2013-01-08

(2013-01-07, 17:47)paschy Wrote: Hello, nice script, i had to customize it a little bit. So it does split the banners in anime and tvshows.

@Raytestrak: i read that your python skills are directing towards nil, but i hope you can read the part you need out of it:

Thanks! I can do something with this! I can read and adjust code to a certain extent, so this should do the trick. I've made the adjustments for my setup, but have to wait till tonight to try it.

@ronie

Can this be a default option for the script? Add a subfolder for the share the series are located on? A lot of people split their series and movies and this would make skin configuration a lot easier. Unfortunately, there are a lot of ways people can store their media. I have it stored like Paschy: \\server\anime and server\series, but \\server\series\adult and \\server\series\kids could also be an option. Maybe store it with the folder name before the title of a movies or serie?


RE: [Release] Artwork Organizer Script - ronie - 2013-01-08

(2013-01-08, 07:40)Raytestrak Wrote: @ronie

Can this be a default option for the script?

nah, i have no intention to add it.
it will clutters the script with way too many options that will only benefit a small group of users.


RE: [Release] Artwork Organizer Script - paschy - 2013-01-08

maybe i will extend it when i got some free time with this option if you dont mind @ ronie

but atm i can live with my quick'n'dirty solution Smile

The easy way would be to make a comma seperated input field with keywords to split. These keywords would be used for searching in the path AND target (sub)directory for images.

A better way (wich i dont know how to do it) would be to have a mapping for paths and target (sub)directories

It would be better to have a mapping for paths and directories but I have no idea how to implement such a mapping structure..




RE: [Release] Artwork Organizer Script - Dutchie388 - 2013-01-09

i was about to post a question about this option, but maybe paschy just covered it,...

i have a number of seperate folders like astronomy, documentary, science etc etc, which i submenu under tv shows and have organised using playlists.

So to display only astronomy backgrounds when astronomy is selected in the menu, i've had to manually create an astronomy backgrounds folder and manually copy the image files there and link it...

it would be very cool indeed to be able to use the plugin to seperate the fanarts copied according to playlist to specific location.

I tried to write a batch file to do this but couldn't find a way....


RE: [Release] Artwork Organizer Script - ronie - 2013-01-09

please test if this suits your needs:
script.artworkorganizer-1.2.0.zip

there's a 'custom source' option in the addon settings
that allows you to select a folder.

if you have multiple custom folders, just run the script again for each folder.


RE: [Release] Artwork Organizer Script - Dutchie388 - 2013-01-10

cheers ronie,

i gave it a crack..but

in my case i'm looking for it to copy the fanart.jpg's from the folders within the custom folder, as for eg. within my astronomy folder i have 20 or so astronomy series each in their own folder, same as you do in the tv shows, unlike say my movies folder where all movies reside in the one folder.

so it's as if it would work perfect if it were to work the same as the 'copy tv show fanart' option, but pointed to the custom astronomy folder instead of tv shows.

I don't even know if that's possible since the 'copy tv show fanart' option acts on the entire tv show scraped library.

(actually i just realised that the 'copy artist fanart' works in that way)