INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23  (Read 4618 times)

elprice7345

  • World Citizen
  • ***
  • Posts: 237

Thanks for including this request in MC23:
Quote
31. NEW: Carnac understands files by the naming: Series (Year)-S#E#-Name.ext
Based on this earlier thread: https://yabb.jriver.com/interact/index.php/topic,108280.msg766204.html#msg766204

After testing, it is improved, but still needs some work.

Right-clicking on a file named "Animal Kingdom (2016)-S02E04-Broken Boards.ts" and selecting "Fill properties from filename..." produces the attached Animal.jpg

Carnac changes:
  • The date from the broadcast date to the "series date"
  • The leading zeroes from the season and episode numbers are added back
  • The series date is removed from the series title
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1971
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #1 on: June 24, 2017, 03:52:46 pm »

Doctor Who (2005) doesn't work also
Logged

elprice7345

  • World Citizen
  • ***
  • Posts: 237
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #2 on: June 29, 2017, 11:26:51 am »

Thanks for including this request in MC23:Based on this earlier thread: https://yabb.jriver.com/interact/index.php/topic,108280.msg766204.html#msg766204

After testing, it is improved, but still needs some work.

Right-clicking on a file named "Animal Kingdom (2016)-S02E04-Broken Boards.ts" and selecting "Fill properties from filename..." produces the attached Animal.jpg

Carnac changes:
  • The date from the broadcast date to the "series date"
  • The leading zeroes from the season and episode numbers are added back
  • The series date is removed from the series title
Some progress with 23.0.13 - 1 of 3 issues are fixed - leading zeroes are removed.

Still need to address:
  • The date is changed from the OAD to the "series date"
  • The series date is removed from the series title
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #3 on: June 29, 2017, 08:08:30 pm »

Actually, I liked the zero padded Season and Episode numbers, because it made everything line up correctly, and was visually more pleasing, which I think is why it is almost always included in file naming from almost any source. But, oh well, it is gone now.

On the other issues, it seems that there is a massive communication disconnect, and I can't understand why. The issue has been explained thoroughly in this and the earlier thread.


As per numerous examples, the file named:

"Doctor Who (2005) - S10E05 - Oxygen.mkv"

Should be read as;
[Series] = "Doctor Who (2005)"
[Season] = "10"
[Episode] - "5"  or "05" with previous functionality.  :'(
[Name] = "Oxygen"

The [Year] tag should not be set by CARNAC, because there is no air date information in the file name. No [Year] information at all. That should be looked up on TheTVDB.

Could we have CARNAC do that, and only that please?


Of course, I understand that there could be some valid date information in the file name, and CARNAC has functionality to read that. But I have rarely seen a file name with valid date information in it, and it is not in brackets at the beginning of the file name as in the various examples provided. There have been such files in the past, but isn't there a way these newer files could be differentiated from the old files?

Ironically, the only files I found with the year in the name were some copies of Doctor Who episodes from 2010 in the name format "Doctor.Who.2010.5x03.Victory To The Daleks.avi", for which CARNAC set the [Year] to 2010, which is correct. But the shows were incorrectly identified as from Series 5 of the original 1960's Doctor Who series, because the "Get Movie & TV Info..." function would have found the series "Doctor Who" (TheTVDB ID 76107) on TheTVDB, and not the correct "Doctor Who (2005)" (TheTVDB ID 78804).

Of course, there are issues. Such as if, like me, users have renamed the [Series] tag "Doctor Who (2005)" to just "Doctor Who" in MC and left TheTVDB ID tag set to 78804 so that the "Get Movie & TV Info..." function will find the correct program, the new file will be interpreted as a new series called "Doctor Who (2005)", TheTVDB tag won't be set correctly initially based on it being a relational field, but the lookup on TheTVDB would work correctly and find the correct metadata, including the TheTVDB ID of 78804. That will create problems, as now two different series names have the same TheTVDB ID. Also, other relational fields used for the series, which I have, won't work on the new file.

Also, if users have episodes from recordings and some from imported files, those from recordings will most likely have the [Series] tag set to "Doctor Who", as that is what is included in most EPG data. A tag rule would be required in the recording rule to change that tag to "Doctor Who (2005)" so that all episodes are identified as the one series, from all sources. Users (Glynor and I at least) will need to leave the [Series] name set to the same as what it is on TheTVDB, "Doctor Who (2005)".

Thanks for trying again to fix this.



PS: If you are a masochist, and want to think about the implications of CARNAC, EPG Data, and how recordings work, including the "Get Movie & TV Info.." function, read on over here: https://yabb.jriver.com/interact/index.php/topic,111229.0.html
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

elprice7345

  • World Citizen
  • ***
  • Posts: 237
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #4 on: July 19, 2017, 10:47:15 am »

Still waiting for this simple fix ...  ?
Logged

Ashfall

  • World Citizen
  • ***
  • Posts: 179
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #5 on: July 21, 2017, 05:43:35 am »

Filename:
Nashville (2012) - S05E19 - You Can't Lose Me.mkv

Auto-imported and shows up with Date set to 2012 instead of 7/20/2017.  All other fields are correct.
Version 23.0.21.
Logged

Ashfall

  • World Citizen
  • ***
  • Posts: 179
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #6 on: July 22, 2017, 07:09:57 am »

Here's an interesting one.

File name:
Killjoys - S03E04 - The Lion, the Witch & the Warlord

Carnac auto-imports the episode name as:
"The Lion, the Witch u0026 the Warlord"
Logged

Ashfall

  • World Citizen
  • ***
  • Posts: 179
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #7 on: July 28, 2017, 08:43:37 am »

File name:

Nashville (2012) - S05E20 - Speed Trap Town.mkv

Carnac set the date to 2012 instead of 7/27/2017.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10721
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #8 on: July 28, 2017, 09:01:02 am »

Nashville (2012) - S05E20 - Speed Trap Town.mkv

Carnac set the date to 2012 instead of 7/27/2017.

This is completely working as designed. It has only the filename and the path to work with, I don't see 7/27/2017 anywhere in there.
Logged
~ nevcairiel
~ Author of LAV Filters

Ashfall

  • World Citizen
  • ***
  • Posts: 179
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #9 on: July 28, 2017, 11:23:49 am »

This is completely working as designed. It has only the filename and the path to work with, I don't see 7/27/2017 anywhere in there.

What about all of the shows that don't have a year in the series name?  Those have always worked perfectly, Carnac picks up the air date from thetvdb.

Some random examples which work perfectly:
Red Dwarf - S11E01 - Twentica.mkv
Firefly - S01E02 - The Train Job.mkv
Madam Secretary - S03E23 - Article 5.mkv

The naming pattern is supposed to be "seriesname - SXXEXX - episodename", isn't it?  We're only having problems with TV shows that have (year) in the seriesname, to distinguish it from another show of the same name.  Such as "Nashville (2012)" and "Doctor Who (2005)".
Logged

elprice7345

  • World Citizen
  • ***
  • Posts: 237
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #10 on: August 04, 2017, 04:30:15 pm »

This is completely working as designed. It has only the filename and the path to work with, I don't see 7/27/2017 anywhere in there.
If that's the case the design is incorrect.

The point here is that when parsing file names into metadata, the year that MC is parsing into the Date field, should actually be included as part of the series name so that it matches the series name in theTVDB and shouldn't populate any date fields, at least for TV Shows. Most series file naming conventions don't use date, so dates should probably be ignored if they are part of the file name.

The Date field for series should be populated from the OAD that resides in theTVDB when the user Gets Movie and TV info from theTVDB.

Here's an interesting one.

File name:
Killjoys - S03E04 - The Lion, the Witch & the Warlord

Carnac auto-imports the episode name as:
"The Lion, the Witch u0026 the Warlord"
MC is interpreting "&" from theTVDB episode name and replacing it with the Unicode value "u0026".


Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #11 on: August 16, 2017, 07:34:59 pm »

What about all of the shows that don't have a year in the series name?  Those have always worked perfectly, Carnac picks up the air date from thetvdb.

A bit of a correction on this issue.

CARNAC doesn't look up TheTVDB at all. All CARNAC does is read the file name during import, and try to determine what the file is, based on the name. That's all. Nothing else.

However, if you import a file using Auto Import and it is determined to be a "TV Show" or "Movie", and you have the "Get Movie & TV Info..." function turned on in Auto Import, then immediately after import the "Get Movie & TV Info..." function looks up the program on TheTVDB. That is where the Air Date comes from.

Anyway, I just Auto Imported a file named as per my above example, "Doctor Who (2005) - S10E05 - Oxygen.mkv". As I didn't have any Doctor Who episodes in the test library I am using, CARNAC identified the program as "Doctor Who" and not "Doctor Who (2005)", and set the [Date] to 2005, as expected, although not what is required. The "Get Movie & TV Info..." function then looked up TheTVDB and selected the "Doctor Who" series, which has a [TheTVDB Series ID] of 76107, the old series, so MC got the incorrect metadata loaded, as expected. The correct [TheTVDB Series ID] for the "Doctor Who (2005)" is 78804. How many of us recognise those numbers!

If I had already had some episodes in this library, with the [Series] name of "Doctor Who", which is what typically appears in EPG data, and if the existing episodes were tagged with a [TheTVDB Series ID] of 78804, then the "Get Movie & TV Info..." function would have found the correct series and downloaded the correct metadata. MC always looks up TheTVDB using the [TheTVDB Series ID] if MC finds a match between the [Series] name of the new file and an existing [Series] name attached to an Episode, and that Episode as a [TheTVDB Series ID] tag. Actually, the new file immediately gets the [TheTVDB Series ID] tag filled if its [Series] name matches an existing [Series] name of any Episode in the library that has a value in the [TheTVDB Series ID] tag. Semantics.  8)

So to get to the point of this post, if you run the "Fill Properties From Filename..." (F12) function against the incorrectly identified file or files, and use the Template as per the attached image, instead of using Automatic, MC will correctly identify the Series name. Note that the "Clean Results' checkbox is ticked in the image. This means that MC will clean up spaces, leading zeros, punctuation etc. without having to explicitly specify them in the Template. For example, a Template of "[Series] S[Season]E[Episode] [Name]" works just fine with my example file name.

Then run the "Get Movie & TV Info..." function and MC can find the correct metadata. But watch out, because if MC has already saved the incorrect [TheTVDB Series ID] of 76107 in my example, the first match will be the old, incorrect episode. If running it against one file, manually select the correct record. If running against multiple files, delete the [TheTVDB Series ID] tag from all episodes (or from one and they will be deleted from all programs that have a matching [Series] name), and then run the "Get Movie & TV Info..." function.

I guess the point is that there is an easy fix to this if you are importing files. You could even turn the "Get Movie & TV Info..." function off in Auto Import before importing a batch of these sorts of files and save some work.


In playing with this I did note that there is no "Preset" button in the "Fill Properties From Filename..." dialogue, even though there are some predefined Presets, though they are all Audio based. I thought there used to be a Preset button in that dialogue, as there is in the RM&CF dialogue? Given that the function is called Template (aka Preset), I think there should be a Presets button that allows the creation, saving, and selection of predefined Templates or Presets. The recent list can get very long and unwieldy to use as a source of Templates. Readers, Right Click in the filename box to see Presets and the Recent list.

TL;DR
Use the "Fill Properties From Filename..." function with "Template" selected to update the metadata correctly from the original file name.
Add a Preset button to the "Fill Properties From Filename..." function please JRiver.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

elprice7345

  • World Citizen
  • ***
  • Posts: 237
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #12 on: August 17, 2017, 01:57:09 pm »

@RoderickGI - thanks for the insight, but this doesn't fix the incorrect functioning of MC:
  • The date shouldn't be populated from the filename
  • The series name should parse according to the filename including the series year
  • The "&" in episode names should appear as a "&" and not as the unicode text
Will these issues be fixed?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #13 on: August 17, 2017, 05:01:11 pm »

Well, Hendrik says it is working as designed. I would like it to handle this pattern, but it doesn't, so I documented a way around it.

Will these issues be fixed?

Who knows. I'm just a user like you, and I think Hendrik has had his last word on the matter.

Regarding your "&" issue, that is a problem at your end. That doesn't happen to me on Windows. Are you on Windows or Linux?

Either your source of files is coding the name strangely, or just in unicode and that isn't handled, or your (Windows/Linux) system is using unicode in a different way. Or something. Perhaps the App you are using to get the file is set to use unicode incorrectly. But it never happens to me on either Windows system.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

elprice7345

  • World Citizen
  • ***
  • Posts: 237
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #14 on: August 18, 2017, 03:40:25 pm »

@RoderickGI - I am thankful for your help. I didn't mean to imply otherwise.

Carnac may be working as designed, that doesn't mean the design is correct.

Carnac shouldn't set the date to the series year. I don't think Carnac should attempt to set a date at all solely from the file name, since this is not a common file naming convention. A year only appears in a TV show name to distinguish a series that has duplicate series names, e.g., Doctor Who vs. Doctor Who (2005).

You captured my argument very thouroughly here:
On the other issues, it seems that there is a massive communication disconnect, and I can't understand why. The issue has been explained thoroughly in this and the earlier thread.

As per numerous examples, the file named:

"Doctor Who (2005) - S10E05 - Oxygen.mkv"

Should be read as;
[Series] = "Doctor Who (2005)"
[Season] = "10"
[Episode] - "5"  or "05" with previous functionality.  :'(
[Name] = "Oxygen"

The [Year] tag should not be set by CARNAC, because there is no air date information in the file name. No [Year] information at all. That should be looked up on TheTVDB.

Could we have CARNAC do that, and only that please?

As for the "&" issue, I'm running Windows 10 and other users have had the same issue that posted earlier in this thread.

Carnac interprets the "&" in a file name correctly as "&". It is when I look up metadata in TVDB (Get Movie and TV Info ...) that the "&" gets changed to "u0026". This bug was introduced a few version ago.

Do you have the same experience?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #15 on: August 19, 2017, 12:53:11 am »

TL;DR  I agree. CARNAC handles the "&" character fine, but the "Get Movie & TV Info..." function is broken for Episode names that include an "&" character, changing the "&" character to "u0026" when a lookup is done, and saving that to the [Name] tag.

Oh never mind. This has already been fixed! I have tested it again in a new version. The fix will be in the next Public release.  :D


Carnac interprets the "&" in a file name correctly as "&". It is when I look up metadata in TVDB (Get Movie and TV Info ...) that the "&" gets changed to "u0026". This bug was introduced a few version ago.

Do you have the same experience?

Ashfall reported something slightly different, in that it was during the CARNAC processing that the "&" was converted to "u0026".
Here's an interesting one.

File name:
Killjoys - S03E04 - The Lion, the Witch & the Warlord

Carnac auto-imports the episode name as:
"The Lion, the Witch u0026 the Warlord"

I had already tested CARNAC by importing a few made up Doctor Who episodes with "&" in the title, but decided to do it again using Ashfall's example, since a record will be found on TheTVDB.

So I created a brand new file, which was an MP4 copy of a video I filmed. I removed my custom metadata from the video, so that it had nothing inside the file for CARNAC to use. I named the file "The Lion, the Witch & the Warlord" using Windows Explorer and put in into a watched directory \Video\ under a new sub-directory \Killjoys\. Before this I had turned off the "Get Movie & TV Info..." function in Auto Import, and had Auto Import set to run in the background.

So anything MC worked out about the file had to be solely based on the file name, and what CARNAC could determine from it.

The file was given the following metadata attributes on import into MC;
[Name] = "The Lion, the Witch & the Warlord"
[Series] = "Killjoys"
[Season] = "3"
[Episode] = "4"
[TheTVDB Series ID] = blank
Nothing else other than the video and audio specifications of the file, and the Audio Analysis tags, since I left that turned on. No Cover Art, Description, Rating, etc.

So, I'm not seeing what Ashfall saw.

I then deleted the file from the library, and from the drive using MC tools, and made sure that record of the deleted file was deleted from the "Removed" database in MC. I turned on the "Get Movie & TV Info..." function for the \video\ watched directory, copied a new clean version of the file into the \Killjoys\ sub-directory, and let MC do its thing.

So after all that the file was given the following metadata attributes on import with the "Get Movie & TV Info..." function into MC;
[Name] = "The Lion, the Witch u0026 the Warlord"
[Series] = "Killjoys"
[Season] = "3"
[Episode] = "4"
[Description] = stuff
[TheTVDB Series ID] = "281534"
[Date] = "21/7/2017'
[Year] = "2017"
[Genre] = stuff
and so on.

So while I have never seen this issue before, I do see it for that example Episode when the "Get Movie & TV Info..." function runs as part of the Auto Import process, but not when CARNAC alone imports the file.

I then ran the "Get Movie & TV Info..." function manually and lo and behold, the u0026 showed up in the preview dialogue. See attached image.

Checking TheTVDB directly then Episode name is shown correctly as "The Lion, the Witch & the Warlord". When I copy that text and paste it into a Hex Editor as text, then as Unicode text, I can see the difference but I don't know enough about Unicode to know if that is causing the issue.

So I searched my TV Episode names for those including "&", then ran the "Get Movie & TV Info..." function against each. In all cases the "&" was shown as "u0026" in the preview dialogue. The fact that my library includes the correct "&" character in the names of the episodes I checked shows that the function used to work correctly. So I agree, the "Get Movie & TV Info..." function is broken for Episode names that include an "&" character.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10721
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #16 on: August 19, 2017, 04:19:38 am »

So I searched my TV Episode names for those including "&", then ran the "Get Movie & TV Info..." function against each. In all cases the "&" was shown as "u0026" in the preview dialogue. The fact that my library includes the correct "&" character in the names of the episodes I checked shows that the function used to work correctly. So I agree, the "Get Movie & TV Info..." function is broken for Episode names that include an "&" character.

MC doesn't change it to u0026, but TheTVDB API provides it like that. In the next MC build such sequences are properly un-escaped.
Logged
~ nevcairiel
~ Author of LAV Filters

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #17 on: August 19, 2017, 06:00:16 am »

Thanks Hendrik. The API must have changed, or TheTVDB started supporting Unicode or something, as it has worked for some of my series in the past. Never mind. Fixed and tested already.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

elprice7345

  • World Citizen
  • ***
  • Posts: 237
Re: Parsing [Year] Out of Filenames with Carnac in TV Show Episodes MC23
« Reply #18 on: August 26, 2017, 05:17:28 pm »

Thanks for correcting the unicode character issue in 23.0.41!

@Hendrik - is there any chance Carnac will be fixed to properly parse the file name as mentioned above?

Logged
Pages: [1]   Go Up