"New" tag not always added (XMLTV - Au)

I'm looking at jumping back into Channels, but it's all about whether it is going to pass the "Significant Other" test.

One thing that is really important to me is being able to reliably record only new episodes of the programmes that are important. But it seems to me that the "New" tag is not always added to programmes correctly.

Looking through the XMLTV data, I can see that some programmes have the <previously-shown/> element, and I believe that the absence of this element should trigger an episode to be tagged as "New".

Here is a snippet, showing one that should be "New", and one that should not:

<programme start="20220421203200 +0930" stop="20220421213600 +0930" channel="2.yourtv.com.au">
  <title>Q+A</title>
  <sub-title>Gladstone Special</sub-title>
  <desc>
    From Gladstone in Queensland, debates about local issues in the community, including the transition from a reliance on fossil fuels to a greener future.
  </desc>
  <category>Current Affairs</category>
  <icon src="https://s3-ap-southeast-2.amazonaws.com/nine-tvmg-images-prod/30/72/49/307249_qandaa.jpg"/>
  <episode-num system="SxxExx">S15E11</episode-num>
  <episode-num system="xmltv_ns">14.10.</episode-num>
  <video>
    <quality>SDTV</quality>
  </video>
  <rating>
    <value>NC</value>
  </rating>
</programme>
<programme start="20220421213600 +0930" stop="20220421220700 +0930" channel="2.yourtv.com.au">
  <title>Kurt Fearnley's One Plus One</title>
  <sub-title>Harry Garside</sub-title>
  <desc>
    Harry Garside is the ballet dancing plumber who won bronze for boxing in Tokyo. He talks to Kurt     
    Fearnley about his journey to the ring, and winning Australia's first Olympic boxing medal in 33 years.
  </desc>
  <category>Current Affairs</category>
  <episode-num system="SxxExx">S2022E421</episode-num>
  <episode-num system="xmltv_ns">2021.420.</episode-num>
  <previously-shown/>
  <video>
    <quality>SDTV</quality>
  </video>
  <rating>
    <value>NC</value>
  </rating>
</programme>

Note: there is no previously-shown element in the first, but there is in the second.

The screenshot below shows the relevant section of the guide: I have extended it further to show that it is showing a blue line (New tag) on some episodes, but not others. The "Q+A", and the "7:30" episodes should also be tagged as New.

Does anyone else see this, or is there any way to fix it?

1 Like

The XMLTV DTD also specifies the <new/> element, which I what I believe that Channels is looking for.

Here is there reference from the official DTD:

Thanks.

I'm not quite sure that's the only source - I did find there's also a <premiere/> element, which seems to trigger the same behaviour.

This is present on the programmes in my guide that are flagged as "New".

Now, the trick is how I access the lack of a <previously-shown/> tag in the same way as the tags/etc (ie, the Passes advanced view).

(I'd settle for a way to modify the XML before it gets parsed).

In the past, I had modified an XMLTV generator to ensure that the previously-shown element and new elements were added, and that either would be added. If you are using one of the tools from the XMLTV project to generate your file, that is certainly an avenue you can pursue.

However, if you are getting your guide from a third-party already in XMLTV, then you may need to come up with some sort of middleware to ensure each programme element contains either a previously-shown or a new element. Or, perhaps Aman (@tmm1) can see about modifying Channels' XMLTV parser to address this issue.

Okay, running a (simple) server that grabs the XMLTV, mutates it as necessary, and then serves the result.

Seems to be working a treat. If you have the same problem, you can find it at: xmltv-mutator

If you are running channels-dvr using docker-compose, it is possible to set this up as a second service.

1 Like