SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations > Batch Metadata Tools
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-22-2010, 12:01 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Title and Episode on Imported Videos

Sean, I've just returned to using the Automatic Fanart/Metadata with BMT version 4.8

Is there any way to turn off the modifying of the Title and Episode fields on imported videos? Or only have them modified if Import TV Media Types as Recordings is enabled?

By default for imported videos
Title = the title of the file with the relative import path as it's prefix
Episode = this will be the title of the file.
In the default STV views, imported videos use Episode to sort by.

With Automatic Fanart/Metadata enabled the Title and Episode are being set to the values they would be if it is a recording. That's good if
Import TV Media Types as Recordings is enabled but makes a mess of the
sorting if they remain as imported videos.

John
Reply With Quote
  #2  
Old 10-22-2010, 12:51 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
I'll see what I can do John. To be honest, for a a long as I've been doing this, and for as many hours as i've been staring are "untouched" sagetv metadata to figure this out... I actually thought that I had it right

I'm not sure I fully understand what you are asking for, so you are going to have to bare with me...

So, when I fetch the media title, you do not want the the media title set as title. So if you file is, "FindingNemo.avi", you DON'T want the title set to "Finding Nemo".... For imported vidoes. For TV, it's ok??

Could you post some actual filenames, and field values, so that I can get a sense of what you mean?

Also, do the same rules apply for imported DVDs as well?
Reply With Quote
  #3  
Old 10-22-2010, 05:59 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Sean, I hope this makes sense. The imported video stuff has been right (from my perspective) in a few iterations of BMT, not the last few.

I would prefer BMT not change Title or Episode on imported videos, or have the option to specify that. My understanding was that MediaTitle and EpisodeTitle were defined so that they could be set and used without affecting Title and Episode. (although the latest BMT doesn't seem to set EpisodeTitle anymore)

If the video is being imported as a recording then you would want the Title and Episode values set to Recording standards so that they display and sort correctly, but BMT would also be changing the ExternalID so there would be a trigger for changing Title and Episode

the example of my preference:
GetMediaFileRelativePath(Airing) = TV\Chuck\Season 4\Chuck - S04E05 - Chuck Versus the Couch Lock.avi

Imported video & DVDs
GetShowTitle()=TV/Chuck/Season 4/Chuck - S04E05 - Chuck Versus the Couch Lock
GetShowEpisode()=Chuck - S04E05 - Chuck Versus the Couch Lock
..........SetMediaFileMetadata() properties follow..........
Title=Chuck - S04E05 - Chuck Versus the Couch Lock
MediaTitle=Chuck
EpisodeTitle=Chuck Versus the Couch Lock
SeasonNumber=4
EpisodeNumber=5
MediaType=TV
Description=Chuck is irritating and Sarah runs around in her underwear again
EpisodeName doesn't get used


Import TV Media Types as Recordings (or Recording)
GetShowTitle()=Chuck
GetShowEpisode()=Chuck Versus the Couch Lock
..........SetMediaFileMetadata() properties follow..........
Title=Chuck
EpisodeName=Chuck Versus the Couch Lock
MediaTitle=Chuck
EpisodeTitle=Chuck Versus the Couch Lock
SeasonNumber=4
EpisodeNumber=5
MediaType=TV
Description=Chuck is irritating and Sarah runs around in her underwear again

Previously the imported video Title determined the folder the video appeared in, so if you had set Title=Chuck in this example, it would have displayed as being in a folder Chuck rather than the directory structure it was in. That doesn't seem to be the case in V7, but the api still describes Title for imported videos as "the title of the file with the relative import path as it's prefix". Episode is still described as "the title of the file" and is still used for sorting in imported videos.

John

Last edited by JREkiwi; 10-22-2010 at 08:09 PM.
Reply With Quote
  #4  
Old 10-22-2010, 07:58 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
I don't think it's helped that the names used in .properties, SetMediaFileMetadata() and the GetShow...() api are all different.

I've modified the post so that hopefully it's clearer what's being used.

John

Last edited by JREkiwi; 10-22-2010 at 08:00 PM.
Reply With Quote
  #5  
Old 10-23-2010, 04:50 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by JREkiwi View Post
Sean, I hope this makes sense. The imported video stuff has been right (from my perspective) in a few iterations of BMT, not the last few.
I have changed the properties that are set based on my own experience of using SageTV. I only use the default STV (in 6).

Quote:
I would prefer BMT not change Title or Episode on imported videos, or have the option to specify that. My understanding was that MediaTitle and EpisodeTitle were defined so that they could be set and used without affecting Title and Episode. (although the latest BMT doesn't seem to set EpisodeTitle anymore)
MediaTitle and EpisodeTitle were defined mainly because in Sage6 there was no easy way to update the metadata except using the Custom fields. In Sage7, it's pretty trivial, and MediaTitle has lived on, mainly because it's so ingrained into the Fanart stuff. EpisodeTitle was dropped, since it duplicates the existing Sage field, EpsisodeName. So, in Sage7, I set EpisodeName whether it's an imported TV show an imported Recording. It think using the single EpisodeName field is best, rather than introducing another duplicate field.

Quote:
Previously the imported video Title determined the folder the video appeared in, so if you had set Title=Chuck in this example, it would have displayed as being in a folder Chuck rather than the directory structure it was in. That doesn't seem to be the case in V7, but the api still describes Title for imported videos as "the title of the file with the relative import path as it's prefix". Episode is still described as "the title of the file" and is still used for sorting in imported videos.
I guess the relative import path thing has always thrown me off a bit. I'd never want to see the path in the Title, so, I've always dropped it. That, and I then I'd have to worry about calculating the relative import path, so I'd have to know which import a video belonged, which means iterating all the import paths and testing the path for each video that I process. Of course, when processing from the command line, I'd have to no way of knowing what the import paths are, so it would probably write the entire path in the there.

I see in your first example, that Title=Chuck - S04E05 - Chuck Versus the Couch Lock, but I'm thinking that it should read, Title=TV/Chuck/Season 4/Chuck - S04E05 - Chuck Versus the Couch Lock

I do some playing around and see what i can come up with.

Thanks.
Reply With Quote
  #6  
Old 10-23-2010, 11:45 AM
darcilicious's Avatar
darcilicious darcilicious is offline
Sage Icon
 
Join Date: Jul 2009
Location: Venus
Posts: 1,306
I hope it's okay if I tag along in this thread because I think I'm in a similar boat. I had been using BMT for the first time starting about a month or so ago. I have a large number of TV shows and a few movies that I like to get the metadata showing up in SageTV for. Previously it was working fairly well. I just updated to the latest version of SageTV and BMT and now, something changed and I can't quite get things looking right.

First the Movies:

As I go through the web interface to manually update some movies from both the Recordings and Imported Media sections, I notice that the title is now being displayed twice in SageTV, see The Adventure of..., After the Sunset, and Anne of Avonlea:



I can't see how to change that from the web interface, am I missing something? I can remove the second title by saving a blank field for Movie Title (or not updating the web page for that movie item with the Title filled in) which seems counter-intuitive:



And then for TV shows, it seems just the opposite, no episodes show up in SageTV unless I manually update an individual item (e.g. first episode shown below):



even though they show up in the web interface just fine:



The above is what happens after I remove my top-level TV shows folder from the imported media, let SageTV re-index, add it back, and let it get re-indexed again.

Am I doing this correctly? Should I be doing something else either in the SageTV settings and/or manually (short of touching each individual episode)? Using the "Update Metadata" function on a TV series (and unchecking the "only update items that have not been updated previously" option) doesn't seem to address this issue.

This is a great tool and I can't thank you enough for your hard work on it, I just need to know a little bit more about how best to use it I think
__________________
SageTV Server 7.1.x w/Gemstone and Plex Home Theater v1.0.10 w/PlexPass
HD-PVR w/v1.5.6 drivers / Hauppauge IR blaster / FiOS Extreme HD / Motorola QIP6200 / SPDIF+720p Fixed Output
on HP Media Center 8400F (Phenom 9500 QuadCore 2.2GHz, nVidia GeForce 8500 GT)
via Olevia 247TFHD/Onyko TX-SR606/Harmony 550/HP MediaSmart EX490 WHS w/12TB
Plex Media Server v0.9.9.5 on HP Touchsmart Envy 23 d16qd
Sonos Play:3, Connect / SimpleTV v2 / Roku 2 XS+Plex / iPhone 5 / iPad 2
Reply With Quote
  #7  
Old 10-25-2010, 06:01 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Sean, my concern is that after using the Automatic Fanart/Metadata, imported videos no longer sort correctly using the default STV.

The default STV only sorts imported videos via GetShowEpisode() and is based on the API describing Episode as "this will be the title of the file".

With BMT changing the value of EpisodeName on imported videos the sorting in the default STV is done on the Episode Name which for example results in the following sort order

Bones - S06E04 - The Body and the Bounty
Bones - S06E02 - The Couple in the Cave
Bones - S06E03 - The Maggots in the Meathead
Bones - S06E01 - The Mastadon in the Room

As I said previously, if the video is being imported as a recording, then changing the EpisodeName is valid/desirable as there are many more sort options for Recordings.

John
Reply With Quote
  #8  
Old 10-25-2010, 06:24 PM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,727
If you checkout the default STV in v7 RC you will notice that Opus changed the sort to use "GetMediaFileRelativePath" rather than "GetShowEpisode".

Check out this post....

This may be related to the issue you are seeing or expecting.

k
Reply With Quote
  #9  
Old 10-25-2010, 06:48 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by JREkiwi View Post
Sean, my concern is that after using the Automatic Fanart/Metadata, imported videos no longer sort correctly using the default STV.

The default STV only sorts imported videos via GetShowEpisode() and is based on the API describing Episode as "this will be the title of the file".

With BMT changing the value of EpisodeName on imported videos the sorting in the default STV is done on the Episode Name which for example results in the following sort order

Bones - S06E04 - The Body and the Bounty
Bones - S06E02 - The Couple in the Cave
Bones - S06E03 - The Maggots in the Meathead
Bones - S06E01 - The Mastadon in the Room

As I said previously, if the video is being imported as a recording, then changing the EpisodeName is valid/desirable as there are many more sort options for Recordings.

John
John, I'm not disagreeing... and yes, in my environment, the sort is wrong as well, but I'm not inclined to change it, but rather, I'd rather it was fixed in the STV.

Here's why...
SageTV has no concept of a TV show that is not a recording, so when we pull in TV shows and we DON'T put them into recordings, I still need to store the EpisodeName. Since Recorded TV uses the EpisodeName field for the actual show's episode Title, then that's where I put it as well, for NON imported TV shows. This way, when I have a TV show, either imported as a recording, or not, then I only have to look in the EpisodeName field for the episode's title. For all other non-imported media, EpisodeName is the "Title". Because SageTV sorted on the EpisodeName then, for non-imported TV shows, it's sorting based on the eipsode title, which results in a somewhat random looking sort order.

Based on your suggestion, you would like to have the TItle in the Episode Name, which would mean that EpisodeName would have "Bones", and then I'd have to find another field to store episode title. This still won't solve your sorting issue, since EpisodeName, will be the Same for all shows (of Bones), and the sort order will be random (unless sage employs a sub sort order). Also, I'd have extra complexity of having to distinguish between recorded tv and and ficticious non-imported tv, then pull titles and episode titles from different locations depending on if it's a "real" recording or not.

My way, while screwing up the sort order (until it's resolved in the stv), will result in a more consistent correalation between sage recordings and non sage recordings where TV metadata is concerned.
Reply With Quote
  #10  
Old 10-25-2010, 07:15 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
FYI... If you follow Andy's Post, and replace with phoenix_media_GetFormattedTitle (which is what I did), it will also ensure the TV shows are sorted correctly, since it will create a formatted title that includes the formatted season and episode numbers, which results in a correct sort order.

I also change the display to use phoenix_media_GetFormattedTitle, so that instead of seeing the filename, I see the formatted title (which is usually a cleaner title) that includes the a title formatted as per the formatted title masks, which can be different for TV or Movies.
Reply With Quote
  #11  
Old 10-25-2010, 07:29 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Thanks Sean,

I understand and accept your position and appreciate all the work that you've done to help enhance the SageTV experience.

I thought it was worthy of considering having an option for BMT to not change the Title and Episode on imported videos for someone like me who's only after Fanart (and associated Season, Epsode properties) and Description populated.

John
Reply With Quote
  #12  
Old 10-25-2010, 07:41 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
... and you know I'll be first in line to have a tool to set imported video Title and EpisodeNames to values that are required to support any future UI's

John
Reply With Quote
  #13  
Old 10-26-2010, 06:18 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by JREkiwi View Post
I understand and accept your position and appreciate all the work that you've done to help enhance the SageTV experience.

I thought it was worthy of considering having an option for BMT to not change the Title and Episode on imported videos for someone like me who's only after Fanart (and associated Season, Epsode properties) and Description populated.
Part of the issue is that while I could provide an option to NOT update core sage fields (which I had in Sage6, for other reasons), it would mean that you would no longer get the episode title for TV files. It sounds as if that doesn't matter for you.

Quote:
Originally Posted by JREkiwi View Post
... and you know I'll be first in line to have a tool to set imported video Title and EpisodeNames to values that are required to support any future UI's
You should at least let your users know that if they run such a tool, and they have TV files that are not recordings, then they'll also lose the Episode Title for those items.

In BMT for Sage7 I've really been trying to focus on the metadata not the stv. ie, in Sage6 bmt would create formatted titles, descriptions, etc, simply to make the default STV utilize the information better. In Sage7, I simply try to minimize the duplicate metadata and I rely on the STV and Plugins to show information correctly. Non imported TV was the only place that I've seen where the default has an issue with the metadata, simply because it does not understand what a non recorded TV is. I don't expect the default STV to change, but creating a plugin that sorts on the filename rather than the EpisodeName is pretty trivial. I won't be providing one, since I don't do any STV work... but if I can do it in my stv... then just about anyone can do it in theirs

I'll add a future enhance request to add support for just fanart + custom fields, which means that fanart will be fetched but you won't get description, genre, actors, writers, directors, episode titles, etc (since they are core fields and not custom fields)
Reply With Quote
  #14  
Old 10-26-2010, 01:08 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Sean, thanks for your patience and explanations. I'll work on some changes to my plugins to handle this use of Title and Episode on imported videos.

Some things I discovered as part of this process.

If a properties file for an imported video contains just a Title value, that value is loaded by the core into both Title and Episode fields.
If it contains a Title and EpisodeName, then they populate Title and Episode appropriately.

The default sorting in jusjoken's CVF plugin is "Intelligent" which I've always found to be an oxymoron.

Quote:
Originally Posted by JREkiwi View Post
... and you know I'll be first in line to have a tool to set imported video Title and EpisodeNames to values that are required to support any future UI's
After re-reading this, I find it doesn't convey my intention correctly. I meant, I'd be first in line asking for a tool to do what BMT is doing now.

Quote:
Originally Posted by stuckless View Post
I'll add a future enhance request to add support for just fanart + custom fields, which means that fanart will be fetched but you won't get description, genre, actors, writers, directors, episode titles, etc (since they are core fields and not custom fields)
There may be some value in that. I've had occasions, where all I've wanted is Fanart and not wanted anything else changed.

John
Reply With Quote
  #15  
Old 10-26-2010, 01:56 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by JREkiwi View Post
If a properties file for an imported video contains just a Title value, that value is loaded by the core into both Title and Episode fields.
That makes sense in that SageTV uses the EpisodeName when showing the titles of Movies... so if something has just the Title, then it auto fills the EpisodeName so that the default STV will display things correctly, sort correctly, etc.

Quote:
The default sorting in jusjoken's CVF plugin is "Intelligent" which I've always found to be an oxymoron.
As a side note... I've been teaching my 12 year old son how to program. We've been making our way through a tic-tac-toe game, and last night we got to the part where we needed to implement the computer player. He did it, but it wasn't very elegant. Basically the computer just puts a X into the first available square. He was pretty excited though, because, as he put it, "I built artificial intelligence"... A little while later after we done discussing the computer player, he say to me... "I guess what I did was artificial... but It's certainly not intelligent" (Tonight's lesson is on building a better AI, btw)

Quote:
After re-reading this, I find it doesn't convey my intention correctly. I meant, I'd be first in line asking for a tool to do what BMT is doing now.
Sorry, my misunderstanding... I thought that you were going to write a program that sets the EpisodeName to the Title (which would erase the existing episode title )
Reply With Quote
  #16  
Old 10-26-2010, 04:26 PM
jusjoken jusjoken is offline
SageTVaholic
 
Join Date: Dec 2005
Location: Strathmore, AB
Posts: 2,727
Quote:
Originally Posted by JREkiwi View Post
The default sorting in jusjoken's CVF plugin is "Intelligent" which I've always found to be an oxymoron.

John
Actually, the default sorting for my CVF is the same as stuckless suggested above... "phoenix_media_GetFormattedTitle". It does allow changing to other sorts but I added those by request from others... I always use the default "phoenix_media_GetFormattedTitle" as it meets my needs.

k
Reply With Quote
  #17  
Old 10-27-2010, 02:02 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
We will possibly be looking into changing how the title & episode fields are used post-v7.0, so we can actually use the title field of an imported video as a title instead of the relative path. As usual, I can't promise when/if the change will be made, but we are aware that custom metadata would work better with both those fields instead of only the episode field.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #18  
Old 10-27-2010, 02:18 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Opus4 View Post
We will possibly be looking into changing how the title & episode fields are used post-v7.0, so we can actually use the title field of an imported video as a title instead of the relative path. As usual, I can't promise when/if the change will be made, but we are aware that custom metadata would work better with both those fields instead of only the episode field.

- Andy
I'm whatever you decide, I can adapt fairly easily in BMT (hopefully). My vote would be to put the Title of a movie or tv show series in the Title field and then the EpsidoeName would only contain the title of a TV episode (or it could be a secondary title in the event of a Movie)

Title=The Terminator
EpisodeName=
or
Title=House
EpisodeName=Pilot
Reply With Quote
  #19  
Old 10-27-2010, 02:27 PM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
Quote:
Originally Posted by stuckless View Post
I'm whatever you decide, I can adapt fairly easily in BMT (hopefully). My vote would be to put the Title of a movie or tv show series in the Title field and then the EpsidoeName would only contain the title of a TV episode (or it could be a secondary title in the event of a Movie)

Title=The Terminator
EpisodeName=
or
Title=House
EpisodeName=Pilot
I could see the Epsisode name being used for like

Title=The Terminator
EpisodeName=Director's Cut

or

Title=The Terminator
EpisodeName= Two-Disc Blu-ray/DVD Combo

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #20  
Old 10-27-2010, 03:32 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by gplasky View Post
I could see the Epsisode name being used for like

Title=The Terminator
EpisodeName=Director's Cut

or

Title=The Terminator
EpisodeName= Two-Disc Blu-ray/DVD Combo

Gerry
I think that's a good idea.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for Title/Season/Episode naming formats to support for metadata scraper evilpenguin General Discussion 17 01-08-2009 04:43 PM
Clarify the title/artist bit eg. [DVD TITLE] / [MOVIE TITLE]? bcjenkins SageMC Custom Interface 1 12-31-2008 11:58 AM
SageMC groups videos with the same title onlydarksets SageMC Custom Interface 0 11-05-2008 02:27 PM
EPG Not showing the shows episode title FormatC: SageTV EPG Service 1 07-23-2008 08:38 PM
Excluding imported audio/video from title search? GTwannabe SageTV Software 0 05-25-2006 03:27 PM


All times are GMT -6. The time now is 06:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.