Project

General

Profile

Q: <episode-num system="onscreen"> support?

Added by Icy K about 13 years ago

Hi all,

I'd like to add the episode title to the TVHeadend recordings. As I understand there are 2 types of episode tags: <episode-num system="xmltv_ns"> and <episode-num system="onscreen">.

I'd like to use system="onscreen" but TVHeadend does not seem to support this.

This is the xmltv source:

    <title lang="nl">Boston legal</title>
    <episode-num system="onscreen">Tabloid nation</episode-num>
    <desc lang="nl">Alan en Jerry verdedigen een man die ervan overtuigd is dat een realityshow schuldig is aan de dood van zijn dochter.</desc>
    <credits>
      <actor>William Shatner</actor>
      <actor>James Spader</actor>
      <actor>Candice Bergen</actor>
    </credits>
    <category lang="nl">Serie</category>
  </programme>

I ticked the option Include episode in filename , but the episode name doesn't get saved.

In the EPG screen, the episode title is shown, both on the list and on the detailed popup window (see attached screendump TVH_EPG.png).
In the DVR screen however, the episode title is shown on the list but NOT on the detailed popup window (see attached screendump TVH_recording.png), nor is it saved in the file name.

Is there a way I can 'fix' TVHeadend to use the contents of the <episode-num system="onscreen"> tag in the file name?

Thanks,

Dick


Replies (5)

RE: Q: <episode-num system="onscreen"> support? - Added by Icy K about 13 years ago

Update: when I manually 'fake' a numerical episode, it does get added to the filename:

  <programme channel="bbc2" start="20110909230000 +0200" stop="20110909233000 +0200">
    <title lang="nl">QI</title>
    <episode-num system="xmltv_ns">1.0.0/1</episode-num>
    <desc lang="nl">Stephen Fry plays I-Spy with Sandi Toksvig, Lee Mack, Jimmy Carr and Alan Davies.</desc>
  </programme>

The result:

Sep 09 22:57:31 dvr: QI.2011-09-09.23-00.S02E01 from adapter: "eth0" 

So my conclusion is that TVHeadend doesn't process the <episode-num system="onscreen"> tag.
Any ideas how to fix this?

RE: Q: <episode-num system="onscreen"> support? - Added by Icy K about 13 years ago

Before applying this fix, please read the comment from Karl Dietz in the next post!
------------------------------------------------------------------------------------------------------------

I fixed it (using git-082e661).

In src/webui/static/app/dvr.js around line 60, change

    if(entry.chicon != null && entry.chicon.length > 0)
        content += '<img class="x-epg-chicon" src="' + entry.chicon + '">';

    content += '<div class="x-epg-title">' + entry.title + '</div>';
    content += '<div class="x-epg-desc">' + entry.description + '</div>';
    content += '<hr>'
    content += '<div class="x-epg-meta">Status: ' + entry.status + '</div>';

to

    if(entry.chicon != null && entry.chicon.length > 0)
        content += '<img class="x-epg-chicon" src="' + entry.chicon + '">';

    content += '<div class="x-epg-title">' + entry.title + '</div>';
    /* @@@@@ added entry.episode (= episode name / sub title) */
    content += '<div class="x-epg-desc"><b>' + entry.episode + '</b></div>';
    content += '<div class="x-epg-desc">' + entry.description + '</div>';
    content += '<hr>'
    content += '<div class="x-epg-meta">Status: ' + entry.status + '</div>';

to show the episode name in the dvr popup window.

In src/dvr/dvr_db.c around line 185, change

  if(cfg->dvr_flags & DVR_EPISODE_IN_TITLE) {

    if(de->de_episode.ee_season && de->de_episode.ee_episode)
      snprintf(output + strlen(output), outlen - strlen(output),
               ".S%02dE%02d",
               de->de_episode.ee_season, de->de_episode.ee_episode);

    else if(de->de_episode.ee_episode)
      snprintf(output + strlen(output), outlen - strlen(output),
               ".E%02d",
               de->de_episode.ee_episode);
  }

to

  if(cfg->dvr_flags & DVR_EPISODE_IN_TITLE) {

    if(de->de_episode.ee_season && de->de_episode.ee_episode)
      snprintf(output + strlen(output), outlen - strlen(output),
               ".S%02dE%02d",
               de->de_episode.ee_season, de->de_episode.ee_episode);

    else if(de->de_episode.ee_episode)
      snprintf(output + strlen(output), outlen - strlen(output),
               ".E%02d",
               de->de_episode.ee_episode);

    /* @@@@@ added onscreen (= episode name / sub title) */
    else if(de->de_episode.ee_onscreen)
        snprintf(output + strlen(output), outlen - strlen(output),
               " - %s",
                de->de_episode.ee_onscreen);
  }

to put the episode name in the file name, when using the <episode-num system="onscreen"> tag.

Cheers!

RE: Q: <episode-num system="onscreen"> support? - Added by Karl Dietz about 13 years ago

Hi Icy,

you are fixing the wrong side of the interface. Your example shows wrong usage of the xmltv schema which will lead into problems with many consuming applications.

    <title lang="nl">Boston legal</title>
    <episode-num system="onscreen">Tabloid nation</episode-num>
    <desc lang="nl">Alan en Jerry verdedigen een man die ervan overtuigd is dat een realityshow schuldig is aan de dood van zijn dochter.</desc>
  </programme>

The episode-num system "onscreen" is for the textual rendering of the episode number, e.g. "#FFEE". See http://xmltv.cvs.sourceforge.net/viewvc/xmltv/xmltv/xmltv.dtd?view=markup#l354
You episode title goes into the sub-title element. See http://xmltv.cvs.sourceforge.net/viewvc/xmltv/xmltv/xmltv.dtd?view=markup#l236

The corrected example is as follows:

    <title lang="nl">Boston legal</title>
    <sub-title lang="nl">Tabloid nation</sub-title>
    <desc lang="nl">Alan en Jerry verdedigen een man die ervan overtuigd is dat een realityshow schuldig is aan de dood van zijn dochter.</desc>
  </programme>

Regards,
Karl

RE: Q: <episode-num system="onscreen"> support? - Added by Icy K about 13 years ago

Hi Karl,

Thanks for your remark, I didn't realize that from the words "simply copy what the programme makers write in the credits".

In fact, I 'corrupted' the xmltv file on purpose. Originally, the episode title indeed was placed between <sub-title> tags. But as TVHeadend does not seem to support the sub-title tag, and I really wanted the sub-titles, I made this change.

But if sub-titles could be added to TVHeadend, that would definitely be the preferred solution.

RE: Q: <episode-num system="onscreen"> support? - Added by Karl Dietz about 13 years ago

Hi Icy,

I saw the other thread later.. yes using the sub-title element is preferred.

Regards,
Karl

    (1-5/5)