|
Batch Metadata Tools This forums is for discussing the user-created Batch Metadata Tools for SageTV. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
MediaTitles.xml and how to read it
I've updated my MediaTitles.xml file to correctly identify a couple shows that have the same title as shows a loong time ago (ie Castle, Parenthood, The Good Guys, and The Defenders). From my reading of the BMT docs (and my observation) when doing this the Title of show is changed to include the year (ie "Castle" becomes "Castle (2009)") because that is how tvdb is naming that show. This leads to a couple of problems:
I could also do this without looking up the mediatitles.xml file and just parse out the year but not sure if that's the most robust method. Soo... onto my question (I know it took awhile to get here )... assuming you agree that matching against the mediatitles is the way to go... are there phoenix methods to do this matching for me ?
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer Last edited by razrsharpe; 01-09-2011 at 10:20 PM. |
#2
|
||||
|
||||
Quote:
There are phoenix apis that do the matching, but not in the sense that you want. Basically I pass a filename to the scrapers, and they apply the regex filters from the mediatitles to the filepath, and if i get a match, then I update the Title, Year, etc, from the media titles. I think for your case, I'm not sure using the MediaTitles.xml is the best approach, but I have not objections to you using for how you want. You can get the parsed media titles using Phoenix.getInstance().getMediaTitlesManager(), and from there you can iterate over the items. I am considering adding an option to bmt to parse out years from TV titles. It do this already for Movie titles. But for your needs, all you really need is a simply properties file (or user record) that maps CurrentTitle=DesiredTitle. Again, you can probably do this using the MediaTitles.xml but a simple properties file might work better. I do something like this now for the ratings. I use a properties file (which is like a map) and I set the rating something like rating=ratings.getProperty(CurrentRating,CurrentRating) This way, rating will either be CurrentRating or a value the properties file. I'm a little hesitant, in bmt, to simply stip out the year from the title, but that may be the best approach. It just means that you'd have to check the series info to get the year, if you needed it.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#3
|
|||
|
|||
Quote:
Adding the option to remove the titles would be nice (especially if its part of the automatic process so people would never have to think about it after the first run to process already recorded shows)... Would be especially nice for those of us that have never heard of or recorded the previous series. What i really wish thetvdb would do is to include the year in the previous series and leave the currently airing series without the year.... but i digress Why are you hesitant to strip the year from the title? Rather then striping the year the other way to look at it would be to preserve the title populated by the sage epg and just the mediatitles as a map to the correct tvdb id.
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
#4
|
||||
|
||||
Quote:
I'll give this some thought as well. Maybe an option would be best.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#5
|
||||
|
||||
I think an option would be good. I would prefer to strip the year. Even if old series and new series with the same name end up grouped together I can sort them properly in that group. If I don't like the way it works for me I can go back to the yea in the titles.
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. |
#6
|
||||
|
||||
There is a recent bug as well that has to do with titles - if you have 'preserve original metadata for recordings' set, in theory the title of the show should stay "Castle" instead of being changed to "Castle (2009)".
This is broken currently - will be fixed in the next bmt release. SO if you would like to not deal with the years at all, after that fix you can enable 'preserve original metadata' and you should see most if not all of your issues go away. btl.
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
#7
|
|||
|
|||
Quote:
however, the bmt users guide says that this "replacing" of the title is normal behavior when using the mediatitles.xml file. from the bmt users guide Quote:
My reading of that says that the title will always be updated to whats returned by tvdb... Quote:
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
#8
|
||||
|
||||
Actually I don't replace the show title but I do replace the fanart title. With preserve metadata enabled the original title should still be preserved.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#9
|
|||
|
|||
sweet... so the fact that bmt was replacing both the show title and fanart title was the bug that was fixed in 4.9.7? If that's the case then i think my problem will go away... i dont have that many titles to fix... but a batch operation tool to strip the year from those shows in the mediatitles.xml file might be nice for those users with lots of shows to fix when their shows no longer group properly after upgrading to 4.9.7
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
#10
|
||||
|
||||
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#11
|
|||
|
|||
Quote:
As a side about preserve original recording metadata... what might be nice in the webui when browsing an individual episode would be a method to override the preserve original metadata flag to update things like the description... might be useful when browsing shows that have terrible/lacking descriptions of the episode... (minor i know )
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
#12
|
||||
|
||||
Quote:
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#13
|
|||
|
|||
Quote:
I think i might have found a bug though... or i just dont know the proper way to use it... BMT had previously (this weekend 4.9.6) updated my episodes of 24, overwrote some metadata, and choose the episode poorly.... therefore i have several (11 of 16 episodes for season 8) episodes that are listed as s1e1... So i thought i would update the metadata.. this is what i did (i have the preserver recording metadata flag checked) -navigate to a show (filename: \\svr1\tv\24-Day8600AM800AM-2037242-0.mpg, bmt id'ed it has s1e1). -uncheck the preserve original metadata box -fix the metadata (remove the season/epsidoe #, change the episode to be correct (Day 8 - 6:00 A.M.-8:00 A.M.), remove the description and the original air date) -click save. At this point the preserve original metadata box rechecks (expected), the now uneditable fields gray out (expected), the modified episode and original air are back to what they were before (not expected), the season/episode number and description are blank (expected). I was thinking that if i get the show title and episode name to match the filename (manually), then i can click "find metadata" to update all the rest of hte information EDIT: similarily, if i uncheck the preserve original metadata, then do a lookup and manually fix the title to be correct, and delete the season/episode and original air date, it populates the same information as what i just removed...
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer Last edited by razrsharpe; 01-10-2011 at 12:59 PM. |
#14
|
||||
|
||||
ok... i'll do some investigating. Could verify this with other files as well.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#15
|
|||
|
|||
Quote:
Find Metadata Lookup... Updating updating this episode of 24 (\\svr1\tv\24-Day8800PM900PM-1542053-0.mpg, s8e5) 1. uncheck preserve original metadata 2. click Find Metadata 3. fill in search title (24), season, and episode (manually determined by looking at the file name and comparing to tvdb episode list) 4. click search, click 24, 2001. This populates all the correct data, rechecks the preserve original metadata box, regrays out the uneditable fields (showtitle, episode name, description, oad, etc) Doesn't work -Follow 1-4 above 5. Clicking Save. All the grayed out fields default to original wrong values, and the season, episode stay correct. Does Work -Follow 1-4 above 5. Uncheck preserve original metadata and click save. All the grayed out fields are the new correct values I've updated a couple of the 24 episodes now with the "Does Work" procedure and they all seem to work... Manual Updating by entering metadata manually this is what ive noticed: -Episode Name - Can not update (if its blank or different it will always default to the previous wrong entry) -Description - Can update to blank or description -Original Air Date - Can update to a value. If its blank it will revert to the previous (removed) entry.
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
#16
|
||||
|
||||
Ok, i've added bug. I'll take a look at this throughout the week, and hopefully have a build for the weekend.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient Last edited by stuckless; 01-10-2011 at 08:05 PM. |
#17
|
||||
|
||||
Quote:
As a general rule, when preserve metadata is checked, those fields will not be updated. So if you uncheck preserve metadata, then update a field, and the check preserve metadata, then that value will NOT be stored, and it will revert back to original values. (that covers your Doesn't Work and Does Work scenarios) As a general rule, bmt inconsistent about clearing metadata. It may do it in some cases (ie, the description), but in other cases it probably won't. The reason is that bmt uses the same code from the web UI as it does when automatic scan happens. When an automatic scan happens and it returns empty values, I try NOT to update fields that have values with empty values.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#18
|
|||
|
|||
Quote:
Quote:
what a user (i believe) expects to do: 1. uncheck preserve original metadata 2. click Find Metadata... dialog box pops up 3. fill in search title, season, and episode (manually determined by looking at the file name and comparing to tvdb episode list) 4. click search. This drops you back to the metadata detail page with all correct details filled in. 5. Click Save That doesn't work... because at the end of step 4 when you drop back to the metadata detail page preserve original metadata is checked again so clicking save doesn't work (everything reverts back to the wrong data, except the season/episode number) You need to add a step 4a. where you reuncheck preserve original metadata before saving. Now everything saves the way it should. Quote:
EDIT: My recording of Castle last nite correctly did not modify the airing title (did get scanned by bmt because the season/episode was updated) so i can confirm that that bug is fixed... now i don't have any issues ... i think some form of batch tool to fix old recordings (expunge the year... probably using the mediatitles.xml as a guide) would be nice... or would the batch "remove year from tv shows" tool work for this? EDIT2: nevermind about the "remove year from tv shows" working... just read the popup when trying to run the tool and it wont work
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer Last edited by razrsharpe; 01-11-2011 at 08:29 AM. |
#19
|
||||
|
||||
Quote:
I'll also add a request to create a tool that cleans the year from titles.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#20
|
|||
|
|||
Quote:
Quote:
Quote:
__________________
Server 2003 r2 32bit, SageTV9 (finally!) 2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast) 2x HD300, 1x SageClient (Win10 Test/Development) Check out TVExplorer |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A few hints needed for MediaTitles.xml | davidk21770 | Batch Metadata Tools | 47 | 07-26-2016 11:00 AM |
MediaTitles.xml failed, how do I see what went wrong? | davidk21770 | Batch Metadata Tools | 5 | 09-28-2010 11:47 AM |
Quick MediaTitles.xml question | davidk21770 | Batch Metadata Tools | 3 | 09-24-2010 01:48 PM |
Problem with MediaTitles.xml | cmaloney | Batch Metadata Tools | 12 | 08-17-2010 07:44 PM |
read-write xml files | perry59 | SageTV Studio | 3 | 11-12-2007 06:53 PM |