POSTBUCKET - where random posts in unrelated topics go

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

Re: --filter and fine-tuning

Post by rednoah »

The code is literally reading the file, so this piece of code implicitly specifies the format, which is values line by line:

Code: Select all

!readLines("/path/to/excludes.txt").contains(n)
e.g. /path/to/excludes.txt

Code: Select all

Alias
Firefly
This would be functionally equivalent just specifying the list of values in code instead of an external text file:

Code: Select all

![/Alias/, /Firefly/].contains(n)

:idea: --filter allows you to specify arbitrary code. Maybe your code reads a file and checks if n is in there. Maybe your code checks if n is a specific value or not. Maybe your code does something I haven't thought of yet. It's your code. Anything is possible. Hence you will find different solutions made by different people hand-crafted for different use cases.


:idea: You may find "conflicting" information because some people use the @file syntax for reading command-line arguments from external text files. That's completely different though. But if all args (including the filter option) a read from a text file anyway, then some users might prefer to specify this data inline rather than in another external text file.
:idea: Please read the FAQ and How to Request Help.
JD2005
Posts: 3
Joined: 16 Dec 2019, 15:43

Re: --filter and fine-tuning

Post by JD2005 »

Thank you, I wasn't sure as Filebot comes back with the words 'Include' next to each line, as well it doesn't seem to be excluding what I'm specifying as it's being labeled incorrectly anyway. I'm using the syntax laid out in this thread so just wanted to make sure I was applying this correctly before trying to figure out where else the issue is.

In case you could give me any pointers, the show 'Watchmen' is being converted to 'Vekterne' no matter what I do... All other shows seem to be working fine except this one. I realize Vekterne is Norwegian for Watchmen, but still not sure why it's choosing this language for just this show. The show and input filename going into it is english. I am also using '--lang en' in my script, so again not sure what's happening. If you have any advice I certainly appreciate it.

Code: Select all

filebot -script fn:amc --output "/home/user/Media" --action move --conflict skip -non-strict "/home/user/Stage" --log-file amc.log --def unsorted=y music=y --lang en --filter "!readLines('/home/user/uScripts/excludes.txt').contains(n)"
"
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: --filter and fine-tuning

Post by rednoah »

You can use filebot -list for testing:

Code: Select all

filebot -list --db TheTVDB --q Watchmen -non-strict

e.g.

Code: Select all

$ filebot -list --db TheTVDB --q Watchmen -non-strict --filter "!(n ==~ /WatchMojo|Pitchmen| Vekterne|Watchmen: Motion Comic/)"
Apply filter [!(n ==~ /WatchMojo|Pitchmen| Vekterne|Watchmen: Motion Comic/)] on [249] items
Include [Watchmen - 1x01 - It's Summer and We're Running Out of Ice]
Include [Watchmen - 1x02 - Martial Feats of Comanche Horsemanship]
Include [Watchmen - 1x03 - She Was Killed by Space Junk]
Include [Watchmen - 1x04 - If You Don't Like My Story, Write Your Own]
Include [Watchmen - 1x05 - Little Fear of Lightning]
Include [Watchmen - 1x06 - This Extraordinary Being]
Include [Watchmen - 1x07 - An Almost Religious Awe]
Include [Watchmen - 1x08 - A God Walks into Abar.]
Include [Watchmen - 1x09 - See How They Fly]
Watchmen - 1x01 - It's Summer and We're Running Out of Ice
Watchmen - 1x02 - Martial Feats of Comanche Horsemanship
Watchmen - 1x03 - She Was Killed by Space Junk
Watchmen - 1x04 - If You Don't Like My Story, Write Your Own
Watchmen - 1x05 - Little Fear of Lightning
Watchmen - 1x06 - This Extraordinary Being
Watchmen - 1x07 - An Almost Religious Awe
Watchmen - 1x08 - A God Walks into Abar.
Watchmen - 1x09 - See How They Fly

:!: Turns out " Vekterne" has a leading space in the database, which is probably an errors, so as far as the exclude list is concerned, I'd add both values:

Code: Select all

Vekterne
 Vekterne
:!: readLines() may or may not trim() lines implicitly. It don't know. It might. If it does, then this won't work either.


:idea: Newer revisions of FileBot implicitly trim() all values we get back from TheTVDB, as to avoid invisible leading/trailing spaces messing with us: viewtopic.php?t=1609
:idea: Please read the FAQ and How to Request Help.
JD2005
Posts: 3
Joined: 16 Dec 2019, 15:43

Re: --filter and fine-tuning

Post by JD2005 »

Well in the meantime I was researching and found that my Ubuntu server's locale was blank, so I set it to en_US.utf-8. At the same time I added the ' Vekterne' to the exceptions list and reran the script and it worked! So not sure which one solved it but either way I really appreciate your assistance!
kim
Power User
Posts: 1019
Joined: 15 May 2014, 16:17

Re: --filter and fine-tuning

Post by kim »

someone renamed show in English to Vekterne ;)
devster
Posts: 388
Joined: 06 Jun 2017, 22:56

Re: [PLEX] FileBot Xattr Metadata Scanners & Plug-ins

Post by devster »

Does this still work now that plugins have been officially abandoned by Plex?
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [PLEX] FileBot Xattr Metadata Scanners & Plug-ins

Post by rednoah »

Yes, it works. I think the only thing that has changed so far is that you have to install manually (i.e. copy files) but of course we'll see how things develop in the future.
:idea: Please read the FAQ and How to Request Help.
draco31fr
Posts: 1
Joined: 29 Dec 2019, 11:26

Re: [DEB] Debian package

Post by draco31fr »

Hello,

I just wanna inform you about changes in Ubuntu 18.04 LTS.

Now default-jre is OpenJDK 11 :

Code: Select all

$ apt policy default-jre
default-jre:
  Installé : 2:1.11-68ubuntu1~18.04.1
  Candidat : 2:1.11-68ubuntu1~18.04.1
 Table de version :
 *** 2:1.11-68ubuntu1~18.04.1 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2:1.10-63ubuntu1~02 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

Code: Select all

$ apt show default-jre
Depends: default-jre-headless (= 2:1.11-68ubuntu1~18.04.1), openjdk-11-jre
same for JavaFX:

Code: Select all

$ apt policy openjfx
openjfx:
  Installé : 11.0.2+1-1~18.04.2
  Candidat : 11.0.2+1-1~18.04.2
 Table de version :
 *** 11.0.2+1-1~18.04.2 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     8u161-b12-1ubuntu2 500
        500 http://fr.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
For your information, with universal-jdk8's filebot repo, openjdk-8-jre and openjfx downgraded to 8u161, the GUI failed to launch with the following stack trace :

Code: Select all

déc. 29, 2019 12:10:53 PM net.filebot.Main onStart
GRAVE: Failed to initialize JavaFX
java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
	at net.filebot.util.ui.SwingUI.initJavaFX(SwingUI.java:582)
	at net.filebot.Main.onStart(Main.java:196)
	at net.filebot.Main.lambda$null$0(Main.java:162)
	at net.filebot.util.ui.SwingUI$SwingRunnable.doInBackground(SwingUI.java:472)
	at net.filebot.util.ui.SwingUI$SwingRunnable.doInBackground(SwingUI.java:462)
Caused by: java.lang.ClassNotFoundException: javafx.embed.swing.JFXPanel
	... 5 more
At this time, sysinfo report was :

Code: Select all

$ filebot -script fn:sysinfo
FileBot 4.8.5 (r6224)
JNA Native: 5.2.0
MediaInfo: 17.12
p7zip: p7zip Version 16.02 (locale=fr_FR.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz (906EA),ASM,AES-NI)
unrar: UNRAR 5.50 freeware
Chromaprint: fpcalc version 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 1.8.0_232
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 44 MB Used Memory
OS: Linux (amd64)
HW: Linux draco-laptop 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/draco/.filebot
Package: DEB
License: UNREGISTERED
Done ヾ(@⌒ー⌒@)ノ
So, I have to use universal repository, instead of universal-jdk8, remove & purge old filebot package, and reinstall / update all stack (jre, javafx, ...)
Now GUI is launching well, sysinfo changes only relies on java version :

Code: Select all

JRE: OpenJDK Runtime Environment 11.0.5
I suggest you update the first post and also the website.
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEB] Debian package

Post by rednoah »

Did you use the installer/deb.sh script? The script should automatically use the correct repository, by checking if OpenJFX is version 8 or above.
:idea: Please read the FAQ and How to Request Help.
Pinhead
Posts: 1
Joined: 11 Jan 2020, 09:41

Re: FileBot on the Mac App Store

Post by Pinhead »

After reading that the Apple store version Has limited usage due to Apple, I may add. Should have done more research before buying. I requested a refund. I got it. Whoo hoo. So I will be purchasing the universal licence full version now :)))))
fud18
Posts: 5
Joined: 04 Feb 2020, 16:45

Re: Plex Naming Schemes

Post by fud18 »

I recently noticed that some of my movies were not getting their meta data in Plex unless I manually matched the titles. What I noticed was preventing this was having A|An|The at the beginning. According to Plex's website/forums if you place anything after a parenthesis it will not detect it which allows the files to match correctly. Below are the naming formats I have tried with examples. Any help would be greatly appreciated to get my naming to work like Example 3.
Example 1:
  • The Fly (1986) is matched correctly in Plex, but I want proper sort with the The at the end
    Filebot naming script: {n.replace(':',' - ')} ({y})
Example 2:
  • Fly, The (1986) is not matched correctly in Plex.
    Filebot naming script: {n.sortName('$2, $1').replace(':',' - ')} ({y})
Example 3 (What I would like): Fly (1986), The
  • If the current file does not begin with "A|An|The" the naming is done incorrectly as such
    Hamburger: The Motion Picture (1986) = Hamburger: The Motion Picture (1986), Hamburger: The Motion Picture
    The Fly (1986) = Fly (1986), The
    Filebot naming script: {n.sortName('$2').replace(':',' - ')} ({y}){n.sortName(', $1').replace(':',' - ')}
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Naming Schemes

Post by rednoah »

AFAIK, what you would like is is not what Plex would like to see:
https://support.plex.tv/articles/categories/your-media/

:idea: {plex} is the way to go. It may not be what you want, but it'll be what Plex wants and expects. You can do things differently, and maybe it'll mostly work, or maybe it'll sometimes not work, either way, no guarantees once you start ignoring the standard if favor of your own preferences. ;)

Code: Select all

{plex}
:idea: Please read the FAQ and How to Request Help.
fud18
Posts: 5
Joined: 04 Feb 2020, 16:45

Re: Plex Naming Schemes

Post by fud18 »

Thanks for the reply rednoah, I have tried that, but I don't want all the A|An|The's lumped together...makes it a real nightmare to try and remove files if I am bouncing around all over the place. I will face the consequences of the way I want it named if someone can just tell me how to the the A|An|The from the beginning of the title to after the date as provided in my example. I have tested it and it works flawlessly that's why I want to do it plus then I can find them easy in windows explorer to remove movies I no longer want.
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Naming Schemes

Post by rednoah »

You could do n.sortName() to remove the A and The altogether, since that'll probably mess with Plex the least:

Code: Select all

n.sortName()
:idea: Please read the FAQ and How to Request Help.
fud18
Posts: 5
Joined: 04 Feb 2020, 16:45

Re: Plex Naming Schemes

Post by fud18 »

But how do I add the removed part back after the (year)?
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Plex Naming Schemes

Post by rednoah »

Assuming that Plex ignores everything after the Name (Year) part, you can try this:

Code: Select all

ny.sortName('$2, $1')
:idea: Please read the FAQ and How to Request Help.
fud18
Posts: 5
Joined: 04 Feb 2020, 16:45

Re: Plex Naming Schemes

Post by fud18 »

That worked like a charm. Thanks so much rednoah!!!!!
juan
Posts: 2
Joined: 12 Feb 2020, 10:38

Re: Metadata and Extended Attributes

Post by juan »

Can this be used to save the audios and subtitles mediainfo of the multimedia file?

It could be great to have this added to the xattr attributes (or file), so, Plex don't need to scan the multimedia file to get the audio and subtitle languages, the default audio, the forced subtitles, the duratión of the film....

This with a combination of an unionfs or mergerfs to save the xattr attributes, and rclone with a cloud provider (like a gsuite), could be perfect.

Or maybe apart of the xattr attributes, the data could be saved on an .nfo like the one that jellyfin creates, that have all this information!!

Code: Select all

  <fileinfo>
    <streamdetails>
      <video>
        <codec>h264</codec>
        <micodec>h264</micodec>
        <bitrate>10312878</bitrate>
        <width>1872</width>
        <height>1080</height>
        <aspect>26:15</aspect>
        <aspectratio>26:15</aspectratio>
        <framerate>23.97602</framerate>
        <scantype>progressive</scantype>
        <default>True</default>
        <forced>False</forced>
        <duration>46</duration>
        <durationinseconds>2780</durationinseconds>
      </video>
      <audio>
        <codec>ac3</codec>
        <micodec>ac3</micodec>
        <bitrate>192000</bitrate>
        <language>spa</language>
        <scantype>progressive</scantype>
        <channels>2</channels>
        <samplingrate>48000</samplingrate>
        <default>True</default>
        <forced>False</forced>
      </audio>
      <audio>
        <codec>dts</codec>
        <micodec>dts</micodec>
        <bitrate>1536000</bitrate>
        <language>eng</language>
        <scantype>progressive</scantype>
        <channels>6</channels>
        <samplingrate>48000</samplingrate>
        <default>False</default>
        <forced>False</forced>
      </audio>
      <subtitle>
        <codec>subrip</codec>
        <micodec>subrip</micodec>
        <language>spa</language>
        <scantype>progressive</scantype>
        <default>False</default>
        <forced>False</forced>
      </subtitle>
      <subtitle>
        <codec>subrip</codec>
        <micodec>subrip</micodec>
        <language>eng</language>
        <scantype>progressive</scantype>
        <default>False</default>
        <forced>False</forced>
      </subtitle>
    </streamdetails>
  </fileinfo>
  
Or maybe it's not even possible to send this information to plex.
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Metadata and Extended Attributes

Post by rednoah »

FileBot xattr metadata does not include MediaInfo, since that's readily available in the file itself. There are existing scripts for exporting MediaInfo, but there's no standardized way of passing any of that information on to Plex or Jellyfin. You could write your own integration though.
:idea: Please read the FAQ and How to Request Help.
devster
Posts: 388
Joined: 06 Jun 2017, 22:56

Re: Metadata and Extended Attributes

Post by devster »

Is there a script to convert from one type of xattr.store to another?
In particular I'm thinking about switching to plain text files instead of embedded for a filesystem change.
I only work in black and sometimes very, very dark grey. (Batman)
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Metadata and Extended Attributes

Post by rednoah »

--apply metadata can be used to export xattr to .xattr folders and files:
viewtopic.php?t=11079
:idea: Please read the FAQ and How to Request Help.
juan
Posts: 2
Joined: 12 Feb 2020, 10:38

Re: --mode interactive

Post by juan »

Could be handy if we can see for each option the tvdb or themoviedb id, because sometimes some series or movies have the same name, so we need more info to choose the correct option!
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: --mode interactive

Post by rednoah »

Can you provide specific examples? Screenshots?
:idea: Please read the FAQ and How to Request Help.
mouzzampk2014
Posts: 15
Joined: 07 Jan 2019, 00:49

Re: [DEB] Debian package

Post by mouzzampk2014 »

Hi, I currently installed filebot on ubuntu 18.04 via this

Code: Select all

bash -xu <<< "$(curl -fsSL https://raw.githubusercontent.com/filebot/plugins/master/installer/deb.sh)"
because

Code: Select all

sudo apt-get install filebot
gave me errors.

And I believe `4.9.0` is ready for release. So I am not sure how I am going to update from current version?

Code: Select all

4.8.5 to 4.9.0
And is there any reason I am getting this error on two different machine with same ubuntu 18.04 when I try to install via this?

Code: Select all

sudo apt-get install filebot
Thank you
User avatar
rednoah
The Source
Posts: 18826
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [DEB] Debian package

Post by rednoah »

FileBot 4.9.0 is in beta and no final release has been published at this point in time. The apt repository is only available for the latest stable release, which is FileBot 4.8.5 at the time of writing.
:idea: Please read the FAQ and How to Request Help.
Post Reply