POSTBUCKET - where random posts in unrelated topics go
-
- Posts: 101
- Joined: 12 Apr 2020, 04:02
Re: MediaInfo Inspector
What's the best way to work with files lacking mediainfo, for example audio languages?
I was thinking i might be able to modify the mediainfo audio language directly with the mediainfo program you linked, seems i can only visualize it though.
I was thinking i might be able to modify the mediainfo audio language directly with the mediainfo program you linked, seems i can only visualize it though.
-
- Posts: 101
- Joined: 12 Apr 2020, 04:02
Re: Conditional Structures (if-then-else)
Often find myself in cases where i could use either {any} or { x ? x : y } pretty much interchangeably. In those cases is there a better option ? Like one less hungry in computing power ?
Re: Conditional Structures (if-then-else)
I'd use the one that is more readable. They're not interchangeable though, because the ternary operator does not catch exceptions, and because it does less, I'd expect it to be faster, but definitely not noticeably faster in human time scales.
-
- Posts: 101
- Joined: 12 Apr 2020, 04:02
Re: Conditional Structures (if-then-else)
Cheers. So the complex format i posted earlier is pretty sound and i wouldn't be able to optimize its speed much more, correct?
For reference viewtopic.php?f=5&t=11862
For reference viewtopic.php?f=5&t=11862
Re: Conditional Structures (if-then-else)
I'm sure it's possible to optimize speed, and the first step would to profile each part, to see which one is slower than expected. As with everything, the 20 / 80 principle applies, 20% of your code will be responsible for 80% of run time, so it's integral to find out what those 20% are first.AbedlaPaille wrote: ↑27 May 2020, 15:06 So the complex format i posted earlier is pretty sound and i wouldn't be able to optimize its speed much more, correct?
-
- Posts: 101
- Joined: 12 Apr 2020, 04:02
Re: Conditional Structures (if-then-else)
Thanks for the pointers !
-
- Posts: 2
- Joined: 27 Jun 2020, 14:52
Re: Conditional Structures (if-then-else)
Hi,
Could someone please help me with a conditional statement for (certification). My original preset is:
When it does not find a certification, it simply appends the hyphen at the end of the name but I would like it to only add the hyphen when there is a certification found.
Could someone please help me with a conditional statement for (certification). My original preset is:
Code: Select all
{n.replaceAll(/[:|]/, " - ")} ({y})\{n.replaceAll(/[:|]/, " - ")} ({y}) {vf} - {certification}
Re: Conditional Structures (if-then-else)
e.g.nomadicleo wrote: ↑27 Jun 2020, 14:57 When it does not find a certification, it simply appends the hyphen at the end of the name but I would like it to only add the hyphen when there is a certification found.
Code: Select all
{" - " + certification}

-
- Posts: 2
- Joined: 27 Jun 2020, 14:52
Re: Conditional Structures (if-then-else)
Thank you, @rednoah!! Worked perfectly.
-
- Posts: 2
- Joined: 24 Mar 2020, 05:32
Re: Conditional Structures (if-then-else)
FileBot might not find all the groups for the TV shows I have. How do I make a format such that when {group} exists - it should be added, if not - it should be blank.
My current format is:
What changes should I apply to have my files look like this:
no group:
xyz group:
My current format is:
Code: Select all
{ny}/Season 0{s}/{ny} - {s00e00} - {t} [{vf} {source} {vc} {if (bitdepth == 10) '10-bit'} {ac} {channels} {if (group != null) {group} else ""}]
What changes should I apply to have my files look like this:
no group:
Code: Select all
Brooklyn Nine-Nine - S02E01 - Undercover [480p x264 8-bit AAC 2.0]
Code: Select all
Brooklyn Nine-Nine - S02E02 - Chocolate Milk [480p x264 8-bit AAC 2.0 XYZ]
Re: Conditional Structures (if-then-else)
That is default. You're probably asking about the preceding blank though, so that you don't end up with a superfluous blank if {group} is undefined.aryanprincesanty wrote: ↑28 Jun 2020, 18:09 How do I make a format such that when {group} exists - it should be added, if not - it should be blank.
e.g.
Code: Select all
{" " + group}
Code: Select all
{" " + ac}{" " + channels}{" " + group}

Note the conceptual similarity to previously asked questions:
rednoah wrote: ↑27 Jun 2020, 15:10e.g.nomadicleo wrote: ↑27 Jun 2020, 14:57 When it does not find a certification, it simply appends the hyphen at the end of the name but I would like it to only add the hyphen when there is a certification found.Code: Select all
{" - " + certification}
viewtopic.php?t=1895
Re: Conditional Structures (if-then-else)
Code: Select all
{ny}{'/Season ' + s.pad(2)}{'/' + ny}{' - ' + s00e00}{' - ' + t}{allOf{vf}{source}{vc}{bitdepth == 10 ? ' 10-bit' : ''}{ac}{channels}{group}.joining(' ', ' [', ']')}
Re: [JDownloader] Setup for Windows, Linux and Mac OS X
otr wrote: ↑17 Aug 2018, 12:10 Hi,
sorry for being silent for a bit, I have been on a short trip. In the meantime, my setup is now working and I wanted to report back my specifics, so that others may benefit, but also so that I can learn in case I have missed something important.
This is what is working for me:
1. jDownloader Event Scripter calls this script
For people that were new to this, just like me:Code: Select all
[{"eventTrigger":"ON_PACKAGE_FINISHED", "enabled":true, "name":"FileBot", "script":"var amcFile = '/volume1/Downloads/jdtofilebotv2.sh';var path = '/volume1/Downloads/'; callAsync(function() {}, amcFile, path);", "eventTriggerSettings":{}, "id":123654}]
- The above is the exact "text" that you can see in the jDownloader UI. Compare this screenshot: https://snag.gy/kYHCEN.jpg
- id:123654 is a random number I thought of. The way I understand it this is the ID the process runs under and I would be able to find it under this ID, if I had to look for it.
2. the jdtofilebotv2.sh script that is called above
I would be happy to get comments on this, especially since people later might look at this and assume that I did smart things (I did not - I just figured out what works for me somehow).Code: Select all
#!/bin/sh export JAVA_OPTS="-Xmx256m" /var/packages/filebot/target/filebot.sh -script 'fn:amc' /volume1/Downloads --output /volume1/Media/ --conflict auto --lang en --def 'clean=y' 'skipExtract=y' 'excludeList=.excludes'
One issue I have is that I still do not find the filebot log file created by this setup.
Hello, I am a little lost would it be possible to give me the procedure that you followed from a to z because I can not find the configuration files of eventscripter did you use an alternative method Thank's
Re: [IRC] Discord Support Channel
The FileBot Forums is Wikipedia. The FileBot Discord is Twitter. Each have strengths and weaknesses. Neither replaces the other. Both run in your browser no need to install anything. 

Re: Conditional Structures (if-then-else)
Hi RedNoah and Happy New Year !
Thanks to your help i'm using and arguments file to dispatch my files according to their characteristics in various drives/folders like this :
2160P HDR --> B:\2160P HDR10\
2160P non HDR --> B:\2160P\
720P --> B:\720P\
DVDRIP --> H:\DVDRIPS\
1080P --> S:\1080P\
I use the following arguments file
I now have to separate 1080P Files according to them belonging or not to a collection like follows :
2160P HDR --> B:\2160P HDR10\
2160P non HDR --> B:\2160P\
720P --> B:\720P\
DVDRIP --> H:\DVDRIPS\
1080P and part of a collection --> S:\1080P - Sagas\
1080P and not part of a collection --> I:\1080P\
I tried without success modifying my arguments file like follows :
Could you please help me ?
Many thanks
Thanks to your help i'm using and arguments file to dispatch my files according to their characteristics in various drives/folders like this :
2160P HDR --> B:\2160P HDR10\
2160P non HDR --> B:\2160P\
720P --> B:\720P\
DVDRIP --> H:\DVDRIPS\
1080P --> S:\1080P\
I use the following arguments file
Code: Select all
ut_label=Movies
movieFormat={hd.replaceAll("UHD", replacement = "B:/2160P").replaceAll("SD", replacement = "H:/DVDRIPS").replaceAll("HD", replacement = vf.replaceAll("720p", replacement = "B:/720P").replaceAll("1080p", replacement = "S:/1080P"))} {hdr}/{collection.ascii()}/{ny.ascii().upperInitial()} [{imdbid}]/{ny.ascii().upperInitial()} [{imdbid}] {if (hd =~ /HD/) vf} {hdr}
seriesFormat="E:/TV Shows/{n}/{n}.{s00e00}.{t}"
animeFormat="E:/Anime/{n}/{n}.{s00e00}.{t}"
I now have to separate 1080P Files according to them belonging or not to a collection like follows :
2160P HDR --> B:\2160P HDR10\
2160P non HDR --> B:\2160P\
720P --> B:\720P\
DVDRIP --> H:\DVDRIPS\
1080P and part of a collection --> S:\1080P - Sagas\
1080P and not part of a collection --> I:\1080P\
I tried without success modifying my arguments file like follows :
Code: Select all
ut_label=Movies
movieFormat={hd.replaceAll("UHD", replacement = "B:/2160P").replaceAll("SD", replacement = "H:/DVDRIPS").replaceAll("HD", replacement = vf.replaceAll("720p", replacement = "B:/720P").replaceAll("1080p", {any{collection}.replaceall{"S:/Sagas - 1080P"}{"I:/1080P"}}))} {hdr}/{collection.ascii()}/{ny.ascii().upperInitial()} [{imdbid}]/{ny.ascii().upperInitial()} [{imdbid}] {if (hd =~ /HD/) vf} {hdr}
seriesFormat="E:/TV Shows/{n}/{n}.{s00e00}.{t}"
animeFormat="E:/Anime/{n}/{n}.{s00e00}.{t}"
Could you please help me ?
Many thanks
Re: Conditional Structures (if-then-else)
my take on it

Code: Select all
{ def pathList = ['SD' : 'H:/DVDRIPS','HD720p' : 'B:/720p','HD1080ptrue' : 'B:/1080p - Sagas','HD1080pfalse' : 'B:/1080p','UHD2160p' : 'B:/2160P']; any{pathList.get(hd)}{pathList.get(hd + vf)}{pathList.get(hd + vf + any{collection ? true : true}{false})}{'UNKNOWN_PATH'}} {hdr}/{collection.ascii()}/{ny.ascii().upperInitial()}{' ['+imdbid +']'}/{ny.ascii().upperInitial()}{' ['+imdbid +']'} {if (hd =~ /HD/) vf} {hdr}
Re: Conditional Structures (if-then-else)
Good evening Kim
Thanks a lot !!!
I spent days trying to figure the right way to do it and you crunched this in no time... Impressive
I did spend a lot of time in the forum reading exemples and in the FAQ and did not see how to use the pathList, neither the use of .get... And I would not have been able to think ot the concatenation trick for 1080P with the any{collection ? true : true}{false}
Works like a charm, and helps me understand better all those functions which make filebot so powerfull
Many thanks again for your help and happy New Year too
Best regards
Thanks a lot !!!
I spent days trying to figure the right way to do it and you crunched this in no time... Impressive
I did spend a lot of time in the forum reading exemples and in the FAQ and did not see how to use the pathList, neither the use of .get... And I would not have been able to think ot the concatenation trick for 1080P with the any{collection ? true : true}{false}
Works like a charm, and helps me understand better all those functions which make filebot so powerfull
Many thanks again for your help and happy New Year too
Best regards