Page 22 of 42
Re: How about sharing our format expressions?
Posted: 01 Jan 2018, 22:18
by Hercules40
Yeah, I get that. And of course, instead of the title "t", I need to change the name "n". So, I tried this expression, but can anyone tell me why it doesn't work?
Code: Select all
\Anime\{n.replace(':',' -').replace('?','').replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, " -").replaceTrailingBrackets()}\{'Season '+s}\{n.replace(':',' -').replaceTrailingBrackets()} - {s+'x'}{e.pad(2)} - {t.replace(':',' -').replace('?','').replaceAll(/[!?.*]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}
Re: How about sharing our format expressions?
Posted: 01 Jan 2018, 22:41
by rednoah
It works. Why would you think that it doesn't work? What results do you get?
Test Case:
Code: Select all
{'Is this a test?'.replace('?', '')}
Re: How about sharing our format expressions?
Posted: 01 Jan 2018, 23:55
by kim
Look at your output:
/Anime/World End - What Do You Do at the End of the World Are You Busy Will You Save Us/Season 1/World End - What Do You Do at the End of the World? Are You Busy? Will You Save Us? - 1x12 - The Happiest Girl in the World
this is easier to see like so
/Anime/ = folder
World End - What Do You Do at the End of the World Are You Busy Will You Save Us = n (folder)
/
Season 1 = folder
/
World End - What Do You Do at the End of the World? Are You Busy? Will You Save Us? = n (filename)
-
1x12 = s00e00 / sxe.pad(2)
-
The Happiest Girl in the World = t
for every n (folder or filename) of t you need to remove/replace e.g. '?' from the full path, you see ?
Code: Select all
{n.replace(':',' -').replaceAll(/[?]/).replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, " -").replaceTrailingBrackets()}\{'Season '+s}\{n.replace(':',' -').replaceAll(/[?]/).replaceTrailingBrackets()} - {sxe.pad(2)} - {t.replace(':',' -').replace('?','').replaceAll(/[!?.*]+$/).replaceAll(/[`´‘’ʻ]/, "'").lowerTrail().replacePart(', Part $1')}
https://www.thetvdb.com/?tab=episode&se ... 3518&lid=7
btw:
this only removes e.g. ? if this is the last char in n e.g.
before
World End - What Do You Do at the End of the World? Are You Busy? Will You Save Us?
after
World End - What Do You Do at the End of the World? Are You Busy? Will You Save Us
https://regexr.com/
Re: Metadata and Extended Attributes
Posted: 07 Jan 2018, 12:58
by oneguynick
Code: Select all
filebot -rename *.mp4 --db TVDB -non-strict
Illegal Argument: java.nio.file.InvalidPathException: Illegal char <*> at index 0: *.mp4 (*.mp4)
Failed to read xattr: InvalidPathException: Illegal char <*> at index 0: *.mp4
Failed to read xattr: InvalidPathException: Illegal char <*> at index 0: *.mp4
Failed to read xattr: InvalidPathException: Illegal char <*> at index 0: *.mp4
Failed to read xattr: InvalidPathException: Illegal char <*> at index 0: *.mp4
^C
Example filename: Penoza - S01E02 - Unpleasant Surprises HDTV-720p.mkv
Re: Metadata and Extended Attributes
Posted: 07 Jan 2018, 13:08
by rednoah
*.mp4 refers to all mp4 files. If you're testing with mkv files then *.mkv will select those.
@see
https://mywiki.wooledge.org/glob
Re: Metadata and Extended Attributes
Posted: 08 Jan 2018, 10:36
by oneguynick
My mistake. I forgot they were *.mkv, good catch. With that said I am now testing the same working commands against my samba share with the same issue. Copy locally just isn't an option. Is there a better way to do this? NFS or SFTP or something?
Re: Metadata and Extended Attributes
Posted: 08 Jan 2018, 10:58
by oneguynick
Alright so I took the network share out of the picture for troubleshooting and tried docker:
Code: Select all
docker run -it -v /tv:/volume1 -v /opt/docker/filebot:/data rednoah/filebot -script fn:xattr -r *
docker run -it -v /tv:/volume1 -v /opt/docker/filebot:/data rednoah/filebot -script fn:duplicates -r --action test *
Done ヾ(@⌒ー⌒@)ノ in both cases. I specifically copied a folder of shows to ensure there were exact duplicates.
I had considered that maybe it was the ZFS pool. I verified the pool is enabled for xattr:
Code: Select all
NAME PROPERTY VALUE SOURCE
share xattr on default
Re: Metadata and Extended Attributes
Posted: 08 Jan 2018, 17:03
by rednoah
NFS might work. SFTP probably doesn't preserve attributes, but RSYNC might
(with --xattrs option).
If you're using docker with some host folder mounted into the docker, then there's a good chance xattr won't work. I remember filesystem events not working either. Not sure if that's something that can be enabled or if it's just not supported.

If you care about xattr, then the best solution is usually to process files on the NAS or server where reading/writing xattr usually works out of the box.

FileBot generally doesn't require xattr, it just stores some xattr info if possible, but will work just fine without. It's just that the
duplicates script requires them to work, so it'll instantly know which file is which movie/episode without having to bother any web services.
Re: [SNAP] Grant access to /media
Posted: 12 Jan 2018, 18:59
by brunorene
All folders outside my home directory are greyed out and I cannot select them in order to process their contents
Re: [SNAP] Grant access to /media
Posted: 13 Jan 2018, 10:23
by rednoah
SNAP package are confined to your files by default, and
/media if you
snap connect filebot:removable-media.

Please provide screenshots and the absolute paths of some of the files that don't work.

The SNAP developers are probably the best source for advice in this case.
Re: Batch Rename any type of file
Posted: 06 Feb 2018, 05:18
by yhm28
rednoah wrote: ↑13 Oct 2014, 21:47
3. Now that
New Names has focus hit
F2
Is there any way to remap the shortcut to a different key?
Re: Batch Rename any type of file
Posted: 06 Feb 2018, 08:39
by rednoah
No, but for reoccurring tasks I recommend making a Preset.
Presets can be called via the number keys or numpad keys.
Re: Fetch Artwork and Nfo for TV Shows
Posted: 12 Mar 2018, 16:08
by SHJordan
rednoah wrote: ↑06 Jan 2012, 11:46
Description:
- Download artwork for all your TV Shows from TheTVDB. Fetch tvshow nfo, series and season artwork and save files according to XBMC standards.
- Disable confirmation dialogs via -non-strict option (on headless machines this is the default).
Usage:
Code: Select all
filebot -script fn:artwork.tvdb /path/to/tvshows/
Options:
--q name to force search query manually instead of auto-detection
--conflict override to fetch artwork from scratch and not just missing artwork
-non-strict to disable user-interaction and run headless
Notes:
- Episodes are expected to be organized into Show/Season N/Episode XY structure. The TV Show will be auto-detected from files and the folder structure.
i'm trying to write a drag'n'drop bat file for some shows that need to get names with spaces such as "Pop Team Epic"
which regularly would only get TEAM... but i'm failing to get the dragged folder PATH.
Here is what i got so far:
Code: Select all
for %%a in (.) do set currentfolder=%%~na
echo %currentfolder%
filebot -script fn:artwork.tvdb %1 --q '%currentfolder%'
timeout /t -1
Can you take a look? or give some tips?
Re: How about sharing your CLI scripts?
Posted: 12 Mar 2018, 18:39
by kim
It's not clear what the problem is and you need to give a sample (with full file path) to test with
?
Code: Select all
for %%a in (%1) do echo %%~nxa
for %%a in (%1) do echo %%~na
Re: Fetch subtitles for all files
Posted: 20 Mar 2018, 17:07
by darkvinill
rednoah wrote: ↑02 Apr 2014, 10:30
Description:
If you want to download subtitles for more than just a single folder then
-get-subtitles -r in one batch with many many files can be a bad bad idea. This script will fetch subtitles folder per folder to make fetching large amounts of subtitles more reliable. Files may be included or excluded based on file creation date, last modified date, file size, video length, embedded subtitles, etc

If you call this script repeatedly on the same folders or files then you MUST SET
--def maxAgeDays to 30 days or less and call it no more than once per day.
Fetch subtitles for all files that have recently been created:
Code: Select all
filebot -script fn:suball /path/to/media -non-strict --def maxAgeDays=7
Fetch subtitles for all files:
You must not lookup subtitles for all files repeatedly in any kind of automated setup, or you will get banned. If you use the suball script in an automated setup then you MUST SET --def maxAgeDays to 30 days or less.
Code: Select all
filebot -script fn:suball /path/to/media
Files will be ignored and excluded from processing if one of the following conditions holds true:
- file path matches your --def ignore pattern
- time passed since file last-modified date is more than --def maxAgeDays
- time passed since file last-modified date is less than --def minAgeDays
- file size is less than --def minFileSize
- video duration is less than --def minLengthMS
- video file already contains embedded subtitles in a language matching your --def ignoreTextLanguage pattern (by default, if files contain subtitles of any language, no additional subtitles will be downloaded)
Options:
--lang zho set preferred subtitle language
(default: eng)
--def maxAgeDays=7 set a max-age for files that will be processed, older files will be ignored
--def minAgeDays=1 set a min-age for files that will be processed, newer files will be ignored (so better subtitles can be downloaded later)
--def minFileSize=0 set a minimum file size, smaller files will be ignored
(default: 50 MB)
--def minLengthMS=0 set a minimum video duration, shorter videos will be ignored
(default: 10 min)
--def ignore=regex set an ignore pattern for paths that should be ignored
--def ignoreTextLanguage=regex set an ignore pattern for video files that already contain embedded subtitles in certain languages
(default: .+)
Ho is this script different from the one that comes with filebot ?
Re: How about sharing your CLI scripts?
Posted: 20 Mar 2018, 17:51
by rednoah
The suball script gives you lots of extra options. It's built on top of simple -get-subtitles calls, by selecting files and making calls as necessary to make processing large batches of files more manageable.
Re: FileBot for Windows 7 and Windows Server
Posted: 24 Mar 2018, 01:23
by crisavec
Hello,
I have in the past contributed atleast 2 donations for filebot, and was wondering how to go about gaining access to the private builds. I am currently still running win7, with no plans to move to win10 until cannon lake desktop chips are stable.
Re: FileBot for Windows 7 and Windows Server
Posted: 24 Mar 2018, 01:47
by rednoah
Please PM me your previous donation details and make me an offer.
EDIT:
2 recent donations that barely cover the price of the Microsoft Store retail version, is not enough for extended support custom builds. These builds are intended for companies or professional users that know the value of software and don't blink twice about 2-3 digit EUR software licenses.
Re: Batch Rename any type of file
Posted: 29 Mar 2018, 15:18
by ooga123459
This is great! Exactly what I was looking for, thanks much

Re: [Mac] brew cask install filebot
Posted: 05 Apr 2018, 11:21
by raymond
rednoah wrote: ↑08 Oct 2014, 10:21
3. Install Java:
With current version of brew this will install java9. filebot uses java8. I suggest this should now be
Re: Presets
Posted: 15 Apr 2018, 06:35
by DarfNader
So what does "Do select files" and "Use orignal files" selection actually do differently? I think I missed that explanation.
Re: Presets
Posted: 15 Apr 2018, 06:37
by DarfNader
Also, it doesn't look like you can enable "hidden" folders in the file selector in "Input Folder" and "Includes" when trying to set up a preset.
Re: Presets
Posted: 15 Apr 2018, 06:49
by rednoah
Original Files means that you load in your own files via Drag-n-Drop and the the Preset is applied to whatever files you have already loaded into FileBot.
Do select files will give you additional input fields, so you can do things like "Load all *.mkv files from D:/Downloads/Movies and then process them with TheMovieDB" so you don't have to drag the files into FileBot yourself every time.
Hidden files / folders are indeed ignored by default. The Filter option can only be used to Filter out files (e.g. non-mkv files) but it cannot be used to "filter in" files. If you have files in a hidden folder, then you can specify that folder directly, and then load all the non-hidden files within that folder into FileBot.
Re: [Mac] brew cask install filebot
Posted: 22 Apr 2018, 20:55
by cheaters

Since Apple does not allow command-line tools in the Mac App Store you will need to install the filebot console tools via brew even if you have already bought FileBot from the App Store.
Does installing the FileBot package using brew write over the AppStore Version? I notice it's installing into the Applications folder.
Re: [Mac] brew cask install filebot
Posted: 23 Apr 2018, 06:18
by rednoah
No. Not if you follow the instructions above:
Code: Select all
brew cask install filebot --force --appdir=~/Applications