POSTBUCKET - where random posts in unrelated topics go

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

Re: --filter and fine-tuning

Post by rednoah » 25 Apr 2017, 05:44

:idea: The number of possible filters is infinite. The available bindings (n, y, s, etc) are the same as in format expressions.

What's the problem? What are you trying to accomplish?
:idea: Please read the FAQ and How to Request Help.

dadelayer
Posts: 5
Joined: 06 Oct 2017, 06:18

Re: Batch Rename any type of file

Post by dadelayer » 06 Oct 2017, 21:22

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

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

Re: Batch Rename any type of file

Post by rednoah » 07 Oct 2017, 07:42

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

:idea: You can hire me though, but you'd need to write down exactly what you need, with examples and example data.
:idea: Please read the FAQ and How to Request Help.

dadelayer
Posts: 5
Joined: 06 Oct 2017, 06:18

Re: Batch Rename any type of file

Post by dadelayer » 07 Oct 2017, 08:09

Well, I wanted to try it in XML since I wanted to use your example, but not coming up with anything.

Code: Select all

def fnn = fn
xml = new XmlSlurper().parse(folder+'/mov.xml')
xml.'**'.find { it.name() == 'scid' && it.text() == fnn}*.parent()*.title*.text()
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 :(

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

Re: Batch Rename any type of file

Post by rednoah » 07 Oct 2017, 10:14

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. ;)
:idea: Please read the FAQ and How to Request Help.

Delmano
Posts: 1
Joined: 14 Oct 2017, 10:27

Re: Batch Rename any type of file

Post by Delmano » 24 Oct 2017, 12:51

This is so useful. Thanks for the tutorial Noah, helps newbies like me a lot.

oneguynick
Posts: 7
Joined: 06 Jan 2018, 13:45

Re: Metadata and Extended Attributes

Post by oneguynick » 07 Jan 2018, 12:58

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: 18623
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Metadata and Extended Attributes

Post by rednoah » 07 Jan 2018, 13:08

*.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 » 08 Jan 2018, 10:36

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 » 08 Jan 2018, 10:58

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: 18623
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Metadata and Extended Attributes

Post by rednoah » 08 Jan 2018, 17:03

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.

yhm28
Posts: 20
Joined: 24 Jan 2018, 07:20

Re: Batch Rename any type of file

Post by yhm28 » 06 Feb 2018, 05:18

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: 18623
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Batch Rename any type of file

Post by rednoah » 06 Feb 2018, 08:39

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 » 12 Mar 2018, 16:08

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: 997
Joined: 15 May 2014, 16:17

Re: How about sharing your CLI scripts?

Post by kim » 12 Mar 2018, 18:39

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 » 20 Mar 2018, 17:07

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: 18623
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: How about sharing your CLI scripts?

Post by rednoah » 20 Mar 2018, 17:51

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 » 24 Mar 2018, 01:23

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: 18623
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileBot for Windows 7 and Windows Server

Post by rednoah » 24 Mar 2018, 01:47

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 » 29 Mar 2018, 15:18

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 » 05 Apr 2018, 11:21

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: 47
Joined: 08 Apr 2018, 12:46

Re: Presets

Post by DarfNader » 15 Apr 2018, 06:35

So what does "Do select files" and "Use orignal files" selection actually do differently? I think I missed that explanation.

DarfNader
Posts: 47
Joined: 08 Apr 2018, 12:46

Re: Presets

Post by DarfNader » 15 Apr 2018, 06:37

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: 18623
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Presets

Post by rednoah » 15 Apr 2018, 06:49

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.

jprokos
Posts: 57
Joined: 09 Oct 2016, 02:01

Re: [Mac] brew cask install filebot

Post by jprokos » 22 Apr 2018, 20:55

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

Post Reply