[Release] Artwork Organizer Script

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Fra-HTPC Offline
Junior Member
Posts: 18
Joined: Sep 2012
Reputation: 1
Post: #136
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.
find quote
Rads Offline
Junior Member
Posts: 1
Joined: Nov 2012
Reputation: 0
Post: #137
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
find quote
ronie Offline
Team-XBMC Member
Posts: 9,096
Joined: Jan 2009
Reputation: 157
Post: #138
(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.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
ronie Offline
Team-XBMC Member
Posts: 9,096
Joined: Jan 2009
Reputation: 157
Post: #139
(2012-11-04 01:26)ronie Wrote:  try v1.0.1, available in the first post.

make that v1.0.2 :-)

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Twinsen Offline
Donor
Posts: 14
Joined: Dec 2011
Reputation: 0
Post: #140
Is there a way to configure Artwork Organizer to grab fanart1.jpg fanart2.jpg, etc. from extrafanart and put them in these folders also?
find quote
ronie Offline
Team-XBMC Member
Posts: 9,096
Joined: Jan 2009
Reputation: 157
Post: #141
(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.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Twinsen Offline
Donor
Posts: 14
Joined: Dec 2011
Reputation: 0
Post: #142
(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
find quote
D-tyme Offline
Senior Member
Posts: 267
Joined: Jan 2010
Reputation: 0
Post: #143
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.

[Image: watched-clearlogo.jpg]
(This post was last modified: 2012-12-04 19:09 by D-tyme.)
find quote
paschy Offline
Junior Member
Posts: 2
Joined: Jan 2013
Reputation: 1
Post: #144
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
(This post was last modified: 2013-01-07 17:52 by paschy.)
find quote
Raytestrak Offline
Donor
Posts: 312
Joined: Sep 2011
Reputation: 3
Post: #145
(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?

OpenElec on an Intel NUC (DC3217IYE). Onkyo NR-717. Canton Movie CD-1000. LG 42LM760S

If it ain't broke: break it, fix it, repeat
(This post was last modified: 2013-01-08 08:13 by Raytestrak.)
find quote
ronie Offline
Team-XBMC Member
Posts: 9,096
Joined: Jan 2009
Reputation: 157
Post: #146
(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.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
paschy Offline
Junior Member
Posts: 2
Joined: Jan 2013
Reputation: 1
Post: #147
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..
find quote
Dutchie388 Offline
Junior Member
Posts: 4
Joined: Jan 2013
Reputation: 0
Post: #148
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....
find quote
ronie Offline
Team-XBMC Member
Posts: 9,096
Joined: Jan 2009
Reputation: 157
Post: #149
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.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
(This post was last modified: 2013-01-09 19:49 by ronie.)
find quote
Dutchie388 Offline
Junior Member
Posts: 4
Joined: Jan 2013
Reputation: 0
Post: #150
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)
(This post was last modified: 2013-01-10 14:15 by Dutchie388.)
find quote
Post Reply