zap2xml icon indicating copy to clipboard operation
zap2xml copied to clipboard

[Bug]: NextPVR no longer sees Series and Episode information.

Open GuruSR opened this issue 5 months ago • 34 comments

What happened?

Before the 16th of July, (SxxExx) would show up on episodes listed. Now, they're not. I do SEE them in the entries, but apparently they're not what NextPVR (4.2.5) wants.

Any means of adding a environment variable to set them back to the way they were? I'm thinking it is recording shows that aren't NEW because it isn't seeing the schedule properly.

Relevant log output

On a NBC channel for news.

    <episode-num system="series">SH00325847</episode-num>

This is an example, unsure what the NextPVR (4.2.5) wants, but it isn't reading this information anymore.

    <episode-num system="season">6</episode-num>
    <episode-num system="episode">35</episode-num>
    <episode-num system="series">SH03275478</episode-num>

Yes, older NextPVR version 4.2.5, because the system is a Windows 7 and the newer software no longer has a UI built onto it that supports the remote I'm using.

GuruSR avatar Jul 23 '25 00:07 GuruSR

What happened?

Before the 16th of July, (SxxExx) would show up on episodes listed. Now, they're not. I do SEE them in the entries, but apparently they're not what NextPVR (4.2.5) wants.

Any means of adding a environment variable to set them back to the way they were? I'm thinking it is recording shows that aren't NEW because it isn't seeing the schedule properly.

Relevant log output

On a NBC channel for news.

<episode-num system="series">SH00325847</episode-num>

This is an example, unsure what the NextPVR (4.2.5) wants, but it isn't reading this information anymore.

<episode-num system="season">6</episode-num>
<episode-num system="episode">35</episode-num>
<episode-num system="series">SH03275478</episode-num>

Yes, older NextPVR version 4.2.5, because the system is a Windows 7 and the newer software no longer has a UI built onto it that supports the remote I'm using.

This is what I see on the node version updated this morning <episode-num system="season">1</episode-num> <episode-num system="episode">21</episode-num> <episode-num system="series">SH02642239</episode-num> <episode-num system="onscreen">S01E21</episode-num>

jesmannstl avatar Jul 23 '25 01:07 jesmannstl

The Perl version had these fields I wonder if Nextpvr and Jellyfin for that matter used these <url>https://tvlistings.gracenote.com//overview.html?programSeriesId=SH03203447&amp;tmsId=EP032034470043</url> <episode-num system="common">S05E02</episode-num> <episode-num system="dd_progid">EP03203447.0043</episode-num> <episode-num system="xmltv_ns">4.1.</episode-num>

jesmannstl avatar Jul 23 '25 01:07 jesmannstl

I just implemented another episode-num that XMLTV has to offer.

Here are the 5 outputs now that I have:

    <episode-num system="season">5</episode-num>
    <episode-num system="episode">216</episode-num>
    <episode-num system="series">SH05918266</episode-num>
    <episode-num system="onscreen">S05E216</episode-num>
    <episode-num system="xmltv_ns">5 . 216 . 0/1</episode-num>

can you see if any of those work for you?

jef avatar Jul 23 '25 16:07 jef

I just implemented another episode-num that XMLTV has to offer.

Here are the 5 outputs now that I have:

<episode-num system="season">5</episode-num>
<episode-num system="episode">216</episode-num>
<episode-num system="series">SH05918266</episode-num>
<episode-num system="onscreen">S05E216</episode-num>
<episode-num system="xmltv_ns">5 . 216 . 0/1</episode-num>

can you see if any of those work for you?

This is in the docker as well, any chance you can also look at why I'm seeing all shows as "New" or would this be part of something missing? The perl script prior to July 16 didn't give me any issues.

GuruSR avatar Jul 23 '25 23:07 GuruSR

I just implemented another episode-num that XMLTV has to offer. Here are the 5 outputs now that I have:

<episode-num system="season">5</episode-num>
<episode-num system="episode">216</episode-num>
<episode-num system="series">SH05918266</episode-num>
<episode-num system="onscreen">S05E216</episode-num>
<episode-num system="xmltv_ns">5 . 216 . 0/1</episode-num>

can you see if any of those work for you?

This is in the docker as well, any chance you can also look at why I'm seeing all shows as "New" or would this be part of something missing? The perl script prior to July 16 didn't give me any issues.

I believe the <previously-shown /> tag is missing

jesmannstl avatar Jul 23 '25 23:07 jesmannstl

Jellyfin is a pain to troubleshoot Adding <episode-num system="xmltv_ns">0 . 13 . 0</episode-num> works to display Season/Episode in Jellyfin Adding <previously-shown /> fixes the "New" on every program issue (only Elsbeth had this added)

Image

Other Note xmltv_ns is 1 number less on Season and Episode or will show incorrect. Example tomorrow's Big Brother on this test is <episode-num system="onscreen">S27E07</episode-num> <episode-num system="xmltv_ns">27 . 7 . 1</episode-num> Output shows 28-8 in error

Image

jesmannstl avatar Jul 24 '25 02:07 jesmannstl

So if it's not "" then it's <previously-shown />? Will update

jef avatar Jul 24 '25 17:07 jef

Just made some improvements. Take a look at the last and let me know!

jef avatar Jul 24 '25 18:07 jef

Well <previously shown /> did not update and the <episode-num system="xmltv_ns">1 . 16</episode-num> in this example should be <episode-num system="xmltv_ns">0 . 15</episode-num>to display correctly

Image Image

jesmannstl avatar Jul 25 '25 00:07 jesmannstl

With the help of Gemini I was able to update the tvlistings.ts and xmltv.ts files to get both the <previously shown /> and correct output for xmltv_ns output and displays correctly in Jellyfin and Emby. Files attached adding .txt

tvlistings.ts.txt xmltv.ts.txt

Image Image Image

jesmannstl avatar Jul 25 '25 03:07 jesmannstl

@GuruSR if you want to test download the two txt files in my previous comment and rebuild using those ts files replacing the originals in /src/ (removing the .txt) and build it again. I always started fresh. I did two programs in Nextpvr one new and one old and said record New episodes only and they are correct in the scheduler

jesmannstl avatar Jul 25 '25 03:07 jesmannstl

Created a fork made the edits and submitted a pull request

jesmannstl avatar Jul 25 '25 04:07 jesmannstl

I tried the latest docker (22nd date) and it still shows everything as New, no show information (Season or Episode).

@jesmannstl I would if I had a machine that it would build on, the Raspberry Pi 4B I have, that won't build.

GuruSR avatar Jul 26 '25 14:07 GuruSR

I tried the latest docker (22nd date) and it still shows everything as New, no show information (Season or Episode).

@jesmannstl I would if I had a machine that it would build on, the Raspberry Pi 4B I have, that won't build.

My edits haven't been added to the main yet or the docker

jesmannstl avatar Jul 27 '25 06:07 jesmannstl

The old version had an option to include a * in the title of a new episode. I don’t see that option Or discussion about it in version 2. Could that be added?

OptimalDuck avatar Aug 04 '25 04:08 OptimalDuck

The old version had an option to include a * in the title of a new episode. I don’t see that option Or discussion about it in version 2. Could that be added?

The PERL script still works and supports that option. Get it here: https://github.com/jef/zap2xml/tree/historical-perl

I.E. -A "new live"

ferrellsl avatar Aug 04 '25 05:08 ferrellsl

The old version had an option to include a * in the title of a new episode. I don’t see that option Or discussion about it in version 2. Could that be added?

So for a program <title>Big Brother</title> would be <title>Big Brother *</title> is what you're asking? I'm tinkering with my fork afterwhile trying to get a few programs to display correctly and see if I can add that as an option

jesmannstl avatar Aug 04 '25 06:08 jesmannstl

Yes, I think that's correct. When using the PERL script the -A switch will produce the following example:

channel="I30817.labs.gracenote.com">

Arizona's Family News at 4pm * Stay informed with the latest breaking news and headlines. News 30

ferrellsl avatar Aug 04 '25 06:08 ferrellsl

Added to https://github.com/jesmannstl/zap2xml fork use --appendAsterisk

jesmannstl avatar Aug 04 '25 08:08 jesmannstl

If you updated in the last hour I had to fix something so redownload and build

jesmannstl avatar Aug 04 '25 10:08 jesmannstl

Have also added the Date as Season/Episode to Series without one such as Daily Newscast will show Season 2025 Episode 0804

jesmannstl avatar Aug 04 '25 11:08 jesmannstl

Is the docker updated? I'm not seeing anything newer than 2 weeks.

GuruSR avatar Aug 04 '25 12:08 GuruSR

Docker is not

jesmannstl avatar Aug 04 '25 13:08 jesmannstl

Ah, I just checked the old copy I had of a working xmltv.xml, I do see <new />, but when the show isn't new, there isn't <previously-shown />. But, that doesn't seem to be the case, as I added it to a program and reloaded NextPVR's guide and it still shows as New.

The old one I have, this showed the proper state (as not new):

	<programme start="20250328150000 -0400" stop="20250328160000 -0400" channel="I2.1.31507.zap2it.com">
		<title lang="en">Dateline</title>
		<sub-title lang="en">Fire &amp; Ice</sub-title>
		<desc lang="en">Firefighters make a grisly discovery while responding to a house fire in a Toronto suburb; as a family searches for answers, investigators launch an elaborate undercover sting that reveals a devious murder-for-hire plot and the ultimate betrayal.</desc>
		<category lang="en">News</category>
		<length units="minutes">60</length>
		<icon src="https://zap2it.tmsimg.com/assets/p13159645_b_v13_aa.jpg" />
		<url>https://tvlistings.zap2it.com//overview.html?programSeriesId=SH02487428&amp;tmsId=EP024874280717</url>
		<episode-num system="common">S08E05</episode-num>
		<episode-num system="dd_progid">EP02487428.0717</episode-num>
		<episode-num system="xmltv_ns">7.4.</episode-num>
		<previously-shown />
		<subtitles type="teletext" />
		<rating>
			<value>TV-PG</value>
		</rating>
	</programme>

This I added the previously-shown and it still didn't change it from New:

  <programme start="20250804130000 +0000" stop="20250804133000 +0000" channel="51195">
    <title>Father Knows Best</title>
    <sub-title>Safety First</sub-title>
    <desc>Bud learns a lesson in safety when he is sentenced to crossing-guard duty for dangerous driving habits.</desc>
    <rating system="MPAA"><value>TV-G</value></rating>
    <audio type="cc" />
    <previously-shown />
    <episode-num system="season">3</episode-num>
    <episode-num system="episode">27</episode-num>
    <episode-num system="series">SH00001581</episode-num>
    <episode-num system="onscreen">S03E27</episode-num>
    <icon src="https://zap2it.tmsimg.com/assets/p1095718_e_v9_aa.jpg" />
  </programme>

Also on the docker, added TZ and set it to America/New_York and then EDT and I'm still seeing +0000 not -0400. Not sure if that might cause the "New" flag.

GuruSR avatar Aug 04 '25 13:08 GuruSR

Figured out how to publish docker on my fork. The time will be UTC the New and Previously Shown tags do not rely on that. The new Add Date and Date as Season/Episode on series without take in adjustment to America/New York automatically. End players in a different time zone than GMT will display EPG correctly.

<programme start="20250805083000 +0000" stop="20250805090000 +0000" channel="16689"> <title>CBS News New York This Morning 4:30am</title> <desc>News coverage to start the day.</desc> <category lang="en">News</category> <new /> <episode-num system="dd_progid">SH03619581.0000</episode-num> <date>20250805</date> <episode-num system="xmltv_ns">2024.0804</episode-num> <url>https://tvlistings.gracenote.com//overview.html?programSeriesId=SH03619581&amp;tmsId=SH036195810000</url> <icon src="https://zap2it.tmsimg.com/assets/p18809050_b_v13_ac.jpg" /> </programme>

Example with the date <programme start="20250807030000 +0000" stop="20250807033500 +0000" channel="16689"> <title>CBS News New York 11pm</title> <desc>Local news coverage.</desc> <category lang="en">News</category> <rating system="MPAA"><value>TV-PG</value></rating> <new /> <subtitles type="teletext" /> <episode-num system="dd_progid">SH01376260.0000</episode-num> <date>20250806</date> <episode-num system="xmltv_ns">2024.0805</episode-num> <url>https://tvlistings.gracenote.com//overview.html?programSeriesId=SH01376260&amp;tmsId=SH013762600000</url> <icon src="https://zap2it.tmsimg.com/assets/p8492450_b_v13_ab.jpg" /> </programme>

jesmannstl avatar Aug 04 '25 14:08 jesmannstl

For now use ghcr.io/jesmannstl/zap2xml:latest

Working now

jesmannstl avatar Aug 04 '25 14:08 jesmannstl

Ah, I just checked the old copy I had of a working xmltv.xml, I do see <new />, but when the show isn't new, there isn't <previously-shown />. But, that doesn't seem to be the case, as I added it to a program and reloaded NextPVR's guide and it still shows as New.

The old one I have, this showed the proper state (as not new):

	<programme start="20250328150000 -0400" stop="20250328160000 -0400" channel="I2.1.31507.zap2it.com">
		<title lang="en">Dateline</title>
		<sub-title lang="en">Fire &amp; Ice</sub-title>
		<desc lang="en">Firefighters make a grisly discovery while responding to a house fire in a Toronto suburb; as a family searches for answers, investigators launch an elaborate undercover sting that reveals a devious murder-for-hire plot and the ultimate betrayal.</desc>
		<category lang="en">News</category>
		<length units="minutes">60</length>
		<icon src="https://zap2it.tmsimg.com/assets/p13159645_b_v13_aa.jpg" />
		<url>https://tvlistings.zap2it.com//overview.html?programSeriesId=SH02487428&amp;tmsId=EP024874280717</url>
		<episode-num system="common">S08E05</episode-num>
		<episode-num system="dd_progid">EP02487428.0717</episode-num>
		<episode-num system="xmltv_ns">7.4.</episode-num>
		<previously-shown />
		<subtitles type="teletext" />
		<rating>
			<value>TV-PG</value>
		</rating>
	</programme>

This I added the previously-shown and it still didn't change it from New:

  <programme start="20250804130000 +0000" stop="20250804133000 +0000" channel="51195">
    <title>Father Knows Best</title>
    <sub-title>Safety First</sub-title>
    <desc>Bud learns a lesson in safety when he is sentenced to crossing-guard duty for dangerous driving habits.</desc>
    <rating system="MPAA"><value>TV-G</value></rating>
    <audio type="cc" />
    <previously-shown />
    <episode-num system="season">3</episode-num>
    <episode-num system="episode">27</episode-num>
    <episode-num system="series">SH00001581</episode-num>
    <episode-num system="onscreen">S03E27</episode-num>
    <icon src="https://zap2it.tmsimg.com/assets/p1095718_e_v9_aa.jpg" />
  </programme>

Also on the docker, added TZ and set it to America/New_York and then EDT and I'm still seeing +0000 not -0400. Not sure if that might cause the "New" flag.

You are better off using utc for the xml file. Then when your device decides to change to dst it will know whether to use -5 or -4 per the device or app using it. I had this issue last year and using utc fixed the problem for me.

Swamp-up avatar Aug 04 '25 18:08 Swamp-up

Yeah I don't use the time zone variable ever for the guide data but for the aired date if no date or episode given then I have that field only using the date converted to Eastern Time so for Example the 11pm news in New York will have a schedule of 20250805 0300 GMT but the date aired will be 20250804 which is today

jesmannstl avatar Aug 04 '25 18:08 jesmannstl

Question. Is jesmannstl and jef the same person?

Swamp-up avatar Aug 04 '25 19:08 Swamp-up

I’m a little behind but yes adding the * to the end of the entry is exactly what I meant. I haven’t figured out how to use the fork yet (I’m pretty new to GitHub) but it appears your fix is perfect for me. Thank you.

OptimalDuck avatar Aug 04 '25 19:08 OptimalDuck