INTERACT FORUM

Please login or register.

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

Author Topic: [EPG] Importing xmltv_ns format Season and Episode numbers correctly  (Read 4903 times)

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186

Okay, so it looks like I will be able to run EPG Collector (EPGC) and get Season and Episode numbers into the XMLTV output file successfully soon, without MC killing the process early, or having to run the EPGC process externally to MC, using the Windows Task Scheduler. http://yabb.jriver.com/interact/index.php?topic=92073.0 Excellent.

It took a while to get EPGC working correctly, because I missed a setting (set EPGC to output 'Valid season and episode numbers only' on the output tab, and it will output in the xmltv_ns format), and then I thought EPGC was failing to complete for no apparent reason. But not so, it was MC killing the process.

So now I know I can produce XMLTV files with Season and Episode numbers in it, we just need to get those numbers into the appropriate MC fields, therefore enabling the automatic TV metadata lookup when TV shows are imported into MC at the end of a recording, and also enabling the "Get Movie & TV Info" function.

The current handling of the "onscreen" Season and Episode numbers doesn't enable automatic processing of the data, as it just puts whatever is in the XMLTV field into the Episode field in MC. Based on the XMLTV DTD (Document Type Definition) almost anything could turn up in that field. We need numeric values in both the MC Season and Episode fields for lookups to work correctly.

The only other format defined in the XMLTV Standard is the "xmltv_ns" numbering system. EPGC produces Season and Episode numbers in this format quite reliably, with few exceptions, and places the result in the "episode-num" field, as do many other applications.

The format is.

    <episode-num system="xmltv_ns">2 . 9 . 0/1</episode-num>

Basically the full version is;
<episode-num system="xmltv_ns">Season{/Number of season in total} . Episode{/Number of Episodes in this season} . {Part number/Number of parts in this episode}</episode-num>

where anything in the squiggly brackets {} is optional. The spaces seems to be important for some applications. EPGC always puts a space before and after each dot ( . ), and always includes the Part Numbers, even if it is just a one part episode. i.e. EPGC puts 0/1 at the end, always, based on my observations. Well, unless there actually are multiple parts to an episode, but I don't have any examples of that.

The only trick to the xmltv_ns format is that it starts counting from zero instead of one, so the 7th Episode of the 4th Season, when made as a one part episode would be "3 . 6 . 0/1". A bit silly, but not so bad.


There are other Season and Episode numbering schemes around, but they aren't part of the standard. The "dd_progid" format is proprietary to TMS and is supplied with Zap2It data. The episode-num "common" tag is an invention of the author of zap2xml, as of April this year: http://zap2xml.awardspace.info/. Then there is the BSEPG numbering system, the IceTV system, and others. Many aimed at identifying the series and/or program to enable Series Recording and linking of programs. MC can't use these additional data elements at the moment, so there is no point in trying to process them.



I have zipped up an example of the EPGC XMLTV output file. Not all programs in the file have Season and Episode numbers, of course, so the easiest way to find the examples is to search for <episode-num system="xmltv_ns">.

So Yaobing, can we have MC import these Season and Episode numbers into the correct MC Season and Episode field please?

Thanks again for reading my long dissertations, and considering my request.



PS: Of course the alternative to this solution is simply to have MC look up the Season and Episode numbers based on the Series and Episode name, just as EPGC does. See http://yabb.jriver.com/interact/index.php?topic=91963.0
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

muzicman0

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1239
Re: [EPG] Importing xmltv_ns format Season and Episode numbers correctly
« Reply #1 on: September 24, 2014, 09:06:18 am »

a big +1!
Logged
Pages: [1]   Go Up