INTERACT FORUM

More => Old Versions => Media Center 16 (Development Ended) => Topic started by: glynor on May 18, 2011, 12:30:18 pm

Title: JRSidecar.xml Format Documentation
Post by: glynor on May 18, 2011, 12:30:18 pm
I have someone over at SageTV (http://forums.sagetv.com/forums/showthread.php?p=498435&posted=1#post498435) who writes a Metadata Exporting plugin interested (maybe) in modifying the plugin to write-out JRSidecar.xml files.  This would be HUGE for me, as I could continue to use Sage to record my shows (it has external cable box control like I need it and multi-tuner support that works well) but abandon it for all-but live TV watching (which essentially never happens).

I can provide him with relevant example files, but it would be nice to be able to refer him to documentation on the Wiki that actually documents the XML markup used in these files (because my example files may not be tagged with every relevant field he could use).

Can someone at J River whip one up?  Right now, the sidecar page (http://wiki.jriver.com/index.php/Sidecar_Files) on the Wiki is pretty sparse, and there is nothing relevant on the DevZone page.
Title: Re: JRSidecar.xml Format Documentation
Post by: Lasse_Lus on May 18, 2011, 02:13:27 pm
Glynor are you after the fields in MC flagged as video ?

these are only video fields

Actors
Aspect Ratio
Budget
Cinematographer
Credits
Director
Distributor
Editor
Gross Revenue
MPAA Rating
MPAA Rating Description
Music By
Prequel
Screenwriter
Sequel
Studios
Tag Line
Video Standard


These fields Video is shared with ONE other "Flag"

Bit Depth
Bitrate
Bookmark
Channels
Compression
Date Recorded
Disc #
Duration
Episode
Flickr Info
Height
Image File
Lyricist
Lyrics
Playback Info
Playback Range
Protection Type
Sample Rate
Season
Series
Series Description
Use Bookmarking
Width
Title: Re: JRSidecar.xml Format Documentation
Post by: glynor on May 19, 2011, 12:27:30 am
One example of something that I'd need to explain:  How are dates encoded in the JRSidecar files?  I browsed around the Wiki but didn't find any relevant documentation.  I'm sure someone knows.  I have an example like this: <Field Name="Date">40643</Field>

Also, are there any other rules they need to follow on formatting or order?  I'm assuming order doesn't matter, but I don't know for sure.  Are there any standard fields that AREN'T used in the JRSidecar.xml files?
Title: Re: JRSidecar.xml Format Documentation
Post by: Lasse_Lus on May 19, 2011, 02:33:12 am
You have two kinds of dates in MC, "unix" and "excel"

Date Created
Date Modified
Date Imported

are all Unix, and the rawdata you find in the mpl file/sidecar is number of seconds since 1970-01-01

The other dates like date recorded, date and custom date fields are "excel dates", meaning number of days since 1901-01-01

Order is not relevant..
Title: Re: JRSidecar.xml Format Documentation
Post by: olinbg on May 19, 2011, 08:15:47 am
Glynor, thanks for opening this discussion.  I need the date information as well as I'm working on a script to sync metadata between sidecars and XBMC NFO files.

In case anyone is curious, it's on GitHub: https://github.com/olinbg/mc-sidecar-sync
Title: Re: JRSidecar.xml Format Documentation
Post by: glynor on May 19, 2011, 09:53:37 am
You have two kinds of dates in MC, "unix" and "excel"

Thanks.  I thought about the Unix epoch, but I knew it wouldn't work in this case.  That example I gave from my sidecar above is "40643".  I knew intuitively that this was far too low of a number to be based on the unix epoch (the date was set to 2011-04-10 for that file).  But, it would make sense to not base it that way because many files would have dates preceding 1970.

The 1900-based (Windows) Excel style answers that, so thanks.  I also assumed that order wasn't relevant, but thanks for the confirmation.
Title: Re: JRSidecar.xml Format Documentation
Post by: Alex B on May 19, 2011, 10:19:21 am
From my "Notable Threads (http://yabb.jriver.com/interact/index.php?topic=59513)" thread:

The internally used precise date values (the Microsoft and UNIX epochs in MC explained):

http://yabb.jriver.com/interact/index.php?topic=50750.msg346804#msg346804
http://yabb.jriver.com/interact/index.php?topic=43983.msg301174#msg301174
http://yabb.jriver.com/interact/index.php?topic=40963
Title: Re: JRSidecar.xml Format Documentation
Post by: glynor on May 19, 2011, 10:29:39 am
Thanks, Alex.  I should have checked there.  I spent an hour or so searching the Wiki, but I didn't think of that.

Sigh... If only the Wiki was better maintained.