POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Add Blacklisted Terms and Improve Movie / Series Detecti

Post by rednoah »

Movie Machete (2010)
www.imdb.com/title/tt0985694

6min TV Series Machete (2011)
http://www.imdb.com/title/tt2112196/

I'm pretty sure we're taking about Machete (2010) here. Works as expected. Better than even. :D
:idea: Please read the FAQ and How to Request Help.
isadic
Posts: 3
Joined: 25 Apr 2013, 12:17

Re: Add Blacklisted Terms and Improve Movie / Series Detecti

Post by isadic »

Yes I was talking about the film...and yes now is working...I'm a little confused about that xD
I don't know why before posting my report the software didn't recognized the film.
Thanks a lot for the support xD
wisomtooth
Posts: 6
Joined: 02 May 2013, 05:49

Re: [SNIPPET] Put the "The" at the end

Post by wisomtooth »

Can we integrate this into that:
http://www.filebot.net/forums/viewtopic ... &t=5#p2211

How?
wisomtooth
Posts: 6
Joined: 02 May 2013, 05:49

Re: How about sharing your CLI scripts?

Post by wisomtooth »

On "Rename All Media Folder by Folder":

1. The script is not renaming the media files inside folders for me.

2. Some titles get renamed to their English equivalent, some don't (even when available).

e.g. "Kasi az gorbehaye irani khabar nadareh" doesn't rename to "No One Knows About Persian Cats" (http://www.imdb.com/title/tt1426378/)

I'm using IMDB as source.
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [SNIPPET] Put the "The" at the end

Post by rednoah »

Code: Select all

--format "your/format/anything"
You just need to make sure you correctly pass the value and escape and quote things as necessary.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing your CLI scripts?

Post by rednoah »

1. It's not supposed to. Just run it twice if you first wanna rename folders and then files. If you restructure your stuff you'd normally define a format for that and move everything into the new structure rather then renaming files in place.

2. Depends on the database you're using. TMDB respects the --lang option. With IMDb you'll get what you get regardless of your prefs.
:idea: Please read the FAQ and How to Request Help.
Opthimus
Posts: 1
Joined: 06 May 2013, 10:40

Re: Automated Media Center

Post by Opthimus »

You are a life saver! XD

Thank you so much!
jtrotter
Posts: 1
Joined: 13 May 2013, 23:29

Re: Automated Media Center

Post by jtrotter »

I have been using this successfully to rename and move my downloads to a specific location. It was working well, and it still is when i download a torrent manually. however, it no longer works with my RSS feed. When a torrent is downloaded through my feed into the same place as a manual torrent, the filebot script runs but it does not rename or move the file. I'm not sure what is going on. any thoughts? I'm using utorrent. Thanks.
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Automated Media Center

Post by rednoah »

*** If you need help start a new thread and always include cmdline output! ***
Definitely doesn't have anything to do with RSS feeds or whatnot. It's a simple cmdline tool that processes files.
:idea: Please read the FAQ and How to Request Help.
AnIdeaWithin
Posts: 6
Joined: 12 May 2013, 16:29

Re: Add Blacklisted Terms and Improve Movie / Series Detecti

Post by AnIdeaWithin »

How about allowing the user to add user defined blacklist terms? I'm imagining that in a local "user-query-blacklist.txt". That way, filebot could be tailored to individual system infrastructures. On my NAS, e.g., I keep the unprocessed files in folders à la "_to_be_sorted_SERIES" or "_to_be_sorted_MOVIES", and filebot tries to match the "to" of that folder name, which leads to a whole bunch of utterly unwanted matches. Easy workaround: Get rid of the underscores. There's no "tobesortedXXX" available in the movie / series DBs, so it doesn't try to match those. But still, I'd be quite happy if I could tinker with the settings on my end in this case, as I don't see it would be much use to include this highly individual path name choice in the general public rules.
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Add Blacklisted Terms and Improve Movie / Series Detecti

Post by rednoah »

Added to.be.sorted pattern.

You can always override the *.properties files in the jar and then use your own data files. But it's already full of individual stuff. However wierd it may be, I'm sure there's lots of other people that use the same naming. So I don't mind adding things like this. Makes sense to me.
:idea: Please read the FAQ and How to Request Help.
AnIdeaWithin
Posts: 6
Joined: 12 May 2013, 16:29

Re: Add Blacklisted Terms and Improve Movie / Series Detecti

Post by AnIdeaWithin »

Somehow doesn't seem "clean" to me, but it's your baby, and if it works for me, I won't complain :)

Anyway, all the superspeedy and HELPFUL support convinced me to make a donation. Keep up the good work!
AnIdeaWithin
Posts: 6
Joined: 12 May 2013, 16:29

Transmission on Synology NAS

Post by AnIdeaWithin »

Hint for Synology users: The transmission installation sets up a user "transmission" with his own home dir. This home dir is "/usr/local/transmission/var", thus the config files can be found there:

Code: Select all

vi /usr/local/transmission/var/settings.json
This will work only if logged in as root. As admin, you'll have to prefix that with sudo, as most linux users will already know (sudo requires some extra setup on Synology though, you'll have to google for that or pm me).
@rednoah: If you think this is the wrong place for this extra info, feel free to move or delete the posting.
d3x
Posts: 7
Joined: 25 May 2013, 03:53

Re: How about sharing your CLI scripts?

Post by d3x »

http://filebot.net/scripts/artwork.tmdb.groovy

I have all my movies in one folder. I am trying to modify the script to work with my setup but am failing horribly. I also only want the XML information and a single poster for each both (named the same as the movie just with .xml and .jpg extensions.)
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing your CLI scripts?

Post by rednoah »

The artwork.* scripts define mostly how the folder structure is traversed and how movie/series detection works. The actual artwork downloading and naming is all in the lib/htpc include.

Best thing to do is to organize each movie into it's own folder.
:idea: Please read the FAQ and How to Request Help.
d3x
Posts: 7
Joined: 25 May 2013, 03:53

Re: How about sharing your CLI scripts?

Post by d3x »

I can read the scripts no problem I just can't write changes very well as my Java is weak and Groovy is non existent.

Code: Select all

options = options.sortBySimilarity(query, { it.name })
Where is sortBySimilarity defined? Does it.name really need the { and } around it?
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing your CLI scripts?

Post by rednoah »

Here's the stuff I pre-define:
https://sourceforge.net/p/filebot/code/ ... force=True

The { ... } is the toString function used for comparison. It's passing in a function, not a value. So you need the { ... }
:idea: Please read the FAQ and How to Request Help.
d3x
Posts: 7
Joined: 25 May 2013, 03:53

Re: How about sharing your CLI scripts?

Post by d3x »

Code: Select all

args.getFiles{ it.isVideo() }
.each{
def movieName = detectMovie(it, false)
def movieInfo = TheMovieDB.searchMovie(movieName.name, _args.locale).sortBySimilarity(movieName.name, {it.name})[0]
println movieInfo
}
Seems to be working okay except Kiss.Kiss.Bang.Bang.2005.DVDRip.x264.AC3-SiC.mp4 is being identified as Kiss Kiss... Bang Bang (1966)
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing your CLI scripts?

Post by rednoah »

You first have filebot correctly detect it as Kiss Kiss Bang Bang (2005) via detectMovie(), then you go on and take only the movie name Kiss Kiss Bang Bang and do another search, that is completely useless btw, at best giving you the same result, at worst a different movie.

You only need detectMovie() and it'll get you the best-guess movie object with name/year/tmdbid.
:idea: Please read the FAQ and How to Request Help.
d3x
Posts: 7
Joined: 25 May 2013, 03:53

Re: How about sharing your CLI scripts?

Post by d3x »

Code: Select all

args.getFiles{ it.isVideo() }
.each{
def movieName = detectMovie(it, false)
println movieName
def movieInfo = TheMovieDB.searchMovie(movieName.name, _args.locale)
println movieInfo
println movieInfo.sortBySimilarity(movieName.toString(), {it.name})
}
Kiss Kiss Bang Bang (2005)
[Kiss Kiss... Bang Bang (1966), Kiss Kiss Bang Bang (2005), Kiss Kiss (Bang Bang) (2001)]
[Kiss Kiss... Bang Bang (1966), Kiss Kiss Bang Bang (2005), Kiss Kiss (Bang Bang) (2001)]
sortBySimilarity is not working movieName.toString() is exactly "Kiss Kiss Bang Bang (2005)" yet it does not move it to the front of array.
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing your CLI scripts?

Post by rednoah »

It's sorting by the text similarity of movieName.toString() and it.name, since the ... is ignored both match equally by name, and since you do it.name you specifically make sure the year part is not part of the equasion. Just do sortBySimilarity(string) and let it use the default toString function for the comparison value.

Also, detectMovie already gives you the best result. If you use detectMovie it's a complete waste to do a TMDb.searchMovie afterwards. It's probably called internally as part of detectMovie already anyway, relevance sorting as well.
:idea: Please read the FAQ and How to Request Help.
d3x
Posts: 7
Joined: 25 May 2013, 03:53

Re: How about sharing your CLI scripts?

Post by d3x »

I am doing TMDb.searchMovie() because I would like to pull a couple more details but I think I will just write the movie name to file then use a more reasonable language to do the rest like I had originally planned.

Code: Select all

import groovy.json.JsonBuilder
args.getFiles{ it.isVideo() }.each{
 def f = new File(it.name[0..-5] + '.json')
 if (f.exists())
  return
 def m = detectMovie(it, false)
 f.write(new JsonBuilder(m).toPrettyString())
}
Thanks for all the help and fast replies

Edit: I just realized detectMovie gets the tmdbId so I can just use TheMovieDB.getMovie() lol
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing your CLI scripts?

Post by rednoah »

searchMovie only gives you name/year/id movie descriptors, this will give you all the metadata:

Code: Select all

println TheMovieDB.getMovieInfo(detectMovie(f, false), Locale.ENGLISH)
:idea: Please read the FAQ and How to Request Help.
sjboyd891
Posts: 11
Joined: 25 Apr 2013, 03:27

Re: [CODE] Force series for specific files

Post by sjboyd891 »

rednoah wrote:Sometimes it might be useful to override series auto-detection by forcing a series title for a specific set of files. This is how you do it. Only process a certain set of files via file parameter and force the series title via the query parameter.

Code: Select all

rename(file: args.getFiles{ it =~ /(?i:colbert.report)/}, query: "The Colbert Report", db: "TheTVDB")
rename(file: args.getFiles{ it =~ /(?i:daily.show)/}, query: "The Daily Show with Jon Stewart", db: "TheTVDB")
...
Where do I use this script? Do I use it in the same Filebot regular cmd line or with utorrent?
User avatar
rednoah
The Source
Posts: 19140
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [CODE] Examples and Snippets

Post by rednoah »

That's just code snippets. You write your script.groovy and then run it with -script your/script.groovy
:idea: Please read the FAQ and How to Request Help.
Post Reply