INTERACT FORUM

More => Old Versions => JRiver Media Center 22 for Windows => Topic started by: Ashfall on February 09, 2017, 09:27:09 pm

Title: Episode Name after Import
Post by: Ashfall on February 09, 2017, 09:27:09 pm
I've noticed that if a mkv video file has the Title metadata field populated before importing into JRiver, that will be used during import to populate the JRiver Name field for that episode instead of thetvdb.com.

An example follows.

Filename:
The Expanse - S02E03 - Static.mkv

Title Metadata embedded in file:
The.Expanse.S02E03.1080p.WEB-DL.DD5.1.H264

And JRiver uses the ugly metadata title for the Name field.  Other fields such as Description are downloaded automatically and look good, so why doesn't the correct Name get applied at the same time?  Or am I overlooking an option somewhere?  Manually running Get Movie and TV Info fills the Name field correctly.
Title: Re: Episode Name after Import
Post by: astromo on February 10, 2017, 06:51:04 am
This makes sense to me. If the media file has meta-data coded then, by default, I would expect MC to leave that data alone and use it where it matches the meta-data fields that are standard within MC.

The features to import meta-data from the filename [F12] and Get Movie & TV Info are pretty quick and convenient methods to deal with meta-data shortcomings.
Title: Re: Episode Name after Import
Post by: Ashfall on February 10, 2017, 10:08:59 am
This makes sense to me. If the media file has meta-data coded then, by default, I would expect MC to leave that data alone and use it where it matches the meta-data fields that are standard within MC.

The features to import meta-data from the filename [F12] and Get Movie & TV Info are pretty quick and convenient methods to deal with meta-data shortcomings.

I understand the logic of using metadata during import, but I think it would be great to provide the option to set preference for thetvdb lookups during auto-import.

I download a lot of shows because it's an easy time-shifting method, and there are always 3 or 4 that require manual intervention every time, so auto-import isn't quite automatic.
Title: Re: Episode Name after Import
Post by: Ashfall on April 18, 2017, 12:02:25 pm
Four TV shows are doing this now, and it's really annoying to everyone in the family when the name of an episode shows as something like "Better.Call.Saul.S03E02.1080p.WEB-DL.DD5.1.H.264".

It's tiring to have to check JRiver every day for new imports to manually run "Get Movie and TV Info".  Why can't we have an option to ignore pre-existing metadata during auto-import?
Title: Re: Episode Name after Import
Post by: CountryBumkin on April 18, 2017, 12:36:16 pm
Is this something new - just started happening with your system?

I have not seen this behavior on the weekly TV Shows I record or the movies I rip, when MC does the lookup.

I haven't looked lately to see what new metadata is being saved - but I don't see anything unusual in the way Theater View is displaying the names.
Title: Re: Episode Name after Import
Post by: Ashfall on April 18, 2017, 02:36:06 pm
Is this something new - just started happening with your system?

I have not seen this behavior on the weekly TV Shows I record or the movies I rip, when MC does the lookup.

I haven't looked lately to see what new metadata is being saved - but I don't see anything unusual in the way Theater View is displaying the names.

It's only for shows I download.  Although I have cable, I don't have the equipment to record anything so I rely on private torrent sites.  Using either Sickrage or Sonarr, the episodes are automatically downloaded, files renamed, and copied into the media folders that JRiver watches.  Normally it's entirely automatic and trouble free.  But some of these downloaded episodes have the "Title" field in the MKV file populated with the file name, as in the examples above.  JRiver reads that during auto-import and uses it for the "Name" filed, but fills in all other data through Carnac.  And it actually is a more recent thing for these files to have any metadata at all.  I've been doing it this way for about 5 years and can't remember this ever happening prior to 6 months ago or so.
Title: Re: Episode Name after Import
Post by: CountryBumkin on April 18, 2017, 03:17:26 pm
I suspect that the downloaded files have the wrong meta-data in the name/title field, and MC does not overwrite tag data that is already present. See http://wiki.jriver.com/index.php/Carnac

Maybe the file source has recently changed something (putting data in the wrong place or providing data they never did before) which is why your seeing the issue now.
Title: Re: Episode Name after Import
Post by: CountryBumkin on April 18, 2017, 03:19:54 pm
Why can't we have an option to ignore pre-existing metadata during auto-import?

+1
But this could really screw up some people - so it would need to be an option
Title: Re: Episode Name after Import
Post by: Ashfall on April 20, 2017, 04:26:47 pm
While it would be great for this to be implemented in JRiver eventually, I have found a workaround.  When a download completes in my torrent client (Deluge), SickGear copies it to my media library folder and now runs a script afterwards which tells mkvpropedit.exe to remove the Title field from the MKV file.  This happens fast enough that it's done before JRiver sees the file for import.  Only drawback is a cmd window flashes over whatever else you may be doing for a second whenever the script runs.

Here's how to set it up on Windows:

1. I'm using SickGear for download automation.  I did not try this with SickRage, SickBeard, or Sonarr, but they should work too.
2. Install MKVToolNix if you don't already have it.  This gives you mkvpropedit.exe.
3. Create a batch file script.  My script contains one line, including the quotation marks.  Modify it to wherever mkvpropedit.exe is located.  SickGear passes several arguments to the script. 1 = final full episode file path. 
Code: [Select]
"C:\Program Files\MKVToolNix\mkvpropedit.exe" %1 -d title4. Save the batch file in the C:\SickGear folder.  Or put it in the Data folder if that exists.  Wherever sickbeard.db and config.ini are, that's where the script should go.  Mine is saved as RemoveTitle.bat.
5. In SickGear, go to Post Processing options and find the Extra Scripts field.  Enter "RemoveTitle.bat" without the quotes and click Save.

Now the batch file script is run immediately after the file is moved or copied, removing the Title field and forcing JRiver to rely on TheTVdb to get the episode name.