INTERACT FORUM

Please login or register.

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

Author Topic: Get tv and film info (auto import) does not overwrite title  (Read 3023 times)

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Get tv and film info (auto import) does not overwrite title
« on: August 06, 2017, 04:19:12 pm »

Hello,

I always name the folder with the aproximately title. After that the filename is overwritten by MC with "filename (name): filefolder([filename,0], 0).Right([filename,1], 3)"

Then the title is filled by "name: filefolder([filename,0], 0)", so MC is able to fetch information from the TMDB.

All works (correct image, correct description etc.) except, that the title is not overwritten by the full title of the Database after Auto Import. It's only overwritten when I manually press Get "Movie & TV Info". But why? Is there no way that auto metadata fetching after autoimport overwrites the title (because I only name the folder with the necessary part of the title, so the idea is that MC (with the help of TMDB) autocompletes the full title) for example_ Star Wars Episode 3 ==> Star Wars: Episode III - Revenge of the Sith

Then it would be nice to autorename the folder and filename again AFTER the metadata fetch (without manually use the rename, copy, move library tool) with the directory/file template used. For example the folder file structure is now: Star Wars: Episode III - Revenge of the Sith (2003)\Star Wars: Episode III - Revenge of the Sith (2003).mkv

Just a few ideas, but overwriting with the correct title would be nice? Is there a workaround or am I doing something wrong?

Thank you!

Regards Jens
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Get tv and film info (auto import) does not overwrite title
« Reply #1 on: August 06, 2017, 07:57:59 pm »

TL;DR: Turn on the "Get Movie & TV Info..." function in Auto Import configuration. No, MC won't automatically rename files and folders like some other applications that want to take over your life and tell you what to do. Yes Apple, I'm looking at you!

When you say;

except, that the title is not overwritten by the full title of the Database after Auto Import.

If you meant the [name] tag inside MC, Auto Import won't change that, unless you also have the check box for the "Get Movie & TV Info..." function ticked in the Auto Import configuration. The "Get Movie & TV Info..." function will be run directly after the import, and the [name] tag will be updated, if a match is found. So check your Auto Import configuration.

Then you said;
Then it would be nice to autorename the folder and filename again AFTER the metadata fetch

MC doesn't care about file names at all. Yes, it can change them, and move files and directories around using the RM&CF function. But what is important to MC is the tags in the library.

In this case, what MC changes for you after a "Get Movie & TV Info..." run is the [name] and other tags. That is what is important, and that is what is shown inside MC. The file name could be "$#@^$%27.mkv" while the movie name is "Star Wars: Episode III - Revenge of the Sith" inside MC, in the [name] tag. I assume you have moved from a file and folder based media management application, and are still thinking in those terms. You can replicate what such an application does in MC, but it isn't necessary.

When you import a media file with a structured file name into MC, the function called CARNAC tries to interpret the file name and creates tags inside MC based on that interpretation. The "Get Movie & TV Info..." function then collects extra metadata from TMDB or TheTVDB as appropriate. It is best to leave the file and folder names alone until those processes are complete, and checked as correct, I believe. That is why the RM&CF exists and has templates available to rename as per your preferred folder and filename structure, after the metadata for the file is established and correct. It is a manual step.

There are some third party utilities available that may do what you wish though. I think. Because I don't use them. I run the RM&CF function manually after importing and checking files. Take a look in the Third Party Plug-ins, Programs, and Skins forum.

Cheers.

PS:
Your formulas look a bit dodgy or incomplete. You are at least missing some [] brackets. Probably just mistranscribed them.

One downside of the automatic renaming of files and/or folders based on an automatic lookup of TMDB is shown by doing a manual lookup for "Star Wars Episode 3" against any movie record for which the file name does not match the actual movie.  i.e. I did a look up against my "Star Wars: Episode IV - A New Hope" record, which has an appropriate file name for that movie, and changed the lookup string to "Star Wars Episode 3". The first returned result was "Star Wars Knights of the Old Republic: Episode 3 - The Circle of Fate", which is clearly wrong. When MC does an automatic lookup of TMDB during an Auto Import run, or when you select multiple files and run the "Get Movie & TV Info..." function manually, MC picks the FIRST MATCH found and saves that information. So if MC both set tags and automatically renamed both the folder and file as part of the import, all the data you had on the file would now be incorrect. Any correct data would be lost. That would be bad. Luckily, MC only saves tag changes using the "Get Movie & TV Info..." function, so a bad match is recoverable, using the file name which hasn't been changed.
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

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Re: Get tv and film info (auto import) does not overwrite title
« Reply #2 on: August 07, 2017, 05:17:07 am »

Hello Roderick,

Thank you very much for this detailed explanation. The thing is, I have ticked "get Movie & TV info" in Auto Import configuration. That's the problem. The title (other things are updated well) is only being updated, when doing it manually AGAIN. So for example if I write Star Wars Episode 3 - Revenge, the movie info nad cover art is fetched correctly, but the name stays. Then I have manually "get movie&film info" again and the name is updated.

Regards
Jens
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Get tv and film info (auto import) does not overwrite title
« Reply #3 on: August 07, 2017, 04:15:56 pm »

That is most strange. I haven't seen anything like that before. Either it updates everything or nothing. Although it does respect the selection tick boxes for "Use Image" and "Use Information".

Could you post a screenshot of the Movie view showing the incorrect [name] tag (what you are calling Title I believe) with the popup showing the movie details, and the headings in the view visible? Something like the image I have attached. Not that I don't believe you, but I want to be sure about our terminology here.
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

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Get tv and film info (auto import) does not overwrite title
« Reply #4 on: August 07, 2017, 08:45:47 pm »

TL;DR -  Is something broken on the "Get Movie & TV Info..." function used in Auto Import. It isn't consistent with a manual run for multiple media files, but that allows overwrite of values if you tick the box for that. The name found on TMDB isn't saved to the [name] tag as expected.

Your story is complicated a bit Jens because you are renaming automatically somehow, hopefully externally to MC, and haven't shared examples of exact directory and file names that result.
Then the short name version that you search for matches to the wrong record on TMDB.
Then because you are running the "Get Movie & TV Info..." function within Auto Import, I believe MC won't overwrite existing tags, and the [name] tag has already been created by the import process when the "Get Movie & TV Info..." function runs.


Anyway, just for giggles I created a dummy video, named it "\Star Wars Episode 3\Star Wars Episode 3.mp4", and placed the sub-directory in a directory watched by Auto Import in MC.

The first time I did this I used a small file. MC didn't recognise it as a Movie and left the [Media Sub Type] tag blank. So naturally MC didn't run the "Get Movie & TV Info..." function against it. When I tried to manually run the "Get Movie & TV Info..." function against the file, I received an information message from MC telling me the [Media Sub Type] tag must be "Movie" or "TV Show". Is that what you see? Do you see that message when you first try to run the "Get Movie & TV Info..." function on one of these files?


Then it got interesting.

I found a larger video file that was not tagged as a movie, renamed it as above to "\Star Wars Episode 3\Star Wars Episode 3.mp4", and placed the sub-directory in a directory watched by Auto Import in MC.

It imported, and the  "Get Movie & TV Info..." function ran, collecting meta data for the movie, plus Cover Art. But the [name] tag stayed the same as I had named the file, "Star Wars Episode 3", just as you had said.

Then I noticed, this wasn't the meta data for "Star Wars: Episode III - Revenge of the Sith" but was, in fact, the meta data for another program found via the lookup of "Star Wars Episode 3". The wrong "Movie" had been found by the "Get Movie & TV Info..." function! It was "Star Wars Knights of the Old Republic: Episode 3 - The Circle of Fate", and was the first match on TMDB when I ran the "Get Movie & TV Info..." function manually.

When I saved the meta data found on TMDB, the [name] tag was changed to the name for this first match found on TMDB, "Star Wars Knights of the Old Republic: Episode 3 - The Circle of Fate", just as you had seem with your testing.

So, the "Get Movie & TV Info..." function run with Auto Import would have gotten the incorrect data from TMDB, but, you are correct, the [name] tag is not saved when Auto Import runs the "Get Movie & TV Info..." function.

I think what is happening is that the "Get Movie & TV Info..." function used in Auto Import is not allowed to overwrite existing tag data, while manually running the "Get Movie & TV Info..." function against one media file defaults to overwriting tags, and manually running it against multiple files allows you to select whether tags are overwritten. If that is the case, what you are seeing is by design. I can sort of understand why that is done, as in your Star Wars example, the wrong match can be found on TMDB, and if that happens all existing tag data would be lost if the function defaulted to overwriting tags.

I started the test process above again with the "Get Movie & TV Info..." function turned off in Auto Import. Cover Art wasn't collected, and neither was any data for the movie.
I selected two movies to run the "Get Movie & TV Info..." function against, so that the selection of the correct movies would be done automatically in a similar way to when it is run via Auto Import. The process completed, selecting the wrong movie for Star Wars Episode 3 again, but this time the [name] tag was saved correctly for the "Star Wars Knights of the Old Republic: Episode 3 - The Circle of Fate" record found. Of course, I had the "Allow overwrite of existing values" check box ticked.


Is this by design JRiver? I certainly expected MC to save at least the name found on TMDB to the [name] tag, regardless of overwriting rules. But then I rarely import movies using Auto Import, without following up with a manual "Get Movie & TV Info..." function. The exception is TV recordings, and that process doesn't run the "Get Movie & TV Info..." function at all, so I have to manually run the "Get Movie & TV Info..." function.
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

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Re: Get tv and film info (auto import) does not overwrite title
« Reply #5 on: August 18, 2017, 03:12:09 am »

From now on, the movies filename on the disk is named automatically before moving to the movie folder, which is watched by MCs auto import. So no need to do it in MC. But the main problem, MC seems to read the needed title for TVDB from the intern title tag of the file itsself, so it's not using the corrected name of the file on the harddrive. The naming of the filename is the title and the year in brackets. Example: Godzilla (2014). But ff now the internal filetag title is crap and unusable for TMDB or just "Godzilla" without the year, MC doesn't find it or finds maybe the wrong version of the film. One solution is maybe to use expression language, to copy the filename to the title tag on import, so the title is correct and found by the TMDB database. Unfortunately then the year in MC is displayed two times "Godzilla (2014) (2014)" when mouseovering the movies. That's the logical conclusion. So there must be a way to get the film info with the "Godzilla (2014)" title and afterwards to delete the year in brackets.

Thank you for help
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: Get tv and film info (auto import) does not overwrite title
« Reply #6 on: August 18, 2017, 06:02:06 am »

From now on, the movies filename on the disk is named automatically before moving to the movie folder, which is watched by MCs auto import. So no need to do it in MC. But the main problem, MC seems to read the needed title for TVDB from the intern title tag of the file itsself, so it's not using the corrected name of the file on the harddrive. The naming of the filename is the title and the year in brackets. Example: Godzilla (2014). But ff now the internal filetag title is crap and unusable for TMDB or just "Godzilla" without the year, MC doesn't find it or finds maybe the wrong version of the film. One solution is maybe to use expression language, to copy the filename to the title tag on import, so the title is correct and found by the TMDB database. Unfortunately then the year in MC is displayed two times "Godzilla (2014) (2014)" when mouseovering the movies. That's the logical conclusion. So there must be a way to get the film info with the "Godzilla (2014)" title and afterwards to delete the year in brackets.
Explore MC's Library Tools.  You can fill the tags from your MC library.  Be careful.
Logged

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Re: Get tv and film info (auto import) does not overwrite title
« Reply #7 on: August 18, 2017, 06:40:00 am »

Thank you Jim,

I am just using the Library Tools, they are very useful and comprehensive. This is a way to do it, but what I want to archieve is an automated solution. The filenames of the movies are "title (year).mkv" (e.g King Kong (1933)). They are automatically copied to the media folder. MCs autoimport should now detect the new file and download the correct metadata and cover art. Unfortuanetly MC's search term for TMDB is not the filename "King Kong (1933)", but instead the internal title tag of the mkv, which is in the best case "King Kong", without the year; In the worst case just some unidentifiable crap. In the best case, MC will snatch the wrong version of the movie (the newest version from 2005)- So manual editing with "get TV & film info" is required.

An approach for autoimport could be:

MC's search term for TMDB would be the filename "King Kong (1933).mkv" instead of the title tag. (Can be archieved with the help of expression language: title = FileName(,1); correct version would be snatched but title stays and is not beeing updated. "King Kong (1933) ==> King Kong" does only work, when I run "get TV and film info" manually.

So either the title is updated after getting the metadata from the databse or another soultion:

Maybe one can tag the title with the removeright() function in combination with the filename() function, so only the title without the year is in the title. Then the year field is tagged with the removeright() (to remove the bracket) and right() function, so the year is passed to the year field. Then MC "knows" the year and picks up the correct version.

Would that work?

Regards
Logged

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Re: Get tv and film info (auto import) does not overwrite title
« Reply #8 on: August 18, 2017, 11:16:30 am »

Okay,

Now I have figured out some things. My Autoimport tag rules are now:

  • name: RemoveRight(FileName(,0) ,7)
  • year:Right(RemoveRight(FileName(,0),1),4)

Unfortunately the year tag is not working. But when I instead gibe autoimport's year field a constant year e.g 1933, it works. Then the correct version of King Kong is found :)

For test purposes I changed year:Right(RemoveRight(FileName(,0),1),4) to name:Right(RemoveRight(FileName(,0),1),4) just to test the function and it seems to work. The title is then the year in the filename. But why is the year field not workling with the function?
Logged

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Re: Get tv and film info (auto import) does not overwrite title
« Reply #9 on: August 18, 2017, 01:45:27 pm »

Just thought it works now because of &datatype=[integer] apendix, but I was wrong. Why does it not work??

EDIT: I don't know why, but now it works again :D

Regards
Logged
Pages: [1]   Go Up