POSTBUCKET - where random posts in unrelated topics go
Re: Exclude Blacklist & Series-Mappings
No. This one will require a little bit of time and testing. It's on my backlog for the weekend though.
EDIT:
Implemented but not tested for regression issues.
EDIT:
Implemented but not tested for regression issues.
-
- Posts: 3
- Joined: 08 Aug 2016, 18:23
Re: [SNAP] Grant access to /media
only 25 minutes after a reinstall I realized this is why it wasn't working!
Re: Q&A for n00bs
Hey guys,
I have been using Filebot for some time now but only drag and drop style. So now im moving on to the automated worlds. Please bear with me.
I have started off gently by creating a .bat-file that gets run atomatically when my files get extracted by another software im using. So when the extraction is complete is calls the .bat-script and executes the line below.
This is what i have started out with
Kinda simple, nothing fancy. But there is a few things here that im wondering over.
1. Can I define the script to use any of my presets I have made in Filebot? Some of my swedish TV-Shows get named in english. I want them in Swedish. At the moment i have 2 presets. TV and Movie.
2. Is it possible to make the script to copy the files directly to N:\Done\TV Shows. Instead of how its doing now N:\Done\Tv Shows\ Tvshowname\Season13\
I think that will be good for now.
Thanks in advanced!
I have been using Filebot for some time now but only drag and drop style. So now im moving on to the automated worlds. Please bear with me.
I have started off gently by creating a .bat-file that gets run atomatically when my files get extracted by another software im using. So when the extraction is complete is calls the .bat-script and executes the line below.
This is what i have started out with
Code: Select all
filebot -script fn:amc --output "N:\Done" --action copy -non-strict "N:\TV-IN" --log-file amc.log --def skipExtract=y --def excludeList=amc.txt
1. Can I define the script to use any of my presets I have made in Filebot? Some of my swedish TV-Shows get named in english. I want them in Swedish. At the moment i have 2 presets. TV and Movie.
2. Is it possible to make the script to copy the files directly to N:\Done\TV Shows. Instead of how its doing now N:\Done\Tv Shows\ Tvshowname\Season13\
I think that will be good for now.
Thanks in advanced!
Re: Q&A for n00bs
1.
Yes, you can set custom formats and language preferences via command-line options.
2.
I think you're talking about a custom format that might look something like this:
Yes, you can set custom formats and language preferences via command-line options.
2.
I think you're talking about a custom format that might look something like this:
Code: Select all
N:\Done\{plex.name}
Re: Q&A for n00bs
Thanks for you fast reply!rednoah wrote: ↑05 Oct 2017, 20:10 1.
Yes, you can set custom formats and language preferences via command-line options.
2.
I think you're talking about a custom format that might look something like this:Code: Select all
N:\Done\{plex.name}
I will check up on the custom formats and language.
Regarding the custom formats, I did a little test and edited my line as you proposed.
Code: Select all
filebot -script fn:amc --output "N:\Done\{plex.name}" --action copy -non-strict "N:\TV-IN" --log-file amc.log --def skipExtract=y --def excludeList=amc.txt
Illegal usage: output folder must exist and must be a directory: N:\Done\{plex.name}
Re: Q&A for n00bs
1.
--output and --format have distinctively different meanings and functions.
e.g.
@see https://www.filebot.net/cli.html
2.
Since you're using the amc script, you'll want to read Change how files will be organized and renamed because you'll need to pass in a custom format for each media type via the --def <type>Format options.
--output and --format have distinctively different meanings and functions.
e.g.
Code: Select all
-rename --output N:\Done --format {plex.name}
2.
Since you're using the amc script, you'll want to read Change how files will be organized and renamed because you'll need to pass in a custom format for each media type via the --def <type>Format options.
Re: Batch Rename any type of file
Thanks!. I tested it out using the example and it worked fine. However, when I use it with my XML file (I converted the JSON > XML), it says my format is not correct.
I use the same format and code as the example
I use the same format and code as the example
Re: Batch Rename any type of file
The example here is very specific. You can learn from it, but you can't copy-and-paste and expect it to work in your case. 
If you start by learning how to parse JSON, then you're on the right track:
http://docs.groovy-lang.org/latest/html ... urper.html
You can hire me though, but you'd need to write down exactly what you need, with examples and example data.

If you start by learning how to parse JSON, then you're on the right track:
http://docs.groovy-lang.org/latest/html ... urper.html

Re: Batch Rename any type of file
Well, I wanted to try it in XML since I wanted to use your example, but not coming up with anything.
that should return the title but it's not working as its supposed to. I don't have the money to hire :\ it seems expensive 
Code: Select all
def fnn = fn
xml = new XmlSlurper().parse(folder+'/mov.xml')
xml.'**'.find { it.name() == 'scid' && it.text() == fnn}*.parent()*.title*.text()

Re: Batch Rename any type of file
Just debug step by step. Does it parse? Is the first element what you think it should be?
You can prototype and debug these things in the Format Editor in minutes. Just try things and narrow down which exact piece of code isn't working as expected.
You can prototype and debug these things in the Format Editor in minutes. Just try things and narrow down which exact piece of code isn't working as expected.

Re: [SNAP] Grant access to /media
I have a NAS mounted using cifs and Im not able to access the files on it... Is that possible?
Im using
/etc/fstab with the config
I have already tried --devmode
and
Regards
Im using
/etc/fstab with the config
Code: Select all
//192.168.1.14/nas /media/nas cifs uid=user,gid=user,iocharset=utf8,file_mode=0660,dir_mode=0770,username=username,password=password 0 0
and
Code: Select all
sudo snap connect filebot:removable-media
sudo snap connect filebot:network
sudo snap connect filebot:network-bind
Re: Batch Rename any type of file
This is so useful. Thanks for the tutorial Noah, helps newbies like me a lot.
-
- Posts: 16
- Joined: 02 Jun 2017, 01:04
Re: How about sharing our format expressions?
Have a basic script that uses the groovy setup for 4K content going into its own folder for Movies 4K & TV Shows 4K based on 2160p in file name else it goes to regular folders:
Thinking of expanding this to Movies 3D, just need to figure out how to do an "OR".
Code: Select all
#!/bin/bash
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"
TORRENT_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
TORRENT_NAME="$TR_TORRENT_NAME"
TORRENT_LABEL="N/A"
# Subtitle language
SUBLANG=en
SKIP_EXTRACT=n
MUSIC=y
filebot -script /opt/filebot/scripts/amc.groovy \
--output "$HOME/media" \
-non-strict --encoding utf8 --log all --log-file amc-transmission.log --action copy --conflict override \
--def artwork=false ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" subtitles=$SUBLANG \
--def "movieFormat={fn =~ /2160p/ ? 'Movies 4K' : 'Movies'}/{n} ({y})/{n} {hd} {vc} {vf} ({y}){' CD'+pi}{'.'+lang}" \
--def "seriesFormat={fn =~ /2160p/ ? 'TV Shows 4K' : 'TV Shows'}/{n}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {hd} - {vc} - {vf} - {t.replaceAll(/[\`´''ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part \$1')}{'.'+lang}" \
extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
Re: How about sharing our format expressions?
Assuming that "3D" is part of the filename, this should do:
Code: Select all
{fn =~ /3D|2160p/ ? 'Movies 4K' : 'Movies'}
-
- Posts: 16
- Joined: 02 Jun 2017, 01:04
Re: How about sharing our format expressions?
Thanks.
This is useful to know that the "OR" can be used like that if i needed to trigger variants for the Folder Movies 4K or Movies 3D.
Was thinking the "OR" could be used like:
IF filename has 3D it goes to folder named "Movies 3D" (1920x1080P)
IF filename has 2160p it goes to folder named "Movies 4K" (3840x2160P)
ELSE it goes to folder named "Movies" (< 1920x1080P)
Would it be this work?
Thanks rednoah
This is useful to know that the "OR" can be used like that if i needed to trigger variants for the Folder Movies 4K or Movies 3D.
Was thinking the "OR" could be used like:
IF filename has 3D it goes to folder named "Movies 3D" (1920x1080P)
IF filename has 2160p it goes to folder named "Movies 4K" (3840x2160P)
ELSE it goes to folder named "Movies" (< 1920x1080P)
Would it be this work?
Code: Select all
--def "movieFormat={fn =~ /2160p|4K|4k|UHD/ ? 'Movies 4K' : 'Movies'}{fn =~ /3D|3d|3dhsbs|H-SBS|3dhou|H-OU/ ? 'Movies 3D' : 'Movies'}/{n} ({y})/{n} {hd} {vc} {vf} ({y}){' CD'+pi}{'.'+lang}" \
-
- Posts: 1
- Joined: 14 Dec 2017, 16:48
Re: [SNAP] Grant access to /media
Any idea how to get filebot to see mounted devices? Its on automount if that makes a difference.
Re: [SNAP] Grant access to /media
It should work out of the box. What exactly isn't working?
Re: How about sharing our format expressions?
More like this:
You can nest ternary expressions and have lots of if-then-else that way.
Code: Select all
fn =~ /2160p/ ? 'Movies 4K' : fn =~ /3D/ ? 'Movies 3D' : 'Movies'
-
- Posts: 16
- Joined: 02 Jun 2017, 01:04
Re: How about sharing our format expressions?
Thanks rednoah, this perfect for me!
My new script:
My new script:
Code: Select all
#!/bin/bash
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE="en_US.UTF-8"
TORRENT_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
TORRENT_NAME="$TR_TORRENT_NAME"
TORRENT_LABEL="N/A"
# Subtitle language
SUBLANG=en
SKIP_EXTRACT=n
MUSIC=y
filebot -script /opt/filebot/scripts/amc.groovy \
--output "$HOME/media" \
-non-strict --encoding utf8 --log all --log-file amc-transmission.log --action copy --conflict override \
--def artwork=false ut_kind=multi "ut_dir=$TORRENT_PATH" "ut_title=$TORRENT_NAME" subtitles=$SUBLANG \
--def "movieFormat={fn =~ /2160p|4K|4k|UHD/ ? 'Movies 4K' : fn =~ /3D|3d|3dhsbs|H-SBS|3dhou|H-OU/ ? 'Movies 3D' : 'Movies'}/{n} ({y})/{n} {hd} {vc} {vf} ({y}){' CD'+pi}{'.'+lang}" \
--def "seriesFormat={fn =~ /2160p|4K|4k|UHD/ ? 'TV Shows 4K' : 'TV Shows'}/{n}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {hd} - {vc} - {vf} - {t.replaceAll(/[\`´‘’ʻ]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part \$1')}{'.'+lang}" \
extractFolder="$HOME/files/_extracted" music=$MUSIC skipExtract=$SKIP_EXTRACT &
Re: Exclude Blacklist & Series-Mappings
Hi rednoah, thanks for the awesome work.
A new series by Amazon is not in tvdb, "Jean-Claude Van Johnson" : http://www.imdb.com/title/tt6682754/
Am I at the correct place to request this ? Thanks a lot,
A new series by Amazon is not in tvdb, "Jean-Claude Van Johnson" : http://www.imdb.com/title/tt6682754/
Am I at the correct place to request this ? Thanks a lot,
Re: Exclude Blacklist & Series-Mappings
You can go to TheTVDB if you want to add or edit series entries:
https://www.thetvdb.com/
This thread is for adding abbreviations that are not in TheTVDB.
https://www.thetvdb.com/
This thread is for adding abbreviations that are not in TheTVDB.
Re: How about sharing our format expressions?
I am absolutely no expert when it comes doing this, but am slowly learning and not trying to over complicate it for myself.
I mainly use FileBot for movies and nothing else. I've essentially used bits from already posted and kind of made it work for my own needs.
This is what I currently have and is fine but I have all of my movies stored between two different drives labeled Y and W. I saw the snippet of code to tell Filebot to essentially use whichever drive has more free space to decide where to store said movies.
I've tried to make this work with my current set up but it comes out weird. I've changed the TV part to movies and what I had for movies but it doesn't seem to work right.
I attempted something like this, but it puts the ({vf}) as part of the movies folder title instead of using the command for the video size and it looks like that snippet has stuff for tv shows.
Anyone mind correcting me on this? I'd appreciate any help I can get to make this right. I also am curious about the drive size code, does it only scan the drives on the initial scan of the movie titles and move them into the same folder or does it take into account each movie as it fills up the drive?
I mainly use FileBot for movies and nothing else. I've essentially used bits from already posted and kind of made it work for my own needs.
Code: Select all
W:\Movies ({vf})\{genre}\{primarytitle} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} [{vf}] [{ac}{fn.match("-HD.MA.")+af}]/{primarytitle} ({y}) {vc}{" (CD$pi)"}{' '+lang}
Code: Select all
{['C:', 'D:', 'E:'].collect{ (it+'/TV/'+n) as File }.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode}
Code: Select all
{['Y:', 'W:'].collect{ (it+'/Movies ({vf})/'+n) as File }.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode}\{genre}\{primarytitle} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} [{vf}] [{ac}{fn.match("-HD.MA.")+af}]/{primarytitle} ({y}) {vc}{" (CD$pi)"}{' '+lang}
Anyone mind correcting me on this? I'd appreciate any help I can get to make this right. I also am curious about the drive size code, does it only scan the drives on the initial scan of the movie titles and move them into the same folder or does it take into account each movie as it fills up the drive?
Re: How about sharing our format expressions?
Literally after sharing this, I tinkered with it a bit more and discovered this.
It seems to be working correctly as of right now. Does this look right?
Code: Select all
{['Y:', 'W:'].collect{ (it+'/Movies') as File }.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()} ({vf})\{genre}\{primarytitle} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} [{vf}] [{ac}{fn.match("-HD.MA.")+af}]/{primarytitle} ({y}) {vc}{" (CD$pi)"}{' '+lang}
-
- Posts: 33
- Joined: 15 Jun 2017, 00:46
Re: How about sharing our format expressions?
I need some help. There are many titles that have question marks in them "?". How do I get the "?" removed from the title?
For example, Anime:
ButI can't get it to work for:
"World End: What do you do at the end of the world? Are you busy? Will you save us?"
Thanks.
For example, Anime:
Code: Select all
G:\My Videos\Anime\{n.replace(':',' -').replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, " -").replaceTrailingBrackets()}\{'Season '+s}\{n.replace(':',' -').replaceTrailingBrackets()} - {s+'x'}{e.pad(2)} - {t.replace(':',' -').replaceAll(/[!?.*]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}
"World End: What do you do at the end of the world? Are you busy? Will you save us?"
Thanks.
Re: How about sharing our format expressions?
e.g. replace ? with nothing:
Code: Select all
t.replace('?', '')