Proper Season and Episode info? (1 Viewer)

Revolty

Portal Member
September 13, 2010
25
1
Home Country
Sweden Sweden
I have the following guide:

Code:
23:00 
CSI
Amerikansk kriminalserie från 2004-05. 
En man vaknar upp blodig bredvid en död strippa men envisas med att han är oskyldig. 
En ny DNA-specialist börjar i teamet men har svårt med trivseln. 
Säsong 5. Del 1 av 25. [896052]

I want the following extracted:

Code:
SERIESNUM: 5
EPISODENUM: 1
EPISODEPART: 25

In the origional grabber file i find this lines:

Code:
<Search match="Del [0-9]{1,} av [0-9]{1,}." field="#EPISODE" remove="false" />
<Search match="Säsong \d+" field="#SEASON" remove="false" />

TVguide.xml:

Code:
- <programme start="20100930230000 +0200" channel="Kanal 5-kanal5.se" clumpidx="0/1">
  <title>Csi</title> 
  <desc>Amerikansk kriminalserie från 2004-05. De gifta paren i ett bostadsområde har partyn där de ägnar sig åt partnerbyte men efter ett party hittas en kvinna mördad. Säsong 5. Del 5 av 25. Gästskådespelare: Aisha Tyler, Dedee Pfeiffer, James Patrick Stuart.</desc> 
  <episode-num system="onscreen">5.5</episode-num> 
  </programme>

Instead of SERIESNUM, EPISODENUM & EPISODEPART tags I get "<episode-num system="onscreen">5.5</episode-num>"

what the ..?
 

arion_p

Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Two things:

    1. Your episode search expression does not match an episode number. It matches (and returns)
      "Del 1 av 25." which obviously is not a number and as such cannot be used as an episode number.
    2. In xmltv format, the season, episode and part numbers are all output in an episode-num tag in the format season.episode.part . If you had read xmltv.dtd you would know that.
     

    Revolty

    Portal Member
    September 13, 2010
    25
    1
    Home Country
    Sweden Sweden
    Two things:

    1. In xmltv format, the season, episode and part numbers are all output in an episode-num tag in the format season.episode.part . If you had read xmltv.dtd you would know that.
    but the season.episode format does not work

    This shows episode:
    Code:
    <episode-num system="onscreen">[COLOR="Red"]5[/COLOR]</episode-num>

    but this won't show season or episode:
    Code:
    <episode-num system="onscreen">[COLOR="Red"]5.5[/COLOR]</episode-num>
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Which version of MediaPortal are you using?
    Why are you using xmltv intermediate format? do you need to feed EPG data to any application other than TVServer?
     

    Revolty

    Portal Member
    September 13, 2010
    25
    1
    Home Country
    Sweden Sweden
    Im using 1.1.0 Final, both WebEPG & XMLTV are the verisions bundled in MediaPortal.
    Not sure what intermediate format is. I followed the steps some guide provided here and have not changed any format option what I know of.
    Im only using it for MediaPortal.

    When there's only episode info (>5<) it shows up in EPG in MediaPortal with 'name (5)' and recordings beeing saved as 'name E5', but when theres both season and episode info (>5.5<) it only shows 'name' and allso beeing saved like so when i record.

    This is a problem when I use My TVSeries plugin and it can't read the season & episode (it should be saved as 'name S#E#').
     

    Revolty

    Portal Member
    September 13, 2010
    25
    1
    Home Country
    Sweden Sweden
    I runned an recording and it was saved to '\Stargate Atlantis\Season 5\Stargate Atlantis S05E24' as it should!

    :D
     

    vuego

    Documentation Group
  • Team MediaPortal
  • August 5, 2006
    1,646
    764
    Göteborg
    Home Country
    Sweden Sweden
    Two things:

    1. Your episode search expression does not match an episode number. It matches (and returns)
      "Del 1 av 25." which obviously is not a number and as such cannot be used as an episode number.
    2. In xmltv format, the season, episode and part numbers are all output in an episode-num tag in the format season.episode.part . If you had read xmltv.dtd you would know that.

    Hi arion

    I guess Revolty is using the Swedish grabbers www_dagenstv_com.xml and svt_se.xml. You helped me upload them to SVN a while ago. I created them by modifying older grabbers so this tag has been around for many years:
    Code:
    <Search match="Del [0-9]{1,} av [0-9]{1,}." field="#EPISODE" remove="false" />
    I have no idea how WebEPG handles this tag internally but I think it has always produced the episode-num element without any system attribute.
    Revolty's output quote includes the system="onscreen" attribute but I guess that's added by Internet Explorer reading the xmltv.dtd file. Here's what it looks like in Notepad:
    Code:
    <episode-num>5.5</episode-num>
    It seems like the other strings in the search match ("Del" and "av") are stripped by WebEPG.

    I've been using For the Record and it does detect series and episode numbers correctly (it does record episode 1 of both season 1 and 2 for example).

    I've checked the database of 4tR and MP after importing the same TVGuide.xml produced by WebEPG and it looks like they handle this case a little different. Neither fills out the SeriesNumber field but 4tR use "EpisodeNumberDisplay" (but not "EpisodeNumber") when for example 5.5 is (wrongly) used as episode-num. This means that the information is not lost and still usable by the recorder.

    So how can we change the grabber to output <episode-num>4.4.</episode-num> and shouldn't we add the system="xmltv_ns" attribute?
     

    Attachments

    • MPDb.png
      MPDb.png
      12 KB
    • 4trDb.png
      4trDb.png
      25.5 KB

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    I guess Revolty is using the Swedish grabbers www_dagenstv_com.xml and svt_se.xml. You helped me upload them to SVN a while ago. I created them by modifying older grabbers so this tag has been around for many years:
    Code:
    <Search match="Del [0-9]{1,} av [0-9]{1,}." field="#EPISODE" remove="false" />
    I have no idea how WebEPG handles this tag internally but I think it has always produced the episode-num element without any system attribute.
    I think you are right, if the string start with a number it simply converts the numeric part of the string and ignores the rest.

    Revolty's output quote includes the system="onscreen" attribute but I guess that's added by Internet Explorer reading the xmltv.dtd file. Here's what it looks like in Notepad:
    Code:
    <episode-num>5.5</episode-num>
    It seems like the other strings in the search match ("Del" and "av") are stripped by WebEPG.
    The "onscreen" attribute is odd indeed, but I have not looked at that part of the code for a long time so I may be wrong.

    I've been using For the Record and it does detect series and episode numbers correctly (it does record episode 1 of both season 1 and 2 for example).

    I've checked the database of 4tR and MP after importing the same TVGuide.xml produced by WebEPG and it looks like they handle this case a little different. Neither fills out the SeriesNumber field but 4tR use "EpisodeNumberDisplay" (but not "EpisodeNumber") when for example 5.5 is (wrongly) used as episode-num. This means that the information is not lost and still usable by the recorder.

    So how can we change the grabber to output <episode-num>4.4.</episode-num> and shouldn't we add the system="xmltv_ns" attribute?

    I had provided a patch once to fix that, but it was later reverted because it needed a corresponding patch in xmltv import plugin.

    I have to dig the forums again :p.
     

    UrbanSK

    Portal Member
    June 29, 2006
    19
    0
    Sweden
    Home Country
    Sweden Sweden
    Hi all!

    Any progress on this!

    I can only confirm that the XMLTV file generated by webepg is wrongly formated.

    For episode numbers it looks like:

    <episode-num>3</episode-num>

    but should look like

    <episode-num system="xmltv_ns">2</episode-num>

    The numbering is also wrong.

    Season 1 episode 1 should look like this:

    <episode-num system="xmltv_ns">0.0</episode-num>

    as numbering starts from zero.


    I use 4TheRecord to schedule recordings as its scheduler is far better than any I have found in Mediaportal.

    Regards,

    UrbanSk
     

    Users who are viewing this thread

    Top Bottom