POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
Hercules40
Posts: 32
Joined: 15 Jun 2017, 00:46

Re: How about sharing our format expressions?

Post 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')}
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing our format expressions?

Post 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('?', '')}
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: How about sharing our format expressions?

Post 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:

Code: Select all

.replaceAll(/[!?.]+$/)
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/
oneguynick
Posts: 7
Joined: 06 Jan 2018, 13:45

Re: Metadata and Extended Attributes

Post 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
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Metadata and Extended Attributes

Post 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
:idea: Please read the FAQ and How to Request Help.
oneguynick
Posts: 7
Joined: 06 Jan 2018, 13:45

Re: Metadata and Extended Attributes

Post 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?
oneguynick
Posts: 7
Joined: 06 Jan 2018, 13:45

Re: Metadata and Extended Attributes

Post 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
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Metadata and Extended Attributes

Post 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.

:idea: 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.

:arrow: 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.
:idea: Please read the FAQ and How to Request Help.
brunorene
Posts: 5
Joined: 21 Oct 2017, 18:57

Re: [SNAP] Grant access to /media

Post by brunorene »

All folders outside my home directory are greyed out and I cannot select them in order to process their contents
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [SNAP] Grant access to /media

Post by rednoah »

SNAP package are confined to your files by default, and /media if you snap connect filebot:removable-media.

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

:arrow: The SNAP developers are probably the best source for advice in this case.
:idea: Please read the FAQ and How to Request Help.
yhm28
Posts: 20
Joined: 24 Jan 2018, 07:20

Re: Batch Rename any type of file

Post 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?
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Batch Rename any type of file

Post by rednoah »

No, but for reoccurring tasks I recommend making a Preset. Presets can be called via the number keys or numpad keys.
:idea: Please read the FAQ and How to Request Help.
SHJordan
Posts: 13
Joined: 05 May 2015, 11:03

Re: Fetch Artwork and Nfo for TV Shows

Post by SHJordan »

rednoah wrote: 06 Jan 2012, 11:46 Description:
  1. Download artwork for all your TV Shows from TheTVDB. Fetch tvshow nfo, series and season artwork and save files according to XBMC standards.
  2. 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?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: How about sharing your CLI scripts?

Post 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
darkvinill
Posts: 15
Joined: 23 Feb 2018, 23:35

Re: Fetch subtitles for all files

Post 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 ?
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing your CLI scripts?

Post 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.
:idea: Please read the FAQ and How to Request Help.
crisavec
Posts: 1
Joined: 16 Mar 2018, 01:37

Re: FileBot for Windows 7 and Windows Server

Post 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.
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot for Windows 7 and Windows Server

Post 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.
:idea: Please read the FAQ and How to Request Help.
ooga123459
Posts: 1
Joined: 29 Mar 2018, 15:15

Re: Batch Rename any type of file

Post by ooga123459 »

This is great! Exactly what I was looking for, thanks much :)
raymond
Posts: 9
Joined: 04 Apr 2018, 06:46

Re: [Mac] brew cask install filebot

Post by raymond »

rednoah wrote: 08 Oct 2014, 10:21 3. Install Java:

Code: Select all

brew cask install java
With current version of brew this will install java9. filebot uses java8. I suggest this should now be

Code: Select all

brew cask install java8
DarfNader
Posts: 48
Joined: 08 Apr 2018, 12:46

Re: Presets

Post by DarfNader »

So what does "Do select files" and "Use orignal files" selection actually do differently? I think I missed that explanation.
DarfNader
Posts: 48
Joined: 08 Apr 2018, 12:46

Re: Presets

Post 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.
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Presets

Post 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.
:idea: Please read the FAQ and How to Request Help.
cheaters
Posts: 214
Joined: 09 Oct 2016, 02:01

Re: [Mac] brew cask install filebot

Post by cheaters »

:idea: 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.
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Mac] brew cask install filebot

Post by rednoah »

No. Not if you follow the instructions above:

Code: Select all

brew cask install filebot --force --appdir=~/Applications
:idea: Please read the FAQ and How to Request Help.
Post Reply