Episode numbers parsing examples do not work as expected (1 Viewer)

Evzen

Portal Member
February 14, 2010
25
6
Home Country
Czech Republic Czech Republic
Hi, I'm new here so please forgive me if I am just missing something...

Just installed MP 1.1 RC1 (fresh install) and started playing a bit more with WebEPG.
Using the (fixed) Czech grabber for tv.sms.cz (https://forum.team-mediaportal.com/...feature-request-here-48/webepg-cookies-53697/), which contains the very same search code as the example in the MediaPortal_WebEPG_Grabber:
Code:
<Search match="\([0-9]{1,3}[,][0-9]{0,3}\)" field="#EPISODE" remove="true" />
<Search match="\([0-9]{1,3}\)" field="#EPISODE" remove="true" />
<Search match="\([0-9]{1,3}[/][0-9]{0,3}\)" field="#EPISODE" remove="true" />

Apparently, using these the WebEPG is supposed to extract the entire string, i.e. including the brackets/comma/slash, right?
But it simply doesn't... :confused:
What ends up written in the database (or tvguide.xml file) is only the first number, i.e. if the episode string is "14/26" or "(123,124)", only the "14" or "123" gets extracted... :confused:

Done some tests and after changing the regexp to e.g. {1,1}, episode strings like the examples above are left intact... which is correct and seems like the problem is in the further processing of the extracted string before exporting to DB or XML.

Now I don't know if I am doing something wrong (but what?! there is nothing I could screw up...), or if it is a pretty nasty bug in the WebEPG...
But how comes nobody else would be bothered by such obvious bug? I'm totally confused... :confused:
 

arion_p

Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    WebEPG does not support the N/M format for episode numbers and neither does TVServer / MediaPortal. Non-numeric episode numbers (e.g. 12A, PILOT etc.) are not supported either. The quoted search strings make sure there are no episode number leftovers in the title/description. Most people don't even need the second number (the /M part) since they use MP-TV Series which already know how many episodes there are in a season and how many seasons there are in a series.
     

    Evzen

    Portal Member
    February 14, 2010
    25
    6
    Home Country
    Czech Republic Czech Republic
    Ahhh, I see...
    But this is apparently not obvious from the description in Wiki.
    And given the fact that the database column for episodenum and seriesnum is VARCHAR(200) type, it's even less obvious that a grabber would restrict the extracted data to numbers only.

    How about the "double episodes" (325, 326) - I hardly believe that people just live with the fact that only the first number is extracted...

    Actually, is there any detailed description of all the grabber file sections? I find The Wiki page not too comprehensive and some parts are not explained at all (e.g. DataPreference)... so there is probably some other source of information... where?

    BTW, the Wiki page is full of errors (Expected a color value "GENRE" after "#"), which appeared on the page more than a year ago... looking at the edit history, they were not there before.
     

    Evzen

    Portal Member
    February 14, 2010
    25
    6
    Home Country
    Czech Republic Czech Republic
    And where do people get detailed information about how the grabber works (e.g. the mentioned DataPreference section)?
    Is there any other place with detailed manual?

    Regarding the unsupported non-numeric episode numbers in MP and TVServer - why is the DB filed type VARCHAR then if it supports only numeric values? Or the other way around - why it supports only numeric values when the DB allows to store strings?

    I don't want to sound annoying, I just don't get it ;-\.
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    MP and TV Server have no problem with non-numeric episode numbers (although some characters will be replaced). Only WebEPG does not support non-numeric episode numbers because it was initially built around XMLTV (and still outputs to that format). In XMLTV there are two episode numbering formats: onscreen an NS. Onscreen format is a simple non-interpreted string format. This means it is not possible to extract season and episode number separately. In NS format (which is the one WebEPG uses when outputting to XMLTV) the episode numbering follows this pattern:
    Code:
    [season[/seasons count]].[episode[/episodes count]].[part[/parts count]]
    All components (season, episode etc.) are zero based integers. Anything enclosed in [] is optional. So the 4th episode of the 2nd season (which has 23 episodes in total) would be 1.3/23.
    In order to be able to output in NS format WebEPG needs to allow only integer episode/season numbers and it has no use for episode/season counts as these cannot be stored in the database.

    Regarding documentation for building grabbers, unfortunately there isn't anything (other than the outdated wiki). Your best bet is asking in the forums and experimenting. That is how I started and I have to say that our community is very helpful and supporting of each other.
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom