AMC Script no longer moving shows based on rating

Any questions? Need some help?
Post Reply
valiantslack
Posts: 15
Joined: 17 Jun 2019, 17:10

AMC Script no longer moving shows based on rating

Post by valiantslack »

I have an amc script where it would move kids shows to a specific folder based on rating (TV-Y & TV-Y7). For some reason some shows rated as TV-Y are getting moved into the adult tv shows section. Any ideas why this is the case?

Fore example the show T.O.T.S shows as TV-Y in TheMovieDB.

Script

Shell: Select all

-script
fn:amc
--output
N:/ 
--action 
move 
--conflict 
skip 
--def 
clean=y 
--def 
ignore=2160p|AMC|Extracted|Placeholder
--def
pushover=*************
-non-strict
N:/Media/#Unprocessed
--def
movieFormat=N:/Media/Movies/{ any{ certification ==~ /G|PG/ ? 'Family' : 'Adults' }{ 'Adults' } }/{ ~plex ** { ' ' + [vf] + [certification] } }{ [group] }
seriesFormat=N:/Media/TV Shows/{ any{ certification ==~ /TV-Y|TV-Y7/ ? 'Kids TV' : 'Adults' }{ 'Adults'} }/{plex.tail} 
--log-file 
N:/Media/#Unprocessed/AMC/amc.log
--def
excludeList=N:/Media/#Unprocessed/AMC/amcexclude.txt
--action
test
Output from test files

Console Output: Select all

Rename episodes using [TheMovieDB] with [Airdate Order]
Lookup via [Curious George] [Curious George]
Fetching episode data for [Curious George]
?? 398 episodes
[TEST] from [N:\Media\#Unprocessed\Curious George - S01E18 - Squirrel For a Day.mkv] to [N:\Media\TV Shows\Kids TV\Cur
ious George\Season 01\Curious George - S01E18 - Squirrel For a Day.mkv]
Processed 1 file
Rename episodes using [TheMovieDB] with [Airdate Order]
Lookup via [T.O.T.S.] [T O T S]
Fetching episode data for [T.O.T.S.]
?? 150 episodes
[TEST] from [N:\Media\#Unprocessed\T.O.T.S. - S03E01 - Super Baby.mkv] to [N:\Media\TV Shows\Adults\T.O.T.S\Season 03\
T.O.T.S. - S03E01 - Super Baby.mkv]
Processed 1 file
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Script no longer moving shows based on rating

Post by rednoah »

:?: What is the value of {certification} for these shows? You'll want to run a test in the FileBot Desktop application and use {certification} as format so you can see the value.

:idea: Should work though:

Console Output: Select all

$ filebot -rename . --db TheMovieDB::TV -non-strict --format "{certification}/{ any{ certification ==~ /G|PG/ ? 'Family' : 'Adults' }{ 'Adults' } }/{plex.name}" --log INFO --action TEST
[TEST] from [Curious George - S01E18 - Squirrel For a Day.mkv] to [TV-Y/Adults/Curious George - S01E18 - Squirrel For a Day.mkv]
[TEST] from [T.O.T.S. - S03E01 - Super Baby.mkv] to [G/Family/T.O.T.S. - S03E01 - Super Baby.mkv]



:?: What does filebot -script fn:sysinfo say?
:idea: Please read the FAQ and How to Request Help.
valiantslack
Posts: 15
Joined: 17 Jun 2019, 17:10

Re: AMC Script no longer moving shows based on rating

Post by valiantslack »

Adding {certification} to the format returns the show TOTS as G (TheMovieDB Episode mode) However, TheMovieDB website shows the show TOTS as TV-Y, not G

Groovy: Select all

T:/TV Shows/Kids/ {n}/{'Season '+s}/{n} - {s00e00} - {t} - {certification}

Console Output: Select all

FileBot 5.0.1 (r9665)
JNA Native: 6.1.4
MediaInfo: 22.12
7-Zip-JBinding: 16.02
Tools: fpcalc/1.5.0
Extended Attributes: DISABLED
Unicode Filesystem: OK
Script Bundle: 2023-07-19 (r910)
Groovy: 4.0.9
JRE: OpenJDK Runtime Environment 17.0.6
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 6 Core / 2.1 GB Max Memory / 67 MB Used Memory
OS: Windows 10 (amd64)
STORAGE: NTFS [(C:)] @ 34 GB | NTFS [New Volume] @ 199 GB | FAT32 [Google Drive] @ 32 GB | NTFS [Data] @ 14 TB
DATA: C:\Users\*****\AppData\Roaming\FileBot
Package: MSI
License: FileBot License PX51766450 (Valid-Until: 2073-07-25)
Also tried adding the below to my @ file, but it appears to ignore it as it's not valid. However the output shows it's already using TheMovieDB as the db.
--db
TheMovieDB::TV
Last edited by valiantslack on 26 Jul 2023, 15:24, edited 1 time in total.
valiantslack
Posts: 15
Joined: 17 Jun 2019, 17:10

Re: AMC Script no longer moving shows based on rating

Post by valiantslack »

Udpate: I added "G" and "TV-G" and it now seems to move them to the correct place.

Groovy: Select all

seriesFormat=N:/Media/TV Shows/{ any{ certification ==~ /G|TV-G|TV-Y|TV-Y7/ ? 'Kids TV' : 'Adults' }{ 'Adults'} }/{plex.tail}
Also added the below in my @ file, but it seems to be redundant.

Groovy: Select all

--def
seriesDB=TheMovieDB::TV
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC Script no longer moving shows based on rating

Post by rednoah »

TOTS shows up as G to me. Keep in mind that the website will show you the localized certification value, so the display value may change depending on your language preferences. You'll want to work with the values that FileBot sees when writing conditions.
:idea: Please read the FAQ and How to Request Help.
Post Reply