SageTV Community  

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

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-26-2010, 12:52 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Plugin: Read, Write and Edit Metadata

Added to the SageTV 7 plugin repository a port of Read & Write Metadata files for Default STV

A UI mod plugin that provides the ability to display information from .my files in Recording and Video Detail panels.
It also can create .my and .properties files for recordings, cleanup orphan .my and .properties files and import information from .my files into the SageTV wiz.bin.
It also provides the ability to edit some metadata within SageTV.

It is still using the "old" method for creation of .properties files and updating of wiz.bin which I plan to change to the new methods at some stage, but that doesn't impact on it functionally.

John
Reply With Quote
  #2  
Old 07-09-2010, 07:57 PM
Dingdul Dingdul is offline
Sage User
 
Join Date: Apr 2009
Location: Perth, Western Australia
Posts: 66
Thanks. Quick question: if I edit the metadata for an individual imported/ripped video, will this be picked-up by the Sage parental controls?
__________________
Server: Intel Core Duo E8600 / 4gb RAM / Win7 Home Premium
Tuners: 2 x HDHR for OTA
Clients: 3 HD200 extenders
Network: GB Ethernet / DLink DNS-323
Reply With Quote
  #3  
Old 07-09-2010, 09:12 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Quote:
Originally Posted by Dingdul View Post
Thanks. Quick question: if I edit the metadata for an individual imported/ripped video, will this be picked-up by the Sage parental controls?
Quick answer: Yes

John
Reply With Quote
  #4  
Old 08-08-2010, 12:07 AM
raffmanlt raffmanlt is offline
Sage User
 
Join Date: Dec 2007
Posts: 10
Read Write and Edit Metadata question

Thanks for this tool perhaps I am misunderstanding something. Can you help me? I am using beta sagetv vs 7 and the Read Write and Edit Metadata v 2.3.0. I have a show that uses the same description for each weeks episode and I noticed it also has the same show id number. When I edit the episode title, description or even the misc field it changes it on all of the episodes and not just the one I am wanting to comment on. That is when I use this tool, if I manually edit the my file or property file associated with that file name for a specific one nothing changes within sage. I even tried changing the show id number and it still changes all of them.
Reply With Quote
  #5  
Old 08-08-2010, 01:41 AM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
It's because SageTV thinks they are just different airings of the same show. I'm not sure how you can break that connection. Just editing the .my or .properties file won't do anything.

I'm not sure how the enhancements to the SageTV core relinking of metadata and changing of imported of video files into recordings works, but the show will need to have unique ShowIDs before the metadata can be manipulated uniquely.

Sorry I can't be of any help at the moment.

John
Reply With Quote
  #6  
Old 08-08-2010, 05:55 AM
raffmanlt raffmanlt is offline
Sage User
 
Join Date: Dec 2007
Posts: 10
thank you
Reply With Quote
  #7  
Old 08-08-2010, 09:29 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
the NORMAL showid for episodic tv is a number from zap2it. Starts with EP then a long string of numbers. the last four digits are the episode number, and the rest represent the show itself. I'm guessing those shows are all ending in 4 zeros, which means it will have just the general description of the show itself. This is what zap2it uses when they do not receive specific episode scheduling info from the broadcaster. You'll have to change the showid to a specific episode, and then edit the information for it. This may be easier to do with BMT than editing the properties files, as you should be able to enter just the episode name and/or season-episode numbering, and BMT will grab the rest of the information from tvdb.org.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #8  
Old 05-17-2011, 11:15 AM
glynor glynor is offline
Sage User
 
Join Date: Oct 2005
Posts: 18
Hello there! I use this plugin on my SageTV installation, and it works great. However, what I'd REALLY like is to get the metadata from SageTV Recordings written into a JRSidecar.xml file, which are the "sidecar" files used by J River MC to store and interchange metadata on video files.

The sidecar format is a pretty simple XML file, and MC automatically reads these files (if they exist) on import and sets all of the internal Metadata properly.

I'd LOVE it if this plugin could be modified to write out this additional file format, but I have no idea what that would entail (and I'm not a Java programmer). Honestly, I'd like this so much that I'd be happy to pay a relatively-modest sum to get it done.

I'm sure the developers at J River would be willing to assist if needed, and I can provide/get examples of the appropriate sidecar files. Is there any chance this could happen?
Reply With Quote
  #9  
Old 05-17-2011, 10:36 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Quote:
Originally Posted by glynor View Post
I can provide/get examples of the appropriate sidecar files. Is there any chance this could happen?
I'll need some examples to have a look at.

John
Reply With Quote
  #10  
Old 05-18-2011, 09:43 AM
glynor glynor is offline
Sage User
 
Join Date: Oct 2005
Posts: 18
Quote:
Originally Posted by JREkiwi View Post
I'll need some examples to have a look at.

John
Thank you SO much for being willing to take a look. I'll post examples as soon as is possible (later today).
Reply With Quote
  #11  
Old 05-18-2011, 10:11 PM
glynor glynor is offline
Sage User
 
Join Date: Oct 2005
Posts: 18
Okay, here is the full contents of a properly tagged JRSidecar file for episode 3 of "The Borgias". The file itself is stored as shown below in the "Filename" tag, and the sidecar file itself lives next to the file and its filename is: "1e03 - The Moor_mkv_JRSidecar.xml" The sidecars are always stored that way, next to the source file, with a filename that is: SourceFilename_SourceExtension_JRSidecar.xml

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="JRSidecar">
<Item>
<Field Name="Filename">M:\Video\TV Show\The Borgias\1\1e03 - The Moor.mkv</Field>
<Field Name="Last Skipped">1304652913</Field>
<Field Name="Episode">3</Field>
<Field Name="Compression">mkv video (video: AVC1, audio: AC3)</Field>
<Field Name="Bitrate">3924</Field>
<Field Name="Bit Depth">0</Field>
<Field Name="Season">1</Field>
<Field Name="Actors">David Oakes; François Arnaud; Holliday Grainger; Jeremy Irons; Lotte Verbeek; Peter Sullivan</Field>
<Field Name="Director">Neil Jordan</Field>
<Field Name="Stack Top">-1</Field>
<Field Name="Channels">6</Field>
<Field Name="Description">His coffers depleted by his expensive rise to power, Rodrigo seeks funds through a profitable marriage for Lucrezia that will ally with him Milan, and charges a fee for safe haven in the Holy City to Jews displaced by the Spanish Inquisition; the Borgias host a charming Turkish prince; Micheletto is ordered to rid his patrons of the ongoing threat posed by Della Rovere. </Field>
<Field Name="Keywords">Crime; Drama; History</Field>
<Field Name="Stack View">0</Field>
<Field Name="Media Sub Type">TV Show</Field>
<Field Name="Series">The Borgias</Field>
<Field Name="Skip Count">1</Field>
<Field Name="Series Description">The Showtime Original Series The Borgias is the sordid saga of one of the most remarkable and legendary families in history. Set in 15th century Italy at the height of the Renaissance, The Borgias chronicles the corrupt rise of patriarch Rodrigo Borgia (Academy Award winner Jeremy Irons) to the papacy, where he proceeds to commit every sin in the book to amass and retain power, influence and enormous wealth for himself and his family. The unbounded audacity of this original crime family went on to inspire Machiavelli's The Prince and Mario Puzo's The Godfather. Don't miss a minute of the lavish, sexy, scandalous drama from the creative mind of Academy Award winner Neil Jordan.</Field>
<Field Name="Date">40643</Field>
<Field Name="Name">1e03 - The Moor</Field>
<Field Name="Sample Rate">48000</Field>
<Field Name="Duration">3188</Field>
</Item>
</MPL>
Here is a properly tagged movie (description pulled from Wikipedia, so not really ideal, but that doesn't much matter).

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="JRSidecar">
<Item>
<Field Name="Filename">M:\Incoming\HP5_PHOENIX\HP5_PHOENIX.Title0.mkv</Field>
<Field Name="Bookmark">556568</Field>
<Field Name="Stack View">0</Field>
<Field Name="Channels">6</Field>
<Field Name="Media Sub Type">Movie</Field>
<Field Name="Director">David Yates</Field>
<Field Name="Language">English</Field>
<Field Name="Gross Revenue">$938,468,864</Field>
<Field Name="Skip Count">1</Field>
<Field Name="Sequel">Harry Potter and the Half-Blood Prince</Field>
<Field Name="Budget">$150 million</Field>
<Field Name="Music By">Nicholas Hooper; John Williams</Field>
<Field Name="Last Skipped">1290897714</Field>
<Field Name="Name">Harry Potter 5 - The Order of the Phoenix</Field>
<Field Name="Duration">8293</Field>
<Field Name="Cinematographer">SÅ‚awomir Idziak</Field>
<Field Name="Prequel">Harry Potter and the Goblet of Fire</Field>
<Field Name="Date">39274</Field>
<Field Name="Bit Depth">0</Field>
<Field Name="Country">United Kingdom; United States</Field>
<Field Name="Distributor">Warner Bros. Pictures</Field>
<Field Name="Bitrate">13087</Field>
<Field Name="Stack Top">-1</Field>
<Field Name="Compression">mkv video (video: AVC1, audio: AC3)</Field>
<Field Name="Studios">Heyday Films</Field>
<Field Name="Actors">Daniel Radcliffe; Rupert Grint; Emma Watson; Ralph Fiennes; Michael Gambon; Imelda Staunton; Gary Oldman; Helena Bonham Carter</Field>
<Field Name="Sample Rate">48000</Field>
<Field Name="Producer">David Heyman; David Barron</Field>
<Field Name="Editor">Mark Day</Field>
<Field Name="Description">Harry Potter and the Order of the Phoenix is a 2007 fantasy-adventure film directed by David Yates and based on the novel of the same name by J. K. Rowling. It is the fifth instalment in the Harry Potter film series, and is written by Michael Goldenberg and produced by David Heyman and David Barron. The story follows Harry Potter, a teen wizard in his fifth year at Hogwarts School of Witchcraft and Wizardry, as the Ministry of Magic refuses to believe the return of the Dark Lord Voldemort, and so appoints bureaucrat Dolores Umbridge as a teacher at the magical school. The film stars Daniel Radcliffe as Harry Potter, alongside Rupert Grint and Emma Watson as Harry's best friends Ron Weasley and Hermione Granger. The supporting cast features Ralph Fiennes, Michael Gambon, Imelda Staunton, Gary Oldman and Helena Bonham Carter.

Live-action filming took place in England and Scotland for exterior locations and Leavesden Film Studios in Watford for interior locations from February to November 2006, with a one-month break in June. Post-production on the film continued for several months afterwards to add in visual effects. The film's budget was reportedly between £75 and 100 million ($150–200 million). Warner Bros., the distributor of the film, released it in the UK on 12 July 2007, and in North America on 11 July, both in conventional and IMAX theatres, and was the first Potter film to be released in IMAX 3-D.

It is the unadjusted 10th highest-grossing film of all time, and a critical and commercial success, acclaimed as "the best one yet" by Rowling, who has consistently offered praise for the film adaptations of her work. The film opened to a worldwide 5-day opening of $333 million, fourth all-time, and grossed $939 million total, second to Pirates of the Caribbean: At World's End for the greatest total of 2007.</Field>
</Item>
</MPL>
Any of the fields that are omitted are ignored or auto-generated by MC. This would include technical details like duration, bookmark, Channels, Stack View, Skip Count, Sample Rate, etc. I don't have the TV episode as thoroughly tagged as the movie example, because MC can auto-pull information for movies from Wikipedia, but not TV Episodes (though it grabs nice artwork from theTVDB.com).

The most important fields for categorization are [Media Sub Type], [Season], [Series], [Episode], and [Date] I guess. I'm not sure how the date field is encoded, but I can easily get that answer if it isn't obvious to you. All the fields work for all Media Sub Types, so you can use [Distributor] and [Screenwriter] for TV shows if you want, I just don't have them filled out for that Borgias episode.

Would this be enough? Is this plausible? I could conceivably try to write a Perl script or something to convert the data from the files I do have, but that would have to run on a timed basis and it would be much better to have it part-of this plugin if possible.

Last edited by glynor; 05-18-2011 at 11:21 PM.
Reply With Quote
  #12  
Old 05-18-2011, 10:30 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Quote:
Originally Posted by glynor View Post
Would this be enough? Is this plausible? I could conceivably try to write a Perl script or something to convert the data from the files I do have, but that would have to run on a timed basis and it would be much better to have it part-of this plugin if possible.
I'll have a look and see what I can do.

John
Reply With Quote
  #13  
Old 05-18-2011, 11:16 PM
glynor glynor is offline
Sage User
 
Join Date: Oct 2005
Posts: 18
Quote:
Originally Posted by JREkiwi View Post
I'll have a look and see what I can do.

John
Thank you, thank you, thank you!

I appreciate the effort, even if it doesn't work out.
Reply With Quote
  #14  
Old 05-19-2011, 09:04 AM
glynor glynor is offline
Sage User
 
Join Date: Oct 2005
Posts: 18
I just got confirmation. The date format used in the JRSidecar files for the [Date] tag (and similar fields) is using the Excel system: number of days since 1900-01-01.

So, in that Borgias episode example, the date listed is 40643, which corresponds to 2011-04-10.

It wouldn't really impact anything that needed to be stored in the XML, but MC does also use the Unix epoch for "file modification" types of dates (date imported, date modified, etc), but these wouldn't be necessary in the Sidecar files.

If you need access to any other standard fields, I can easily figure out the field name for one that would be appropriate... Just ask. One thing I thought I'd mention specifically was [Genre]. MC uses a simple string-type field for [Genre] rather than an array or list-type field. This means that if you use Genre, a particular file can only have one specific Genre. So, mapping from the way SageTV and IMDB tag Genres doesn't work very well in this case.

The [Keywords] field is a list-style field, as shown in my Borgias example above. If you need to map from a multiple-genres-possible field to the Sidecar file, it is probably best to use the [Keywords] field instead of genre.
Reply With Quote
  #15  
Old 10-16-2011, 01:11 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
Quote:
Originally Posted by JREkiwi View Post
I'll have a look and see what I can do.

John
Did the J River format end up getting added?
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #16  
Old 10-17-2011, 12:12 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
Quote:
Originally Posted by babgvant View Post
Did the J River format end up getting added?
I've started on it, but been distracted by other things lately. I was just thinking last week, it's probably about time to get back into it.

John
Reply With Quote
  #17  
Old 10-17-2011, 12:15 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
Quote:
Originally Posted by JREkiwi View Post
I've started on it, but been distracted by other things lately. I was just thinking last week, it's probably about time to get back into it.

John
Yep. Getting about time to start think about exit strategies

I ended up writing a C# app that creates the files this morning, but having something run in process is probably better.
__________________
babgvant.com | @babgvant | Missing Remote
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
STV Import: Read & Write Metadata files for Default STV 5/6 (v2.2.9 18/Feb./2010) JREkiwi SageTV Customizations 251 10-09-2019 11:11 AM
is there a plugin to read .my files yet? pjwerdna SageTV v7 Customizations 10 06-27-2010 10:10 PM
manually edit video metadata loomdog32 SageMC Custom Interface 8 01-04-2009 12:34 AM
How to edit plugin settings when using a HD extender? blade SageTV Customizations 1 12-08-2008 10:21 PM
read-write xml files perry59 SageTV Studio 3 11-12-2007 06:53 PM


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


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