cvarelaruiz / owi2plex

Exporter of EPG from OpenWebif to XMLTV to use with Plex
Mozilla Public License 2.0
26 stars 6 forks source link

Most episodes marked as new #1

Closed cvarelaruiz closed 4 years ago

cvarelaruiz commented 5 years ago

At the moment most episodes of series are marked as "NEW" even though not all programmes don't have the new element.

For example the following episode appears as NEW

<programme channel="20810" start="20190325092500" stop="20190325103000">
    <length units="minutes">65</length>
    <desc lang="en">Jeremy Kyle presents a confrontational talk show in which guests thrash out their conflicts, dilemmas and relationship issues in front of a studio audience. [S,HD] S16 Ep158</desc>
    <new/>
    <title lang="en">The Jeremy Kyle Show</title>
    <episode-num system="xmltv_ns">15.157.</episode-num>
    <category lang="en">Series</category>
    <episode-num system="original-air-date">2019-03-25</episode-num>
</programme>

as the original title had the word "New: " in it and is processed this way:

if 'New: ' in title:
                _ = etree.SubElement(programme, 'new')
                title = title.replace('New: ', '')

But this one should not:

<programme channel="1102" start="20190327190000" stop="20190327192500">
    <length units="minutes">25</length>
    <desc lang="en">Sitcom. Leonard confronts the woman he kissed in an attempt to set Penny's mind at ease. Sheldon tries to retaliate after his breakup with Amy. Director: Mark Cendrowski Starring: Johnny Galecki, Jim Parsons, Kaley Cuoco, Simon Helberg, Kunal Nayyar, Melissa Rauch  (HD, S)</desc>
    <title lang="en">The Big Bang Theory</title>
    <episode-num system="original-air-date">2019-03-27</episode-num>
  </programme>

Probably due to the original-air-date calculation.

cvarelaruiz commented 4 years ago

Release 0.1a11 has some improvements for the detection of Previously Shown episodes but still most episodes are marked as new. Doubt this will ever improve unless further information is provided in the OpenWebIf API allowing better logic.

Closing for now as no further detection can be done with the existing information from the source.