XMLTV guide data

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
Post Reply
rpcameron
Posts: 1106
Joined: Fri Mar 25, 2016 9:55 am
x 4

Re: XMLTV guide data

Post by rpcameron »

EddieP wrote: Thu Nov 18, 2021 3:39 pm For one thing some do not recognize Season/Episode So I have to run the Python Script posted above for emby. And Plex identifies all recordings as New Without using the Schaefer Docker Image.... also posted above.

Not Recognixed by EMBY ..
<episode-num system="onscreen">S05E06</episode-num>

Plex Everything is New.
So the problem isn't actually SiliconDust's XMLTV, but that Emby's parser doesn't recognize the "onscreen" season/episode format, and that Plex marks everything new, ignoring whether it is tagged as such.

So, isn't the solution for Plex and Emby to fix their broken XMLTV parsers, since there is no actual error in SD's XMLTV?

EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

rpcameron wrote: Thu Nov 18, 2021 3:56 pm
EddieP wrote: Thu Nov 18, 2021 3:39 pm For one thing some do not recognize Season/Episode So I have to run the Python Script posted above for emby. And Plex identifies all recordings as New Without using the Schaefer Docker Image.... also posted above.

Not Recognixed by EMBY ..
<episode-num system="onscreen">S05E06</episode-num>

Plex Everything is New.
So the problem isn't actually SiliconDust's XMLTV, but that Emby's parser doesn't recognize the "onscreen" season/episode format, and that Plex marks everything new, ignoring whether it is tagged as such.

So, isn't the solution for Plex and Emby to fix their broken XMLTV parsers, since there is no actual error in SD's XMLTV?
I am just replying to Nick he asked me for what is missing that he can possibly add to the XMLTV so I will leave at that.... I just did the research it is up to Nick whether he chooses to add anything. I do not have a problem as the work arounds are working for me and automated.... but non technical users might have a problem when using the XMLTV from the HdHomerun.

rpcameron
Posts: 1106
Joined: Fri Mar 25, 2016 9:55 am
x 4

Re: XMLTV guide data

Post by rpcameron »

EddieP wrote: Thu Nov 18, 2021 4:02 pm I am just replying to Nick he asked me for what is missing that he can possibly add to the XMLTV so I will leave at that.... I just did the research it is up to Nick whether he chooses to add anything. I do not have a problem as the work arounds are working for me and automated.... but non technical users might have a problem when using the XMLTV from the HdHomerun.
Except, you didn't share what changes would be necessary for Plex to properly show which was new, or exactly why Emby couldn't parse season/episode. Are you saying Emby will properly parse "xmltv_ns" season/episode information (however verbose and technical it may be)? And how could they fix their correct "New" tagging to make it work in Plex?

Because if you mentioned those 2 points, I must have missed them.

EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

rpcameron wrote: Thu Nov 18, 2021 4:11 pm
EddieP wrote: Thu Nov 18, 2021 4:02 pm I am just replying to Nick he asked me for what is missing that he can possibly add to the XMLTV so I will leave at that.... I just did the research it is up to Nick whether he chooses to add anything. I do not have a problem as the work arounds are working for me and automated.... but non technical users might have a problem when using the XMLTV from the HdHomerun.
Except, you didn't share what changes would be necessary for Plex to properly show which was new, or exactly why Emby couldn't parse season/episode. Are you saying Emby will properly parse "xmltv_ns" season/episode information (however verbose and technical it may be)? And how could they fix their correct "New" tagging to make it work in Plex?

Because if you mentioned those 2 points, I must have missed them.
You did not go to the threads I posted that explained what is needed for Plex which is included in the Channels DVR posts I referenced above https://community.getchannels.com/t/usi ... s/26342/15

Here is my EMBY Post.
https://emby.media/community/index.php? ... nnels-dvr/

rpcameron
Posts: 1106
Joined: Fri Mar 25, 2016 9:55 am
x 4

Re: XMLTV guide data

Post by rpcameron »

EddieP wrote: Thu Nov 18, 2021 4:19 pm You did not go to the threads I posted that explained what is needed for Plex which is included in the Channels DVR posts I referenced above https://community.getchannels.com/t/usi ... s/26342/15
You're right, I didn't. But wouldn't it have been easier to say: "Plex doesn't recognize "<new />", but rather only "<previously-shown>"? That would have made your point much clearer, especially since you did not share an example with "<previously-shown>".

I can understand wanting additional verbosity with SD's export, but the truth is Plex is in the wrong. Also, the predefined "onscreen" episode type is specifically called out in the DTD as predefined, so Emby is in the wrong there, too.

SiliconDust is actually conformant, and Emby and Plex have broken/non-conformant implementations,

djp952
Posts: 1619
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD USA
x 24

Re: XMLTV guide data

Post by djp952 »

Personally, I also see nothing wrong with the SD XMLTV data here given the provided sample. The XMLTV specification is not extremely strict and providers have a lot of wiggle room as to how they implement/deliver the data. To my eyes, I agree that this a problem that Plex and/or Emby need to deal with due to incorrect input data assumptions. I see no violations in how SD presents this data.

EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

djp952 wrote: Fri Nov 19, 2021 10:29 pm Personally, I also see nothing wrong with the SD XMLTV data here given the provided sample. The XMLTV specification is not extremely strict and providers have a lot of wiggle room as to how they implement/deliver the data. To my eyes, I agree that this a problem that Plex and/or Emby need to deal with due to incorrect input data assumptions. I see no violations in how SD presents this data.
What is wrong in asking if they can add something to the XMLTV from hdhhomerun I just don't get how sensitive some folks on this forum get over a request to make it a little easier to use the XML in other apps. If it cannot be done I rather hear it from Nick or anybody from Silicondust support and have this matter closed.... but all this side chatter clouds the request. I was mistaken for saying the XMLTV from HDHomeRun was wrong but lets try and make life a little easier for those less technical. I have no problems with the work arounds.

For example where there isn't a new tag they can add <previously-shown> and <previously-aired>. or add the tag for emby "xmltv_ns.xml" see script posted earlier on this thread.

djp952
Posts: 1619
Joined: Wed Oct 01, 2008 8:46 pm
Device ID: 131EB7F7;131ED0E0
Location: Elkridge, MD USA
x 24

Re: XMLTV guide data

Post by djp952 »

Didn't mean to tweak you here; I was just trying to point out that the XMLTV specification is rather weak in nature and SD adheres to it just fine. One might argue that it would be better for the data consumer to assume that a lack of a <new> tag in the data can be meant to assume <previously-shown> or <previously-aired>, yes?

I still see this as a consumer-side problem to solve, but will "butt out" now as you requested. Good luck!

EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

djp952 wrote: Sat Nov 20, 2021 9:09 pm Didn't mean to tweak you here; I was just trying to point out that the XMLTV specification is rather weak in nature and SD adheres to it just fine. One might argue that it would be better for the data consumer to assume that a lack of a <new> tag in the data can be meant to assume <previously-shown> or <previously-aired>, yes?

I still see this as a consumer-side problem to solve, but will "butt out" now as you requested. Good luck!
No problem appreciate your input ...
Last edited by EddieP on Sun Nov 21, 2021 10:55 am, edited 1 time in total.

nickk
Silicondust
Posts: 20163
Joined: Tue Jan 13, 2004 9:39 am
x 376

Re: XMLTV guide data

Post by nickk »

The XMLTV generator has been updated to output <previously-shown/> if the airing isn't live and isn't new.

Please let me know if that helps with Plex.

Nick

EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

nickk wrote: Sun Nov 21, 2021 10:47 am The XMLTV generator has been updated to output <previously-shown/> if the airing isn't live and isn't new.

Please let me know if that helps with Plex.

Nick
Thanks Nick will test and Implement if good. Will post back...

EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

nickk wrote: Sun Nov 21, 2021 10:47 am The XMLTV generator has been updated to output <previously-shown/> if the airing isn't live and isn't new.

Please let me know if that helps with Plex.

Nick
Worked like a charm many thanks Nick,,,, no new tag see below and the new shows have the new tag.



Code: Select all

	<programme start="20211121183000 +0000" stop="20211121190000 +0000" channel="US62792.hdhomerun.com">
		<title>The Flintstones</title>
		<sub-title>In the Dough</sub-title>
		<desc lang="en">Fred and Barney replace their measles-stricken wives in a TV bake-off.</desc>
		<date>19610317</date>
		<category>Series</category>
		<category>Children</category>
		<category>Comedy</category>
		<category>Animated</category>
		<language>en</language>
		<icon src="http://img.hdhomerun.com/titles/C184097EN79JS.jpg" width="360" height="270"/>
		<series-id system="cseries">C184097EN79JS</series-id>
		<episode-num system="dd_progid">EP00001648.0025</episode-num>
		<episode-num system="onscreen">S01E25</episode-num>
		<previously-shown/>
	</programme>
Last edited by EddieP on Mon Nov 22, 2021 11:05 am, edited 1 time in total.

EddieP
Posts: 440
Joined: Sat Jun 08, 2019 11:04 am
x 4

Re: XMLTV guide data

Post by EddieP »

nickk wrote: Sun Nov 21, 2021 10:47 am The XMLTV generator has been updated to output <previously-shown/> if the airing isn't live and isn't new.

Please let me know if that helps with Plex.

Nick
Nick the New Stuff worked great but I had to run your XML through my script to get the correct season/epsisode in plex ... Below you will find your XML followed by the one I ran through the script ... The script I posted above adds this <episode-num system="xmltv_ns">17.13.</episode-num>

I just run it through my script after I extract the XML so it is quite easy now that you fixed the NEW.

Code: Select all

	<programme start="20211123050000 +0000" stop="20211123060000 +0000" channel="US21722.hdhomerun.com">
		<title>NCIS</title>
		<sub-title>Unseen Improvements</sub-title>
		<desc lang="en">NCIS tracks a stolen laptop to the uncle of a young boy, Phineas, Gibbs' former neighbor.</desc>
		<date>20210511</date>
		<category>Series</category>
		<category>Crime drama</category>
		<category>Action</category>
		<category>Adventure</category>
		<category>Mystery</category>
		<language>en</language>
		<icon src="http://img.hdhomerun.com/titles/C184930ENXE70.jpg" width="360" height="270"/>
		<series-id system="cseries">C184930ENXE70</series-id>
		<episode-num system="dd_progid">EP00681911.0441</episode-num>
		<episode-num system="onscreen">S18E14</episode-num>
		<previously-shown/>

Code: Select all

	<programme start="20211123050000 +0000" stop="20211123060000 +0000" channel="US21722.hdhomerun.com">
		<title>NCIS</title>
		<sub-title>Unseen Improvements</sub-title>
		<desc lang="en">NCIS tracks a stolen laptop to the uncle of a young boy, Phineas, Gibbs' former neighbor.</desc>
		<date>20210511</date>
		<category>Series</category>
		<category>Crime drama</category>
		<category>Action</category>
		<category>Adventure</category>
		<category>Mystery</category>
		<language>en</language>
		<icon src="http://img.hdhomerun.com/titles/C184930ENXE70.jpg" width="360" height="270"/>
		<series-id system="cseries">C184930ENXE70</series-id>
		<episode-num system="dd_progid">EP00681911.0441</episode-num>
		<episode-num system="onscreen">S18E14</episode-num>
    <episode-num system="xmltv_ns">17.13.</episode-num>
		<previously-shown/>

nickk
Silicondust
Posts: 20163
Joined: Tue Jan 13, 2004 9:39 am
x 376

Re: XMLTV guide data

Post by nickk »

Where are you getting "17.13." from?

signcarver
Expert
Posts: 11083
Joined: Wed Jan 24, 2007 1:04 am
Device ID: 10A05954 10802091 131B34B7 13231F92 1070A18E 1073ED6F 15300C36
x 39

Re: XMLTV guide data

Post by signcarver »

My understanding is that is what they are apparently using for <episode-num system="xmltv_ns">17.13.</episode-num>

<episode-num system="xmltv_ns">s.e.p/t</episode-num>
Where s is the season number minus 1.
Where e is the episode number minus 1.
Where p is the part number minus 1.
Where t to the total parts (do not subtract 1)

Personally if I designed such I would have not subtracted 1 and then used 0 as a catch all for things without

Post Reply