thank you and 2 requests

All your suggestions, requests and ideas for future development
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

thank you and 2 requests

Post by zeltak »

Hya

First of all thx rednoah for pointing me towards filebot at the 'therenamer' forums, ive been looking for a linux solution for ages :)

i have 2 requests which i know are not small but would make filebot all i ever need to organize my media :)

1)could filebot also generate nfo files for the episodes/series it finds so that xbmc could easly read them?

2)is it possible to while checking for names in tvdb to dl fanart/banners?

thx again for this awesome app!!

best

Zeltak
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

Can't xbmc do that once files are perfectly renamed? I simply don't have the time to support each and every HTPC meta data format.

Doesn't seem like it's something I want to pack into the GUI, but I'll a CLI script might be feasable. Imho best solution is find a format / folder structure that XBMC can recognize.
:idea: Please read the FAQ and How to Request Help.
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

Thx for the quick respone! :D

i understand with the nfo thing and will do as suggesetd and rename all my files to meet some standart xbmc follows

A command line option for pulling fanart would also be awesme :)

btw silly question after a few folder renames i am left with alot of unamed files (.nfo, .jpegs etc..) is there no way to quick clear the files? loading other files dosent seem to clear them, would be a nice feature to have if missing

i have zero coding knowledge but i usually try to contribute to floss programs as much as i can and have been involved with multiple projects in the past (amarok ,gmpc, etc..) but unfortunantly 2 kids and a new job dosent leave me to much time thesedays. I can try to fit some time for documentation writing whenever i will have time in the future

thx again for this amazinf app, its trully a little gem :)

best

Zeltak
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

hi, any help is welcome :) btw i got something for ya ;)

* Sample script for purging orphaned nfo / jpg / etc files => http://filebot.sourceforge.net/data/she ... ner.groovy
* Sample script for fetching thetvdb banners => http://filebot.sourceforge.net/data/she ... ers.groovy

These two scripts require r775, get it here:
https://sourceforge.net/projects/filebo ... ebot/HEAD/
:idea: Please read the FAQ and How to Request Help.
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

Wow

thanks alot for the script, filebot never ceases to amaze me :)

im probably doing something stupid but i cant really get the script to work, i issue (using r775 ofc):

filebot -script /home/zeltak/Downloads/banners.groovy /home/zeltak/media/videos/Lost/

but then filebot just opens under sfv view, what should i expect to see when i run the script?

also is it possible to adjust the script to dl the first fanart associated with the series in addition to the banner?

i have a question/request if you dont mind. is there no way to force file bot to rename on a specific series (by the series id on tvdb/imdb etc..)? i have a few series which i know are available on the tvdb IE

http://thetvdb.com/?tab=season&seriesid ... 8568&lid=7

yet filebot cant match it up correctly even though the folder name and files have "A Cook On The Wild Side" in them.

It would be fantastic to issue force id "XXXYYY" to get exactly the series you want in these rare cases filebot cant find the series by itself

again thank you so much for your hard work on filebot, i will definitely write some documentation during the X-mas break once i get fully familiarized with filebot, its just amazing

best
Z.
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: cli scripting

Post by rednoah »

Forgot to add caching to the banner requests, update to r777 and it'll be noticable faster!

The scripting is part of the CLI and it's gonna run like any other shell/batch script. There'll be no GUI.

If FileBot starts into the GUI then there's something wrong with the cmdline args. This one definitely works:

Code: Select all

filebot -script "http://filebot.sourceforge.net/data/shell/banners.groovy" -trust-script /path/to/media/
(just copy & paste into your shell, filebot will fetch the script from this location)

This the banners.xml from thetvdb, lookup the bannerType/bannerType2 values you want and then call fetchBanner() with that:
banners.zip
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: forcing tv series

Post by rednoah »

In the CLI you can force the series/query via the --q option.

In the GUI there is two ways:
1. SHIFT-CLICK the datasource to force manual series/query input
2. Fetch episode list in "Episodes" panel and than drag-n-drop everything to the "New Names" list

btw if there's a nfo file with imdb link or thetvdb link FileBot will pick that up as part of the series name auto-detection in both CLI and GUI.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

if there's still a problem with starting into the CLI, which could very well be (i only test on my windows machine :P), try running the jar directly:

Code: Select all

java -jar FileBot.jar -script ...
:idea: Please read the FAQ and How to Request Help.
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

EDIT: heheh you managed to add 2 posts before i even noticed and tried it :)

kk got it working on linux (i had to use the java -jar filebot option to get it to work in the CLI mode for some reason..).
it seemd to work with one series (d.grey man) although it couldnt find the series
for the other folders it gave me this error:

Processing /home/zeltak/media/videos/Survivorman
ScriptException: javax.script.ScriptException: java.lang.NullPointerException
Failure (°_°)


thx again

Zeltak
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

btw

the shift click data source has already been added to the filbot manual i started working on when the boss here at work isnt watching ;-)

z.
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

I guess that could happen if series name auto-detection doesn't work. You can use the folder name as fallback like this:

Code: Select all

if (seriesName == null) {
	println "Failed to auto-detect series name: Query by ${dir.name} instead"
	seriesName = dir.name
}
	
def options = TheTVDB.search(seriesName)
...
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

aiya... is the linux startup script broken again? can you check filebot.sh and see if you can make it work?
:idea: Please read the FAQ and How to Request Help.
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

thx rednoah

unfortunanlty my coding skills are zero so i couldnt really make sense of the fallback code you posted, but ill try to look into it later on when at home.

i dont seem to have a filebot.sh on my system (using Arch linux).

thx

Zeltak
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

I updated the script online as well. Just download again.

Right, I'm not building official packages for that. You can request for them to update the package and use a proper startup script that'll pass through all the arguments. The one I provide in the .deb works.

@see
http://filebot.svn.sourceforge.net/view ... filebot.sh
:idea: Please read the FAQ and How to Request Help.
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

wow amazing works like a charm :)

This seriously is a killer feature..i dont know if you want to but this could generate a shit-ton of users/traffic from xbmc users.... :) (especially if you integrate it in the gui while you do the renaming)
btw can it also download the fanart ?
(IE this image type: http://thetvdb.com/banners/fanart/original/80574-1.jpg)

i cant tell you enough how im amazed by filebot..its the best damm secret on the net :) ill help spread the word (if you want to ofc :) in the linux world (im pretty active in #archlinux, #gmpc, #subtle , #mhythbuntu etc communities)

also i definantly want to contribute to the project (again with my limited time constraints :) ) what area do you feel needs help (keeping in mind i have zero programming skills)? documentation? art? preaching the wonders of filebot to the masses ;) ? let me know

thx again

Z.
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

Sure preacher man, go ahead! The more people FileBot saves time, the more it's worth for me to spend my time on this. ;)

Manual / Docs is probably a good idea as well. People keep telling me FileBot is complicated... often people don't realize how simple it actually is, that's why a kinda "FileBot for Dummys :P" might actually be very helpful for lots of people. Anyway, any help is appreciated. If u want I can make u moderator, than u can also edit the "Manual" page here in the forums.

btw updated banners.groovy again, added all the common fanart/poster types i noticed when checking through that banners.xml

PS: i can make that artwork stuff into a proper cmdline options once this works well. u know how to name files so xbmc will find them, what artwork to download, where to put it, ...
:idea: Please read the FAQ and How to Request Help.
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

thx again :)

Sure i can be a moderator if youd like. but i think it may be easier for me to create the help file localy and then upload it or send it over to you when done. i will work on the manual during the X-mas holiday. I have already started the preaching though ;-)

i have a final question/suggestion (promise :) ) about the dl of movie/TV show art.since its a renaming program can we have filebot rename the art dowloaded with the same name as the series/movies ?
IE while dl the series Lost and getting FILENAME_FANART.jpeg convert it SERIESNAME-fanart.jpg and the banner from BANNER.jpg to folder.jpg (these are two common standart names for image name folder.jpg and NAME-fanart.jpg).\
also can we limit the dl to only the highest catagory (highest res) for each banner/fanart? currently it downloads all images which could be quite alot in some series

thx again

P.s let me know if im annoying you with all these suggestions and ill just mute myself ;-)
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

You mean u want to change how this script names downloads artwork? Sure, the naming scheme is the first line in fetchBanner(...).

In can adjust that tomorrow. Give me some examples on how it's named right now and how it should be named instead.

Right now it's only download 4 images for the series and 2 per season. Right now it's just a script. I'm sure u can find the few lines you need to delete to only download what you want. ;) Hint: each fetchBanner(...) downloads one image ;)
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

Updated the script and simplified naming (but will also only support at most 1 show per folder because of the overlapping filenames)
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

Added alpha support for creating .nfo files. Requires r780. I already updated banners.groovy.
:idea: Please read the FAQ and How to Request Help.
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

Morning Rednoah :)

just woke up to a nice surprise :) thx for the nfo addition

i have tried it and as true alpha title it crashes/fails:

java -jar /home/zeltak/programs/filebot/filebot.jar -script "http://filebot.sourceforge.net/data/she ... ers.groovy" -trust-script /home/zeltak/media/videos/An\ Idiot\ Abroad
Processing /home/zeltak/media/videos/An Idiot Abroad
Failed to detect series name from files -> Query by An Idiot Abroad instead
Fetch nfo and banners for An Idiot Abroad / Season [1]
ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: net.sourceforge.filebot.web.TheTVDBClient.getSeriesInfo() is applicable for argument types: (net.sourceforge.filebot.web.TheTVDBClient$TheTVDBSearchResult, java.util.Locale) values: [An Idiot Abroad, en]
Possible solutions: getSeriesRecord(net.sourceforge.filebot.web.TheTVDBClient$TheTVDBSearchResult, java.util.Locale)
Failure (°_°)

Also related for some reason the prev script works great for banner/fanart for local folder but i couldnt get it to work over my netwroks (both nfs and samaba), maybe its the long path names but it couldnt find any series. i tried this to try and 'force' a series but had no sucess, im sure im doing something wrong but so far ive issued this command to 'force' a series for a series on my Server:

java -jar /home/zeltak/programs/filebot/filebot.jar -script "http://filebot.sourceforge.net/data/she ... ers.groovy" -trust-script --q "Dexter" /media/raid/Videos/TV/Dexter

is that the correct syntax?

Best and thx alot again, as i said you never cease to amaze me with your coding skillz ;-)

Zeltak
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

Did you update to r780? Looks like one of the new methods I added today just isn't there.
https://sourceforge.net/projects/filebo ... ebot/HEAD/

If you're using smb:// urls that doesn't work 'cause Java doesn't work with that as filepath. But if it's mounted into the filesystem, then it'll look like any other folder to applications, local or remote doesn't matter.

Yeah, --q is a default for all the standard CLI functions and this script doesn't even use any of those. So for this script it has no effect at all.

You can have manual input if u want, just replace:

Code: Select all

println "Failed to detect series name from files -> Query by ${dir.name} instead"
seriesName = dir.name
with:

Code: Select all

print "Enter Query: "
seriesName = console.readLine()
(just replacing the "user folder name" fallback with "ask user" fallback)

u got up, i'm just about to go to bed over here :P
:idea: Please read the FAQ and How to Request Help.
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

Hi again (and good morning? :))

where do you live btw? i live in Boston, so by the time zone diffrences i guess you live somewhere very east of here :)

oh before i forget, is there a roadmap you have for the project? i can add that to the FAQ or other area or in the documentaion file? (and it also will stop users like me from bugging you with request you already plan on implementing ;-))

i have tried to modify the script as you said but as always i failed misrably ;-)..here is how it looks after i changed it:

http://pastebin.com/zRb37z91

Note to myself..start learning some basic java ;-)

right now it just hangs there kinda stuck and dosent seem to dl either the fanart or the nfo file

Also regarding the downloaded files..would it be possible: a)to specify that the fanart and general series image (banner) go to the root folder of the series? (currently the script sticks it in the season 1 folder). i personally dont need the per season images (although some users might like that) but these can stay in the season folder.
Btw currently the nfo file the script dloads isnt formated to the XBMC xml format so it dosent help much but i guess its cool its in the code as in the future it can be uses that to extend the filebot features :)

i know filebot is mainly a file renaming util but honeslty it does with such ease (the downloding images and nfo) what all the other gazillion usless bloated xbmc 'helper' apps do so bad.
If (and only if you decide/want) you will want to expand filebot it in that direction (a renamer and image/nfo organizer) in the future it could really casue a real stir on the xbmc community :) but even as is filebot rocks so much :)

thx alot again rednoa, i trully appriciate all your hard work!!

Zeltak
User avatar
rednoah
The Source
Posts: 18823
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: thank you and 2 requests

Post by rednoah »

zeltak wrote:Hi again (and good morning? :))
where do you live btw? i live in Boston, so by the time zone diffrences i guess you live somewhere very east of here :)
早上好呀!刚起床了。。。haha, yep, over in Beijing studying the mandarin. 哈哈
zeltak wrote:oh before i forget, is there a roadmap you have for the project? i can add that to the FAQ or other area or in the documentaion file? (and it also will stop users like me from bugging you with request you already plan on implementing ;-))
The roadmap I got is "Subtitle Upload" but noboby ever seems to request that one, so I don't much work on that. But it's like with banners/nfo, the internal code is basically all there. Just not tested. Making a simple & smart GUI is the hard part anyway.
zeltak wrote: i have tried to modify the script as you said but as always i failed misrably ;-)..here is how it looks after i changed it:
right now it just hangs there kinda stuck and dosent seem to dl either the fanart or the nfo file
That looks good. You realize that the point of console.readLine() is to read user input? It will wait for you to enter something. So after "Enter Query:". It's waiting for you to type and enter something, which will then be used as query.
zeltak wrote: Note to myself..start learning some basic java ;-)
Read up on some Groovy, it's like Java on steroids. ;)
zeltak wrote: Also regarding the downloaded files..would it be possible: a)to specify that the fanart and general series image (banner) go to the root folder of the series? (currently the script sticks it in the season 1 folder). i personally dont need the per season images (although some users might like that) but these can stay in the season folder.
So the seasons parent folder is always the series folder? Then it's no problem.

Code: Select all

// fetch series banner, fanart, posters, etc
	fetchBanner(dir, "../folder", series, "poster", "680x1000")
	fetchBanner(dir, "../banner", series, "series", "graphical")
	
	// fetch highest resolution fanart
	["1920x1080", "1280x720"].findResult{ bannerType2 -> fetchBanner(dir, "../fanart", series, "fanart", bannerType2) }
	
	// fetch season banners
	seasons.each { s ->
		fetchBanner(dir, "folder", series, "season", "season", s)
		fetchBanner(dir, "banner", series, "season", "seasonwide", s)
	}
Notice how I just added a "../" to the filename parameter of fetchBanner(). That means go down to the parent folder and then put the file there.

zeltak wrote: Btw currently the nfo file the script dloads isnt formated to the XBMC xml format so it dosent help much but i guess its cool its in the code as in the future it can be uses that to extend the filebot features :)
That can easly be changed. Paste me a sample xml and I'll change the format to that.
:idea: Please read the FAQ and How to Request Help.
zeltak
Posts: 23
Joined: 19 Dec 2011, 21:17

Re: thank you and 2 requests

Post by zeltak »

Hi again

here is a link to the nfo file is structured for movies:

http://wiki.xbmc.org/index.php?title=Im ... g_XML_data

and TV

http://wiki.xbmc.org/index.php?title=Im ... y#TV_Shows

"You realize that the point of console.readLine() is to read user input?"
i am not that neewbish to miss that..lol..there is no Enter Query:". or anything like that it just hangs :)

btw also found this in the XBMC wiki:

You can also have your own custom FanArt background:

TV shows via fanart.jpg in the TV show folder.
Movies via moviefilename-fanart.jpg in the same folder as the 'moviefilename' media file.


when the xbmc killer script is ready and polishes (i can test it as much as you need) should i pimp it on the xbmc forum? i assume that will generate some buzz for sure with people using linux who really have no current solution :)

P.S 2 small Ui usability improvment suggestions:
1)IMHO a nice thing would be to use ctrl-click to match on latest used data source instead of choosing each time again
2)add a clear all button to the rename>original file are to quickly clear all prev data and start from scratch

thx again

Z.
Last edited by zeltak on 22 Dec 2011, 03:23, edited 2 times in total.
Post Reply