Help! Seperating Movies into different folders HD & 4k

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 22 Aug 2018, 13:03

Hi
I would like to be able to send movies to different folders depending whether is 4k or hd.

I currently use this....

Code: Select all

filebot -script fn:amc --output "\\192.168.0.111\Multimedia" --action move --conflict auto -non-strict --def clean=y  --def subtitles=en --def [email protected]"C:\Filebot Templates\movie.groovy" [email protected]"C:\Filebot Templates\series.groovy" --def unsortedFormat="\\192.168.0.111\Multimedia\Unsorted Files\{file.structurePathTail}" music=n artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
I would like the 4k target to be \\192.168.0.111\Movies 4K

any help would be appreciated

Movie groovy file

Code: Select all

"Movies/{ny} [{certification}]/{n.colon(' - ')} ({y}) {' CD'+pi} [ {vf} {vc} {bitdepth}bit {ac} {channels} ]"
Series groovy file

Code: Select all

"TV Shows/{n}/{'Season '+s}/{n} - {s00e00} - {t} [ {vf} {vc} {bitdepth}bit {ac} {channels} ]"
Regards :D

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 22 Aug 2018, 16:09

You could use the {hd} binding which will give you SD / HD / UHD for each video file:

Code: Select all

Movies {hd}
Alternatively, you can also do something like this:

Code: Select all

{h > 2000 ? 'Movies 4K' : 'Movies'}
:arrow: i.e. if the video height is more than 2000 pixels, then it's 4K, but you may need to adjust that a bit if you have some kinda super-wide screen media.
:idea: Please read the FAQ and How to Request Help.

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 22 Aug 2018, 22:30

Hi Rednoah
Thanks for the info. I would like to use the height method as that seems best for me.
Would I need to add the code to the movie.groovy file at the start?
Not sure where it is supposed to go?
Many thanks

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 23 Aug 2018, 07:42

I have worked it out! Thank you :)

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 30 Aug 2018, 11:27

I have it working so movies are separated depending if 2160p/uhd into its own folder or anything else into the movie folder. Brilliant!

Code: Select all

\\192.168.0.111/{vf =~ /2160p|uhd|UHD/ ? 'uhd movies' : 'movies'}/{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
I want to move anything uhd/2160p to a different network drive \\192.168.0.111/uhd movies

I have tried adding this into the format

Code: Select all

\\192.168.0.111/{vf =~ /2160p|uhd/ ? '\\192.168.0.111\uhd movies' : 'movies'}/{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
It doesn't work when called from filebot but using filebot gui it worked fine?

Do I have to change the ouput in utorrent?

Code: Select all

filebot -script fn:amc --output "\\192.168.0.111\Multimedia" --action move --conflict auto -non-strict --def clean=y  --def subtitles=en --def [email protected]"C:\Filebot Templates\movie.groovy" [email protected]"C:\Filebot Templates\series.groovy" --def unsortedFormat="\\192.168.0.111\Multimedia\Unsorted Files\{file.structurePathTail}" music=n artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"

I'm now totally stuck, any suggestions?

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 30 Aug 2018, 11:44

1.
e.g. just yield different values for the host / share part:

Code: Select all

//{vf =~ /2160p/ ? 'ServerA/ShareA/UHD Movies' : 'ServerB/ShareB/Movies'}/
e.g. alternatively, this works too:

Code: Select all

{vf =~ /2160p/ ? '//ServerA/ShareA/UHD Movies' : '//ServerB/ShareB/Movies'}/
:idea: {vf} will never have the value UHD.


2.
There's many ways to do it, the goal is to generate a valid UNC path, a NOT this:

Code: Select all

\\192.168.0.111/\\192.168.0.112\uhd movies\...
:idea: Does this kind of path work? IDK. But lets not ever generate file paths like this. :lol:
:idea: Please read the FAQ and How to Request Help.

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 30 Aug 2018, 12:07

Oh boy I have just realised I'm rubbish at this! HAHAHAHA

Yep I can see how it should work now that makes sense...

Ill give it a try tonight.

Thanks for helping a noob..... again Rednoah :)

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 30 Aug 2018, 14:03

should I still leave the --output "//192.168.0.111/Multimedia" in the utorrent run program? Or will the movie.groovy file sort that now?

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 30 Aug 2018, 15:40

--output must always point to a valid writable folder for various reasons. Among other things, it's used as base path for relative formats, but if your format is already absolute, then files will be organized exactly as per your absolute format regardless of output folder.
:idea: Please read the FAQ and How to Request Help.

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 30 Aug 2018, 15:46

ok perfect. thanks

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 31 Aug 2018, 08:29

Code: Select all

\\192.168.0.111\{vf =~ /2160p/ ? 'UHD Movies' : 'Multimedia/Movies'}/{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
This is what I ended up using and works perfectly. Thank you

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 31 Aug 2018, 08:31

Another issue I sometime get with

Code: Select all

{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
The certification doesn't always get filled in? Is there a way to remove brackets if it isn't available otherwise I get left with []

Thanks

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 31 Aug 2018, 10:19

Yes, this will do:

Code: Select all

{[certification]}
:idea: Please read the FAQ and How to Request Help.

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 31 Aug 2018, 11:31

Perfect! I think I'm completely sorted now Rednoah.
Amazing software!

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 31 Aug 2018, 11:39

CHA0SENG7NE wrote:
31 Aug 2018, 11:31
Amazing software!
Please spread the word~ :mrgreen:
:idea: Please read the FAQ and How to Request Help.

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 31 Aug 2018, 11:41

Don't worry I have :)

Redskyer
Posts: 2
Joined: 07 Sep 2018, 06:21

Re: Help! Seperating Movies into different folders HD & 4k

Post by Redskyer » 07 Sep 2018, 06:48

Hi,

I have a similar problem and don't want to open a new threat for that.

I also want to seperate movies and tv-shows into different folders, but depending on their certification.
It works well as long as the movie or tv-show is certified. When there is no certification, the movie or tv-show won't come into right folder.
I'm using the rednoah/filebot container for docker on a Windows Host.

Code: Select all

filebot -script 'fn:sysinfo'

------------------------------------------

FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-08-14 (r534)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 37 MB Used Memory
OS: Linux (amd64)
HW: Linux fed35c725cdc 4.9.93-linuxkit-aufs #1 SMP Wed Jun 6 16:55:56 UTC 2018 x86_64 GNU/Linux
DATA: /data/.filebot
Package: DOCKER
License: FileBot License XXXXX (Valid-Until: 2068-08-30)
Done ヾ(@⌒ー⌒@)ノ
------------------------------------------

[Process completed]
This is the part of my script (movie):

Code: Select all

{certification == "G" || certification == "PG" ? 'Kinderfilme' : 'Filme'}/{n} ({y})/{n} ({y}) {' CD'+pi}
This is the part of my script (tv-show):

Code: Select all

{certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? 'Kinderserien' : 'Serien'}/{n} ({y})/{episode.special ? 'Special' : 'Staffel '+s.pad(2)}/{certification} - {n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}
I've created 2 example files to demonstrate what is happening.

Output from GUI:

Code: Select all

filebot -script 'fn:amc' /volume1/JDownloader --output /volume1 --action TEST -non-strict --order Airdate --conflict auto --lang de --def 'music=y' 'unsorted=y' 'artwork=y' 'subtitles=eng' 'clean=y' 'deleteAfterExtract=y' 'minLengthMS=0' 'minFileSize=0' 'seriesFormat={certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? '\''Kinderserien'\'' : '\''Serien'\''}/{n} ({y})/{episode.special ? '\''Special'\'' : '\''Staffel '\''+s.pad(2)}/{n} - {episode.special ? '\''S00E'\''+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart('\'', Part $1'\'')}{'\''.'\''+lang}' 'animeFormat={certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? '\''Kinderserien'\'' : '\''Serien'\''}/{n} ({y})/{episode.special ? '\''Special'\'' : '\''Staffel '\''+s.pad(2)}/{n} - {episode.special ? '\''S00E'\''+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart('\'', Part $1'\'')}{'\''.'\''+lang}' 'movieFormat={certification == "G" || certification == "PG" ? '\''Kinderfilme'\'' : '\''Filme'\''}/{n} ({y})/{n} ({y}) {'\'' CD'\''+pi}' 'musicFormat=Musik/{n}/{album}/{media.TrackPosition.pad(2)} - {t}' 'unsortedFormat=Unbekannt/{fn}.{cf}' 'excludeList=.excludes' --log all --log-file '/usr/local/filebot-node/data/filebot.log'

------------------------------------------

Locking /usr/local/filebot-node/data/filebot.log
Run script [fn:amc] at [Fri Sep 07 06:36:38 UTC 2018]
Parameter: music = y
Parameter: unsorted = y
Parameter: artwork = y
Parameter: subtitles = eng
Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: minLengthMS = 0
Parameter: minFileSize = 0
Parameter: seriesFormat = {certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? 'Kinderserien' : 'Serien'}/{n} ({y})/{episode.special ? 'Special' : 'Staffel '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}
Parameter: animeFormat = {certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? 'Kinderserien' : 'Serien'}/{n} ({y})/{episode.special ? 'Special' : 'Staffel '+s.pad(2)}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}
Parameter: movieFormat = {certification == "G" || certification == "PG" ? 'Kinderfilme' : 'Filme'}/{n} ({y})/{n} ({y}) {' CD'+pi}
Parameter: musicFormat = Musik/{n}/{album}/{media.TrackPosition.pad(2)} - {t}
Parameter: unsortedFormat = Unbekannt/{fn}.{cf}
Parameter: excludeList = .excludes
Argument[0]: /volume1/JDownloader
Use excludes: /volume1/.excludes (1)
Input: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv
Input: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv
Input: /volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv
rush.hour.h264.br-rip.mkv [series: Rush Hour, movie: Rush Hour (1998)]
Exclude Series: Rush Hour
Group: [tvs:dragon ball] => [dragon.ball.s01e01.h264.br-rip.mkv, dragon.ball.s01e05.h264.br-rip.mkv]
Group: [tvs:null, mov:rush hour 1998] => [rush.hour.h264.br-rip.mkv]
Get [English] subtitles for 2 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv
No matching subtitles found: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Dragon Ball]
Fetching episode data for [Dragon Ball]
Fetching episode data for [Dragon Ball Z]
Fetching episode data for [Dragon Ball GT]
Fetching episode data for [Dragon Ball Kai]
Fetching episode data for [Dragon Ball Super]
[TEST] from [/volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv] to [/Dragon Ball (1986)/Staffel 01/Dragon Ball - S01E01 - Das Geheimnis des Dragonballs.mkv]
[TEST] from [/volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv] to [/Dragon Ball (1986)/Staffel 01/Dragon Ball - S01E05 - Yamchu der Wüstenräuber.mkv]
Processed 2 files
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv]
[TEST] from [/volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv] to [/volume1/Filme/Rush Hour (1998)/Rush Hour (1998).mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
------------------------------------------

[Process completed]
Output from CLI (PowerShell):

Code: Select all

docker run --rm --volumes-from Filebot_GUI --mount type=bind,source="Z:\Downloads",target=/volume1 --name Filebot rednoah/filebot -script 'fn:amc' /volume1/JDownloader/ --output /volume1/ --action TEST -non-strict --order Airdate --conflict auto --lang de --def 'music=y' 'unsorted=y' 'artwork=y' 'subtitles=eng' 'clean=y' 'deleteAfterExtract=y' 'minLengthMS=0' 'minFileSize=0' 'seriesFormat={certification == "\""TV-Y"\"" || certification == "\""TV-Y7"\"" || certification == "\""TV-G"\"" ? "\""Kinderserien"\"" : "\""Serien"\""}/{n} ({y})/{episode.special ? "\""Special"\"" :"\""Staffel "\""+s.pad(2)}/{n} - {episode.special ? "\""S00E"\""+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart("\"", Part ${1}"\"")}{"\""."\""+lang}' 'animeFormat={certification == "\""TV-Y"\"" || certification == "\""TV-Y7"\"" || certification == "\""TV-G"\"" ? "\""Kinderserien"\"" : "\""Serien"\""}/{n} ({y})/{episode.special ? "\""Special"\"" : "\""Staffel "\""+s.pad(2)}/{n} - {episode.special ? "\""S00E"\""+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart("\"", Part ${1}"\"")}{"\""."\""+lang}' 'movieFormat={certification == "\""G"\"" || certification == "\""PG"\"" ? "\""Kinderfilme"\"" : "\""Filme"\""}/{n} ({y})/{n} ({y}) {"\"" CD"\""+pi}' 'musicFormat=Musik/{n}/{album}/{media.TrackPosition.pad(2)} - {t}' 'unsortedFormat=Unbekannt/{fn}.{cf}' 'excludeList=.excludes' --log all --log-file '/usr/local/filebot-node/data/filebot.log'
Locking /usr/local/filebot-node/data/filebot.log
Run script [fn:amc] at [Fri Sep 07 07:00:20 UTC 2018]
Parameter: music = y
Parameter: unsorted = y
Parameter: artwork = y
Parameter: subtitles = eng
Parameter: clean = y
Parameter: deleteAfterExtract = y
Parameter: minLengthMS = 0
Parameter: minFileSize = 0
Parameter: seriesFormat = {certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? "Kinderserien" : "Serien"}/{n} ({y})/{episode.special ? "Special" : "Staffel "+s.pad(2)}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(", Part ${1}")}{"."+lang}
Parameter: animeFormat = {certification == "TV-Y" || certification == "TV-Y7" || certification == "TV-G" ? "Kinderserien" : "Serien"}/{n} ({y})/{episode.special ? "Special" : "Staffel "+s.pad(2)}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t.replaceAll(/[!?.]+$/).replacePart(", Part ${1}")}{"."+lang}
Parameter: movieFormat = {certification == "G" || certification == "PG" ? "Kinderfilme" : "Filme"}/{n} ({y})/{n} ({y}) {" CD"+pi}
Parameter: musicFormat = Musik/{n}/{album}/{media.TrackPosition.pad(2)} - {t}
Parameter: unsortedFormat = Unbekannt/{fn}.{cf}
Parameter: excludeList = .excludes
Argument[0]: /volume1/JDownloader
Use excludes: /volume1/.excludes (1)
Input: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv
Input: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv
Input: /volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv
rush.hour.h264.br-rip.mkv [series: Rush Hour, movie: Rush Hour (1998)]
Exclude Series: Rush Hour
Group: [tvs:dragon ball] => [dragon.ball.s01e01.h264.br-rip.mkv, dragon.ball.s01e05.h264.br-rip.mkv]
Group: [tvs:null, mov:rush hour 1998] => [rush.hour.h264.br-rip.mkv]
Get [English] subtitles for 2 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv
No matching subtitles found: /volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv
Rename episodes using [TheTVDB]
Auto-detected query: [Dragon Ball]
Fetching episode data for [Dragon Ball]
Fetching episode data for [Dragon Ball Z]
Fetching episode data for [Dragon Ball GT]
Fetching episode data for [Dragon Ball Kai]
Fetching episode data for [Dragon Ball Super]
[TEST] from [/volume1/JDownloader/Dragon Ball/dragon.ball.s01e01.h264.br-rip.mkv] to [/Dragon Ball (1986)/Staffel 01/Dragon Ball - S01E01 - Das Geheimnis des Dragonballs.mkv]
[TEST] from [/volume1/JDownloader/Dragon Ball/dragon.ball.s01e05.h264.br-rip.mkv] to [/Dragon Ball (1986)/Staffel 01/Dragon Ball - S01E05 - Yamchu der Wüstenräuber.mkv]
Processed 2 files
Get [English] subtitles for 1 files
Looking up subtitles by hash via OpenSubtitles
No matching subtitles found: /volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv]
[TEST] from [/volume1/JDownloader/Rush Hour/I/rush.hour.h264.br-rip.mkv] to [/volume1/Filme/Rush Hour (1998)/Rush Hour (1998).mkv]
Processed 1 files
Done ヾ(@⌒ー⌒@)ノ
As you can see, Dragon Ball is not moved into the "volume1/Serien/..." folder as expected, but to "/Dragon Ball/...", what makes no sense. Any idea what's going wrong?

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 07 Sep 2018, 18:30

I'm not sure what the problem is. Do you have a simple test case that illustrates the problem?

A quick glance shows that you might not take the exceptional / undefined case into account:
viewtopic.php?f=5&t=1895


e.g. if certification is undefined, the expression will fail, and the result will be nothing, and not "Filme" as you might expect from this code:

Code: Select all

{certification == "G" || certification == "PG" ? 'Kinderfilme' : 'Filme'}
e.g. take certification undefined into account like this:

Code: Select all

{any{if (certification == "G" || certification == "PG") 'Kinderfilme'}{'Filme'}}
:idea: Please read the FAQ and How to Request Help.

kim
Power User
Posts: 667
Joined: 15 May 2014, 16:17

Re: Help! Seperating Movies into different folders HD & 4k

Post by kim » 07 Sep 2018, 20:22

Or, even better make an account and update the info... Rating/Certification here:

https://www.thetvdb.com/series/dragon-ball
https://www.themoviedb.org/tv/12609-dra ... uage=en-US

Redskyer
Posts: 2
Joined: 07 Sep 2018, 06:21

Re: Help! Seperating Movies into different folders HD & 4k

Post by Redskyer » 07 Sep 2018, 22:09

rednoah wrote:
07 Sep 2018, 18:30
I'm not sure what the problem is. Do you have a simple test case that illustrates the problem?

A quick glance shows that you might not take the exceptional / undefined case into account:
viewtopic.php?f=5&t=1895


e.g. if certification is undefined, the expression will fail, and the result will be nothing, and not "Filme" as you might expect from this code:

Code: Select all

{certification == "G" || certification == "PG" ? 'Kinderfilme' : 'Filme'}
e.g. take certification undefined into account like this:

Code: Select all

{any{if (certification == "G" || certification == "PG") 'Kinderfilme'}{'Filme'}}
That is the solution for my problem! :D
Thank you very much!

@kim: That's also a good idea. Everytime I see a problem like this, I'll update the database.

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 06 Oct 2018, 16:20

Code: Select all

\\192.168.0.111\{vf =~ /2160p/ ? 'UHD Movies' : 'Multimedia/Movies'}/{ny} [{certification}]/{n.colon(' - ')} ({y}) [ {vf} {vc} {bitdepth}bit {ac} {channels} ]
With moving fIles to different folders using resolution is it also possible to add another folder for just 3d movies?

E.g depending on whether its 2160p,3d or standard movie?

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 06 Oct 2018, 17:36

Yes, works exactly the same:

Code: Select all

{f =~ /3D/ ? '3D Movies' : vf =~ /2160p/ ? 'UHD Movies' : 'Multimedia/Movies'}
:!: How you identify 3D Movies is more tricky though. In this example we assume that 3D movies have "3D" in the file path.
:idea: Please read the FAQ and How to Request Help.

CHA0SENG7NE
Posts: 35
Joined: 19 Apr 2017, 22:13

Re: Help! Seperating Movies into different folders HD & 4k

Post by CHA0SENG7NE » 06 Oct 2018, 20:40

Thank you. That does make sense but as you are relying on the file containing 3d. Can you add extra options? Say 3-d or 3.d ? Just to give more chance?

Is this correct ?

Code: Select all

{f =~ /3D|3.d|3-d/ ? '3D Movies' : vf =~ /2160p/ ? 'UHD Movies' : 'Multimedia/Movies'}
Thanks again Rednoah

kim
Power User
Posts: 667
Joined: 15 May 2014, 16:17

Re: Help! Seperating Movies into different folders HD & 4k

Post by kim » 06 Oct 2018, 23:51

Regular Expression: https://regexr.com/

Code: Select all

{f =~ /(?i)3D|3\.D|3\-D/ ? '3D Movies' : '3D...NOT!'}

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

Re: Help! Seperating Movies into different folders HD & 4k

Post by rednoah » 07 Oct 2018, 06:00

On a related note, does anybody have a large collection of 3D movies? Does anybody know any heuristics based on the mediainfo data we can use to detect 3D movies? Like maybe very odd aspect ratio? Or some other 3D encoding field?
:idea: Please read the FAQ and How to Request Help.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests