How to fetch media info and artwork only if not fetched

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Raphy
Posts: 4
Joined: 20 Mar 2012, 16:30

How to fetch media info and artwork only if not fetched

Post by Raphy »

Hello,

First of all thanks for your wonderful software that is just awesome.

I would like this script ( http://filebot.sourceforge.net/scripts/ ... mdb.groovy, and the tv shows counterpart) to be periodically run by a crontab on my media center.

I don't want to use renaming/moving possibilities because I want my torrent client to keep on seeding the files, while XBMC to be able to find the good infos.

So I wonder if there is a way for the groovy script to check if the infos and artowork of a media have already been fetched (check if there is a movie.nfo or tvshow.nfo for example), and skip those folder to move onto another?

Thank you very much
Raphael
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to fetch media info and artwork only if not fetched

Post by rednoah »

Should be easy to add that to that script. In that eachMediaFolder loop just add some kinda break condition.

e.g.
if (dir.hasFile{it =~ /nfo$/}) return;

Also since 2.6 you can do -rename --action copy|keeplink|hardlink so you can auto-organize files into a new location while keeping the original for seeding.
:idea: Please read the FAQ and How to Request Help.
Raphy
Posts: 4
Joined: 20 Mar 2012, 16:30

Re: How to fetch media info and artwork only if not fetched

Post by Raphy »

it works awesomely well.

I added this piece of code to the main function:

Code: Select all

if (dir.hasFile{it =~ /nfo$/} || ( dir.hasFile{it =~ /banner.jpg$/} && dir.hasFile{it =~ /folder.jpg$/})) {
     println "Already scanned, skipping..."
     return;
}
Thank you very much Rednoah!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How to fetch media info and artwork only if not fetched

Post by rednoah »

Updated the online artwork.* scripts with that. Set skip/override mode by using the --conflict [skip|override] option.
:idea: Please read the FAQ and How to Request Help.
Post Reply