Trying to understand how this was matched

Any questions? Need some help?
Post Reply
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Trying to understand how this was matched

Post by 2devnull »

This is my file list. It was taken from MythTV a while ago and I named them based on the date and time, basically leaving the MythTV name and adding part of the name of the show.

Code: Select all

-rw-r--r-- 1 2devnull 1000 2575562588 Apr  8  2014 AgentOfSHIELD_20140408.mpg
-rw-r--r-- 1 2devnull 1000 2878300304 Dec  9  2013 AgentsOfSHIELD__20131119.mpg
-rw-r--r-- 1 2devnull 1000 2795252620 Dec  9  2013 AgentsOfSHIELD_20131126.mpg
-rw-r--r-- 1 2devnull 1000 2850906636 Dec 12  2013 AgentsOfSHIELD_20131210.mpg
-rw-r--r-- 1 2devnull 1000 2819309476 Jan 16  2014 AgentsOfSHIELD_20140114.mpg
-rw-r--r-- 1 2devnull 1000 2693690320 Mar 10  2014 AgentsOfSHIELD_20140304.mpg
-rw-r--r-- 1 2devnull 1000 2858217204 Mar 12  2014 AgentsOfSHIELD_20140311.mpg
-rw-r--r-- 1 2devnull 1000 2581112160 Apr 22  2014 AgentsOfSHIELD_20140422.mpg
-rw-r--r-- 1 2devnull 1000 2732695244 Apr 29  2014 AgentsOfSHIELD_20140429.mpg
-rw-r--r-- 1 2devnull 1000 2869703440 May  6  2014 AgentsOfSHIELD_20140506.mpg
-rw-r--r-- 1 2devnull 1000 2675121372 May 13  2014 AgentsOfSHIELD_20140513.mpg
-rw-r--r-- 1 2devnull 1000 2443690928 Mar  8  2015 AgentsOfSHIELD_20150303.mpg
-rw-r--r-- 1 2devnull 1000 2702815840 Nov  5  2013 Marvel_SHIELD_20131105.mpg
-rw-r--r-- 1 2devnull 1000 2997731816 Jan  9  2014 Marvel_SHIELD_20140107.mpg
-rw-r--r-- 1 2devnull 1000 3153695676 Feb  4  2014 Marvel_SHIELD_20140204.mpg
Using this:

Code: Select all

~/filebot# filebot -script fn:amc --output "/root/filebot" --action test -non-strict "/storage/Media/TV Shows/SHIELD" --filter "n != /The Shield/" --log-file amc.log --def excludeList=amc3.txt

Code: Select all

Locking /root/.filebot/logs/amc.log
Run script [fn:amc] at [Tue Feb 09 12:36:14 EST 2016]
Parameter: excludeList = amc3.txt
Argument: /media/shows/Media/TV Shows/SHIELD
Creating excludes: /root/filebot/amc3.txt
Input: /media/shows/Media/TV Shows/SHIELD/AgentOfSHIELD_20140408.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20131126.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20131210.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140114.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140304.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140311.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140422.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140429.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140506.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140513.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20150303.mpg
Input: /media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD__20131119.mpg
Input: /media/shows/Media/TV Shows/SHIELD/Marvel_SHIELD_20131105.mpg
Input: /media/shows/Media/TV Shows/SHIELD/Marvel_SHIELD_20140107.mpg
Input: /media/shows/Media/TV Shows/SHIELD/Marvel_SHIELD_20140204.mpg
Group: [tvs:shield] => [AgentOfSHIELD_20140408.mpg, AgentsOfSHIELD_20131126.mpg, AgentsOfSHIELD_20131210.mpg, AgentsOfSHIELD_20140114.mpg, AgentsOfSHIELD_20140304.mpg, AgentsOfSHIELD_20140311.mpg, AgentsOfSHIELD_20140422.mpg, AgentsOfSHIELD_20140429.mpg, AgentsOfSHIELD_20140506.mpg, AgentsOfSHIELD_20140513.mpg, AgentsOfSHIELD_20150303.mpg, AgentsOfSHIELD__20131119.mpg, Marvel_SHIELD_20131105.mpg, Marvel_SHIELD_20140107.mpg, Marvel_SHIELD_20140204.mpg]
Rename episodes using [TheTVDB]
Auto-detected query: [Shield, AgentOfSHIELD, AgentsOfSHIELD, Marvel SHIELD]
Fetching episode data for [Marvel's Agents of S.H.I.E.L.D.]
Fetching episode data for [The Shield]
Apply Filter: {n != /The Shield/}
Include [Marvel's Agents of S.H.I.E.L.D. - 1x01 - Pilot]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x02 - 0-8-4]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x03 - The Asset]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x04 - Eye Spy]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x05 - Girl in the Flower Dress]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x06 - F.Z.Z.T.]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x07 - The Hub]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x08 - The Well]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x09 - Repairs]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x10 - The Bridge]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x11 - The Magical Place]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x12 - Seeds]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x13 - T.R.A.C.K.S.]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x14 - T.A.H.I.T.I.]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x15 - Yes Men]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x16 - End of the Beginning]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x17 - Turn, Turn, Turn]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x18 - Providence]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x19 - The Only Light in the Darkness]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x20 - Nothing Personal]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x21 - Ragtag]
Include [Marvel's Agents of S.H.I.E.L.D. - 1x22 - Beginning of the End]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x01 - Shadows]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x02 - Heavy Is the Head]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x03 - Making Friends and Influencing People]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x04 - Face My Enemy]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x05 - A Hen in the Wolf House]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x06 - A Fractured House]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x07 - The Writing on the Wall]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x08 - The Things We Bury]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x09 - ...Ye Who Enter Here]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x10 - What They Become]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x11 - Aftershocks]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x12 - Who You Really Are]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x13 - One of Us]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x14 - Love in the Time of Hydra]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x15 - One Door Closes]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x16 - Afterlife]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x17 - Melinda]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x18 - The Frenemy of My Enemy]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x19 - The Dirty Half Dozen]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x20 - Scars]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x21 - S.O.S. (1)]
Include [Marvel's Agents of S.H.I.E.L.D. - 2x22 - S.O.S. (2)]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x01 - Laws of Nature]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x02 - Purpose in the Machine]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x03 - A Wanted (Inhu)man]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x04 - Devils You Know]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x05 - 4,722 Hours]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x06 - Among Us Hide...]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x07 - Chaos Theory]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x08 - Many Heads, One Tale]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x09 - Closure]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x10 - Maveth]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x11 - Bouncing Back]
Include [Marvel's Agents of S.H.I.E.L.D. - 3x12 - ]
Include [Marvel's Agents of S.H.I.E.L.D. - 0xSpecial 1 - Special Look]
Include [Marvel's Agents of S.H.I.E.L.D. - 0xSpecial 2 - Marvel Studios: Assembling a Universe]
Include [Marvel's Agents of S.H.I.E.L.D. - 0xSpecial 3 - Double Agent: Infiltrating the Set]
Include [Marvel's Agents of S.H.I.E.L.D. - 0xSpecial 4 - Double Agent: Searching For Secrets]
Include [Marvel's Agents of S.H.I.E.L.D. - 0xSpecial 5 - Double Agent: Security Alert]
Include [Marvel's Agents of S.H.I.E.L.D. - 0xSpecial 6 - Double Agent: Post Heist]
Include [Marvel's Agents of S.H.I.E.L.D. - 0xSpecial 7 - Double Agent: The Mastermind Is Revealed]
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E08 - The Things We Bury
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E01 - Shadows
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E10 - What They Become
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E20 - Scars
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E04 - Face My Enemy
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E11 - Aftershocks
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E22 - S.O.S., Part 2
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E21 - S.O.S., Part 1
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E06 - A Fractured House
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E13 - One of Us
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E16 - Afterlife
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E19 - The Dirty Half Dozen
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E05 - A Hen in the Wolf House
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E17 - Melinda
Stripping invalid characters from new path: TV Shows/Marvel's Agents of S.H.I.E.L.D./Season 03/Marvel's Agents of S.H.I.E.L.D. - S03E01 - Laws of Nature
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentOfSHIELD_20140408.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E08 - The Things We Bury.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20131126.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E01 - Shadows.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20131210.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E10 - What They Become.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140114.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E20 - Scars.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140304.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E04 - Face My Enemy.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140311.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E11 - Aftershocks.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140422.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E22 - S.O.S., Part 2.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140429.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E21 - S.O.S., Part 1.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140506.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E06 - A Fractured House.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20140513.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E13 - One of Us.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20150303.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E16 - Afterlife.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD__20131119.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E19 - The Dirty Half Dozen.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/Marvel_SHIELD_20131105.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E05 - A Hen in the Wolf House.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/Marvel_SHIELD_20140107.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E17 - Melinda.mpg]
[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/Marvel_SHIELD_20140204.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 03/Marvel's Agents of S.H.I.E.L.D. - S03E01 - Laws of Nature.mpg]
Processed 15 files
Done ヾ(@⌒ー⌒@)ノ

If you look at the dates, I am not sure what filebot used to determine what video files matched what season and episode. It seems earlier shows have later season and episodes and vice versa. But the fact that filebot chose specific episodes and seasons for these files makes me think it got some other info from the file to make that determination?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to understand how this was matched

Post by rednoah »

1.
You might wanna clean up the input a little bit. :D
viewtopic.php?f=3&t=2072

AgentOfSHIELD_20140408 is not something it'll work with out of the box. If you transform it it to Agents.Of.SHIELD_2014.04.08 it'll just work.


2.
This means that the input didn't make any sense to filebot, but with -non-strict it'll just pick a match anyway, so the output won't make any sense:

Code: Select all

[TEST] Rename [/media/shows/Media/TV Shows/SHIELD/AgentOfSHIELD_20140408.mpg] to [/root/filebot/TV Shows/Marvel's Agents of S.H.I.E.L.D/Season 02/Marvel's Agents of S.H.I.E.L.D. - S02E08 - The Things We Bury.mpg]

EDIT:

r3528 now recognizes yyyymmdd as valid date pattern.
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

Alright, great.....wish I read this before. Since there were a couple of handful, I added the Season and Episode numbers and it picked it up. I will definitely use that clean up option next time:

This is what worked:
/media/shows/Media/TV Shows/SHIELD/AgentOfSHIELD_20140408_S01E17.mpg
/media/shows/Media/TV Shows/SHIELD/AgentsOfSHIELD_20131126_S01E09.mpg
/media/shows/Media/TV Shows/SHIELD/Agents.of.SHIELD.S02E12.mpg
/media/shows/Media/TV Shows/SHIELD/Agents.of.SHIELD.S01E15.mpg
/media/shows/Media/TV Shows/SHIELD/Agents.of.SHIELD.S01E19.mpg
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

Hi rednoah, let me know if I should start a new thread for this. I am trying to understand what the best way to name a file to ensure filebot can identify the show/movie and sort it. As related to this thread, I have to take the mythtv numeric name, look up the show info from its database and come up with a name that filebot can accurately identify. These two from the Steve Harvey show ended up in Unsorted.

Code: Select all

Steve.Harvey.2016-05-02.Family.Therapy_s.Dr_.mpg
Steve.Harvey.2016-05-03.It_s.the.Twin.Hour_..mpg
Here is the filebot CLI I am using:

Code: Select all

filebot -script fn:amc --output "/storage/MythTV-Hardlinks" --action move -non-strict "/storage/mythtv/data/hardlinks" --log-file amc.log --conflict override --def excludeList=amc.txt --filter "(age < 30 || !model.any{ it.age < 30 } || info.ratingCount > 10)" --def unsorted=y --def clean=y
I am using hardlink instead of symlinks as kodi with emby plugin does not work with symlinks. So once I create a show name hardlink from mythtv, I let filebot sort and move it to a location where emby path substitution exposes it to be streamed to kodi via NFS.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to understand how this was matched

Post by rednoah »

Presumably, your filter excludes all possible matches, leaving none, and thus files end up in unsorted.
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

ok, I removed the filter completely, it now sorts it to the right folder but the meta-data seems to be incorrect:

Code: Select all

Locking /opt/filebot/data/root/logs/amc.log
Run script [fn:amc] at [Tue May 03 13:00:49 EDT 2016]
Parameter: excludeList = amc.txt
Parameter: unsorted = y
Parameter: clean = y
Argument: /storage/mythtv/data/hardlinks
Using excludes: /storage/emby/MythTV-Hardlinks/amc.txt (602)
Input: /storage/mythtv/data/hardlinks/Steve.Harvey.2016-05-03.It_s.the.Twin.Hour_..mpg
Group: [tvs:steve harvey] => [Steve.Harvey.2016-05-03.It_s.the.Twin.Hour_..mpg]
Rename episodes using [TheTVDB]
Auto-detected query: [Steve Harvey]
Fetching episode data for [Steve Harvey]
Fetching episode data for [The Steve Harvey Show]
Stripping invalid characters from new path: TV Shows/Steve Harvey/Season 03/Steve Harvey - S03E46 - First Ever Steve Harvey College Town Hall; "Freshman 15"; Daughter Leaving for College
[MOVE] Rename [/storage/mythtv/data/hardlinks/Steve.Harvey.2016-05-03.It_s.the.Twin.Hour_..mpg] to [/storage/emby/MythTV-Hardlinks/TV Shows/Steve Harvey/Season 03/Steve Harvey - S03E46 - First Ever Steve Harvey College Town Hall; Freshman 15; Daughter Leaving for College.mpg]
Processed 1 files
Clean clutter files and empty folders
Done ヾ(@⌒ー⌒@)ノ
Here is the show title and sub-title from mythtv:

Code: Select all

Steve Harvey:
It's the Twin Hour! Steve's Twin Daughters Co-Host, With an Audience Full of Identical Twins!
Tue, May 3, 09:00 AM to 10:00 AM (60 mins)

Code: Select all

Steve's twin daughters, Karli and Brandi; twin guests Delpha and Delerice return; identical twins who look like Bradley Cooper tell of crashing A-list parties; stylist Lawrence Zarian and his twin brother, Gregory, help two sets of twins with style. (HDTV, Widescreen, CC, Stereo)




EDIT: It appears TVDB or TVRage do not have the right info. Anyway to get filebot to use the info in the filename? i.e. Can I put some delimiters on the filename where filebot would pick it out of instead of relying on the external services?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to understand how this was matched

Post by rednoah »

1.
If you do that then you don't need filebot at all. :D


2.
What you want is doable by providing a custom format for Unsorted. In this case you want to make sure that things are processed as unsorted by passing "other" as label.

You can get some inspiration here:
viewtopic.php?f=3&t=2072
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

lol...not sure...I guess filebot helps me with determining whether it is a tv show or movie and hopefully sports
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

OK, per your last link I can understand creating the xml file with the meta data. However two things, where can I find a schema of how to format the xml for non-coming and also how do I take the following and put it in my bash script file:

Code: Select all

{xml = new XmlSlurper().parse(folder/fn+'.xml'); [xml.Series, xml.Number, xml.Series, xml.Title].join(' - ')}
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to understand how this was matched

Post by rednoah »

1.
You want to create those xml files yourself? That seems pretty stupid to me.

Whatever you're doing, the only thing you want to modify is the format. You adjust the format to use your metadata, in whatever form it may exist (part of the filename, external files, etc) and generate filenames accordingly.

Also, use the GUI Format Editor.


2.
Actually, I have no idea what you're trying to do. If FileBot can't match the files, then there's not much you can add. All the information you'll ever get about the file is already there.
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

Well, if I can avoid having to create xml files, then I totally agree, I wouldn't want to. As for #2, it appears mythTV (using Schedules Direct data) has data that TVDB or other services may not/does not have (e.g. with the Steve Harvey example referenced earlier).

I feel there is a gap in my understanding for filebot between the CLI and what the GUI Format Editor can supplement. Does the GUI Editor give the syntax to be used in the CLI?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to understand how this was matched

Post by rednoah »

1.
I guess you need to play with the format first:
http://www.filebot.net/naming.html

While format "coding" is not exactly rocket science, it still requires some basic coding skills (if you want to express somewhat complicated logic, like the xml example).


2.
This is seems like the kind of thread were I spend lots of time answering questions in detail, and you eventually give up because it's not out-of-the-box easy.

Everything you need is here in the forums. But if you can exactly specify (with examples) what you want, I might be inclined to do it for you, for a reasonable pay of course. Feel free to make an offer.
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

ok, i will take a look at the reference. I have been coding Java since 1.1 and some other languages like perl, javascript etc since then. I will try to stick with it so as not to waste your time but I do appreciate your assistance. I just need to know how the whole model (pieces) are linked together, i.e. am I writing a new groovy script, modifying amc etc. I just not sure where my starting point is.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to understand how this was matched

Post by rednoah »

Oh, no worries then. If you're a Java guy then you'll be fine. :ugeek:

As for the format, that works exactly the same in GUI and CLI. The amc script allows you to pass in custom formats, so if it's just that then you don't need to modify the amc script.
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

I guess a fundamental concept I am struggling with is does the passed in format apply to the source file or the format you want the file to be renamed to after move? I was thinking the latter and therefore couldn't find out how to tell amc to rename from a particular format I had name the file.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to understand how this was matched

Post by rednoah »

A. You have:
* Current File Path
* Movie/Episode/etc Metadata Object (the object the file was matched with)

B. You want:
* Output File Path


All the format does is get you from A to B.


PS: Keep in mind that there is no distinction between move/rename for a computer so it's a single operation, from A to B.
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

Show not matching correctly. I really think I am not naming these things correctly:

Code: Select all

The.View-2016.05.03---Talk.mpg

Code: Select all


Locking /opt/filebot/data/root/logs/amc.log
Run script [fn:amc] at [Tue May 03 20:07:34 EDT 2016]
Parameter: excludeList = /tmp/amc.excludes
Parameter: unsorted = y
Parameter: clean = y
Argument: /storage/mythtv/data/hardlinks
Creating excludes: /tmp/amc.excludes
Input: /storage/mythtv/data/hardlinks/The.View-2016.05.03---Talk.mpg
Group: [tvs:river cottage australia] => [The.View-2016.05.03---Talk.mpg]
Rename episodes using [TheTVDB]
Auto-detected query: [River Cottage Australia]
Fetching episode data for [River Cottage Australia]
[MOVE] Rename [/storage/mythtv/data/hardlinks/The.View-2016.05.03---Talk.mpg] to [/storage/emby/MythTV-Hardlinks/TV Shows/River Cottage Australia/Season 04/River Cottage Australia - S04E06 - Episode 6.mpg]
Processed 1 files
Clean clutter files and empty folders
Done ヾ(@⌒ー⌒@)ノ

The show is http://www.thetvdb.com/?tab=series&id=72104&lid=7 on TheTVDB

CLI:

Code: Select all

EXCLUDELIST=amc.txt


filebot -script fn:amc \
	--output "/storage/emby/MythTV-Hardlinks" \
	--action move -non-strict "/storage/mythtv/hardlinks" \
	--log-file amc.log --conflict override --def excludeList="${EXCLUDELIST}" \
	--def unsorted=y \
	--format "{n}-{airdate.format('yyyy.MM.dd')}" \
	--def clean=y \


I don't get it, today's episode matched, but yesterday's doesn't. The only thing different in the name is the the day in the airdate field.

Code: Select all


Rename episodes using [TheTVDB]
Auto-detected query: [the view]
Fetching episode data for [The View]
Fetching episode data for [River Cottage]
[MOVE] Rename [/storage/mythtv/data/hardlinks/The.View-2016.05.04---Talk.mpg] to [/storage/emby/MythTV-Hardlinks/TV Shows/The View/Season 2015/The View - S2015E05 - 1 7 15.mpg]
Processed 1 files


Update: I think I see what it may be. TVDB doesn't have anything between 05/01/2016-05/04/2016. Is there a way to put a list of shows in a file that filebot would give preference to, i.e.: The the example above, pick "The View" instead of "River Cottage". I know this doesn't work if I am interested in both shows, but I need to be able to have some consistency for now instead of relying on the accuracy of TheTVDB. I mean, I would think since "The.View" is in the name filebot would give that preference even if TheTVDB doesn't mention an episode for it. If I am doing something wrong, please let me know as I belive filebot is much smarter than I in figuring this out.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to understand how this was matched

Post by rednoah »

1.
There is no episode that aired on 2016.05.03 as far as I can tell:

Code: Select all

filebot -list --q "the view" --format "{n} {sxe} {airdate}"

2.
There is a valid match for this one though, which is probably why it'll get the final match:

Code: Select all

$ filebot -list --q "River Cottage Australia" --format "{n} {sxe} {airdate}" | egrep "2016.05.03"
River Cottage Australia 4x06 2016-05-03

3.
You can do all kinds of crazy shit with the --filter option:
viewtopic.php?f=3&t=2127
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

There was, but TheTVDB is missing it. http://www.imdb.com/title/tt0123366/
S19E160.

Is there a way to tell filebot to still place the file correctly in a MiscSeason (Season0) folder if it doesn't have the Season and Episode data from TheTVDB?
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

Well I added a exclude file with: River Cottage Australia and River Cottage. Now it puts the show into Unsorted. I would have hoped that it would rename with its only remaining choice and out in in the right TV Show subdirectory in an Season0 or UnknownSeason folder instead.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to understand how this was matched

Post by rednoah »

1.
Is there a way to tell filebot to still place the file correctly in a MiscSeason (Season0) folder if it doesn't have the Season and Episode data from TheTVDB?
That's not how it works. You either have a File/Episode match or you don't.


2.
What you can do of course, is a custom unsorted format that handle these files according to your logic:

Code: Select all

TV Shows/{fn.before('-').space(' ')}/Season 0/{fn}
I don't think anybody has ever made complex unsorted format logic and I wouldn't recommend it. You'd probably need a more complex unsorted format that'll handle different kinds of files differently.
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

I see that tvmaze has the info. But when I put --db tvmaze in my script, it doesn't work. it still uses TheTVDB. I was thinking that I can run tvmaze against Unsorted periodically.

Code: Select all

filebot -list --q "the view" --format "{n} {sxe} {airdate}" --db tvmaze

Code: Select all

The View 19x153 2016-04-22
The View 19x154 2016-04-25
The View 19x155 2016-04-26
The View 19x156 2016-04-27
The View 19x157 2016-04-28
The View 19x158 2016-04-29
The View 19x159 2016-05-02
The View 19x160 2016-05-03
The View 19x161 2016-05-04
The View 19x162 2016-05-05
The View 19x163 2016-05-06


But with this:

Code: Select all

filebot -script fn:amc \
	--output "/storage/emby/MythTV-Hardlinks" \
	--action move -non-strict "${INPUTPATH}" \
	--log-file amc.log \
	--conflict override \
	--def excludeList="${PROCESSEDLIST}" \
	--def unsorted=y \
	--format "{n}-{airdate.format('yyyy.MM.dd')}" \
	--filter "!readLines('''/storage/emby/Scripts/excludes.txt''').contains(n)" \
	--db tvmaze \
	--def clean=y \
it is using TheTVDB:

Code: Select all

Locking /opt/filebot/data/root/logs/amc.log
Run script [fn:amc] at [Wed May 04 14:16:37 EDT 2016]
Parameter: excludeList = /storage/emby/Scripts/amc.txt
Parameter: unsorted = y
Parameter: clean = y
Argument: /storage/mythtv/data/hardlinks
Using excludes: /storage/emby/Scripts/amc.txt (612)
Input: /storage/mythtv/data/hardlinks/The.View-2016.05.03---Talk.mpg
Group: [tvs:river cottage australia] => [The.View-2016.05.03---Talk.mpg]
Rename episodes using [TheTVDB]
Auto-detected query: [River Cottage Australia]
Fetching episode data for [River Cottage Australia]
Fetching episode data for [River Cottage]
Apply Filter: {!readLines('''/storage/emby/Scripts/excludes.txt''').contains(n)}
No matching episode: The.View-2016.05.03---Talk.mpg
Failed to match files to episode data
net.filebot.cli.CmdlineException: Failed to match files to episode data
	at net.filebot.cli.CmdlineOperations.renameSeries(CmdlineOperations.java:223)
	at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:110)
	at net.filebot.cli.ScriptShellBaseClass.rename(ScriptShellBaseClass.java:336)
	at Script1$_run_closure72.doCall(Script1.groovy:371)
	at Script1.run(Script1.groovy:356)
	at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
	at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
	at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
	at net.filebot.Main.main(Main.java:120)
Processing 1 unsorted files
[MOVE] Rename [/storage/mythtv/data/hardlinks/The.View-2016.05.03---Talk.mpg] to [/storage/emby/MythTV-Hardlinks/Unsorted/hardlinks/The.View-2016.05.03---Talk.mpg]
Processed 1 files
Clean clutter files and empty folders
Done ヾ(@⌒ー⌒@)ノ

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

Re: Trying to understand how this was matched

Post by rednoah »

The amc script doesn't care about --db just as it doesn't care about --format. You can't and you shouldn't not use TheTVDB.

If you want to call -rename --db tvmaze on your unsorted folder you have to do that separately.
:idea: Please read the FAQ and How to Request Help.
2devnull
Posts: 26
Joined: 09 Feb 2016, 02:07

Re: Trying to understand how this was matched

Post by 2devnull »

rednoah wrote:You can't and you shouldn't not use TheTVDB
Sorry, didn't understand this statement. Did you mean shouldn't use tvmaze as you mentioned fn:amc is using only TheTVDB.

EDIT:
I tried rename and it still chose River Cottage Australia from tvmaze. It shouldn't have fail since tvmaze is returning info for the airdate.

Code: Select all

filebot -list --q "the view" --format "{n} {sxe} {airdate}" --db tvmaze | egrep "2016.05.03"
Post Reply