Episodenlisten für den VDR

Homepage der Episodenlisten - https://www.eplists.de

Clients:


Alte Informationen über VDRSeriesTimer.pl:

Dieses Script ist seit 2011 nicht aktualisiert worden!

  • VDRSeriesTimer.pl

  • Software Requirements

  • Installation

  • VDRSeriesTimer.pl -- Man page

  • svdrpsend-ng.pl - Man page

VDRSeriesTimer.pl

Eplists is a database which stores the episodes names for many series.

VDRSeriesTimer.pl is a Perl-Script, which, if called with an episode name, searches the database for the season information according to this name.

The Script is intended to be be an addon to the VDR plugin epgsearch and can also be included into tvmovie2vdr.

Example:

Script call: $ VDRSeriesTimer.pl --title 'Bones' --subtitle 'A Boy in the Tree' --formatprefix "Series~%T~"

Result: Series~Bones~01x03 - 003. A Boy in the Tree

Script call: $ VDRSeriesTimer.pl --title 'Bones' --subtitle 'A Boy in the Tree' --formatprefix "" --format "%sx%e %2n"

Result: 01x03 03

This numbers mean: Season 1, Episode 3, Number 3

 

Software Requirements

VDR-Plugins

epgsearch version >= 0.9.19

Perl

Perl >= 5.8

Module

libintl-perl, libunicode-string-perl, libio-socket-ssl-perl, libconfig-general-perl, Text::LevenshteinXS, IO::Uncompress::Gunzip

Module installation under Debian

aptitude install perl-modules libintl-perl libunicode-string-perl libio-socket-ssl-perl libconfig-general-perl

perl -MCPAN -e 'install Text::LevenshteinXS'

perl -MCPAN -e 'install IO::Uncompress::Gunzip'


Installation

Short

tar xvzf VDRSeriesTimer.pl-0.3.x.tgz

cd VDRSeriesTimer.pl-*

make install

Longer

Install scripts

Extract the Archive, cd into VDRSeriesTimer.pl-* and run 'make install'. This install the package into /usr/local/bin.

To change the installation path, run 'make PREFIX=/usr install' to install into /usr/bin.

Use scripts from commandline

Read INSTALL inside the package.

Use script within epgsearch

Read INSTALL inside the package.

Use the tvmovie2vdr patch

Read INSTALL inside the package.


VDRSeriesTimer.pl -- Man page

  • NAME
  • SYNOPSIS
  • OPTIONS
  • DESCRIPTION
  • CONTENT
  • 1. Installation
    • 1.1 -format
  • 2. Episodes file
    • 2.x Keywords
    • 2.1 SEASONLIST ... /SEASONLIST
    • 2.5 COMPLETE
    • 2.7 SHORT <text>
  • 3. VDRSeriesTimer.conf - The configuration file
  • 4. "Per series'' configuration file
  • 5. Examples
  • 6. How to get episode files
  • 7. COPYRIGHT and LICENSE

NAME

VDRSeriesTimer.pl - Script to find season and episode number with the help of episode lists


SYNOPSIS

VDRSeriesTimer.pl ( -c=<> | -ec=<> ) --t=<> (--sub=<> | --ep=<>) [options...]


OPTIONS

Help options:

   --help | -h | -?             brief help message
   --man                        full documentation

Needed options:

     At least one of them:
   --title | -t                 series title
   --subtitle | -s              series subtitle
   --lists | -l                 lists episodes files
   --options                    print options/variables and exit

Optional options:

   --summary                    series summary
   --episode | -ep              overall episode number
   --formatprefix | -fp         First part of the output string, default: "%D~%T~"
   --format | -f                Output format, default: "%sx%e - %n. %S"
   --formatspacer | -fs         How to seperate the subtitles if there is more than one,
                                default: " / "
                                  %T - Title
                                  %S - Subtitle
                                  %s - Season number
                                  %e - Episode number
                                  %n - Episode number over all
                                  %D - Directory
                                  %C - Category
                                  %G - Genre
                                Example:
                                  Smallville~05x10 - 098. Lex gegen Jonathan
   --category                   category
   --genre                      genre
   --date                       date
   --time                       time
   --timet                      timestamp
   --channel                    channel number
   --useshorttitle | -short     use / don't use the SHORT keyword in episode list, defaults to "use"
   --nouseshorttitle | -noshort
   --verbose | -v               verbosity, increasing by using it more than one times, up to three times
   --dry-run | -dry             don't change EPG via SVDRP or any file
   --version | -V               show version number

DESCRIPTION

VDRSeriesTimer.pl is called out of the epgsearchuservars.conf with some parameters.

It needs VDR > 1.4.0 and epgsearch > 0.9.19.

This allows you to configure the timer which is set by an series-searchtimer.

Normally, if the EPG contains something like this:

 Title:    The Simpsons
 Subtitle: My Big Fat Geek Wedding

you will get an Timer like this

 The Simpsons~My Big Fat Geek Wedding

With this Script you can get this

 The Simpsons~15x17 - 330. My Big Fat Geek Wedding

or this

 The Simpsons~15.17 My Big Fat Geek Wedding

or this

 The Simpsons~S15E17 My Big Fat Geek Wedding

The Script recognize also some multi epiosodes with the EPG-format which RTL II uses in germany.

With

 Title:    Andromeda
 Subtitle: 15. Episode 1 / 16. Episode 2

you get

 Andromeda~01x15 - 15. Episode 1 / 01x16 - 16. Episode 2

CONTENT

 1. Installation
 1.1 --format
 2. Episodes file
 2.x Keywords
 3. VDRSeriesTimer.conf - The configuration file
 4. "Per series" configuration file
 5. Examples
 6. How to get episode files
 7. COPYRIGHT and LICENSE

1. Installation

Copy the Script VDRSeriesTimer.pl somewhere in the $PATH.

Then edit epgsearchuservars and add one of the following:

A) If you've extended EPG (tvmovie, hörzu, etc.):

 %Season%=system(/usr/local/bin/VDRSeriesTimer.pl,--title %Title% --subtitle %Subtitle% --episode %Episode% --category %Category% --genre %Genre% --date %date% --time %time% --channel %chnr% --timet %time_lng%)
 %DateVar%=%time_w% %date% %time% 
 %SeriesSD%=%Subtitle% ? %Subtitle% : %DateVar%
 %SeriesVar3%=Series~%Title%~%Episodes%. %SeriesSD%
 %SeriesVar4%=Series~%Title%~%SeriesSD% 
 %SeriesVar1%=%Episode% ? %SeriesVar3% : %SeriesVar4%
 %Series%=%Season% ? %Season% : %SeriesVar1%

B) If you dont't have extended EPG with category, genre etc., but the episode number, you can use a shorter version.

 %Season%=system(/usr/local/bin/VDRSeriesTimer.pl,--title %Title% --subtitle %Subtitle% --episode %Episode% --channel %chnr% --timet %time_lng%)
 
 %DateVar%=%time_w% %date% %time%
 %SeriesSD%=%Subtitle% ? %Subtitle% : %DateVar%
 %SeriesVar3%=Series~%Title%~%Episodes%. %SeriesSD%
 %SeriesVar4%=Series~%Title%~%SeriesSD% 
 %SeriesVar1%=%Episode% ? %SeriesVar3% : %SeriesVar4%
 %Series%=%Season% ? %Season% : %SeriesVar1%

C) If you don't have an episode number in EPG:

 %Season%=system(/usr/local/bin/VDRSeriesTimer.pl,--title %Title% --subtitle %Subtitle% --channel %chnr% --timet %time_lng%)
 
 %DateVar%=%time_w% %date% %time%
 %SeriesSD%=%Subtitle% ? %Subtitle% : %DateVar%
 %SeriesVar1%=Series~%Title%~%SeriesSD%
 %Series%=%Season% ? %Season% : %SeriesVar1%

In this short version, the script always tries to find an matching subtitle in the episodes list.

Then use in the searchtimer the variable %Series% as Path.

The episode files must have as filename the title of the series with the suffix .episodes.

So for the series The Simpsons, it searches for The Simpsons.episodes.

The Script allows per default a difference of 20 percent of the title, subtitle and the filename.

1.1 --format

With --formatprefix <string>, --format <string> and --formatspacer <string> you can define how the output should look. The default is:

 "%D~%T~"         for --formatprefix <string>
 "%sx%e - %n. %S" for --format <string>
 " / "            for --formatspacer <string>

Call "VDRSeriesTimer.pl -help'' to see what each variable means.

You can also change how many zeroes will be prefixed.

 "%s" results in "02"
 
 "%5s" results in "00002"

This can be used with %s, %e and %n. Don't try this with %D, %T, %S, %C and %G.


2. Episodes file

The file contains the episodes in the following format. Each field is seperated by one tab.

 #Season        Episode Number  Subtitle
 01     1       1       Season one, Episode one
 01     2       2       Season one, Episode two
 01     3       3       Season one, Episode three
 02     1       4       Sesaon two, Episode one
 02     2       5       Season two, Episode two
 ...

At the beginning of the file you can use some special keywords. Each keyword must begin with "# ''.

Take a look on some of the "ready to use'' lists, Webaddress at the end of this file.

2.x Keywords

Description of the available keywords.

2.1 SEASONLIST ... /SEASONLIST

If you don't have a complete episode list but your EPG contains the episode number, you can define which season contains which episodes. Then this script can calculate the needed data. Episodes, which are not in this file will be added.

 # SEASONLIST
 # 1    1       22
 # 2    23      44
 # 3    45      66
 # /SEASONLIST

The format is <Season> TAB <first episode in season> TAB <last episode in season>

2.5 COMPLETE

 # COMPLETE

The script assume that the episode list is complete, nothing will be changed in the file.

2.7 SHORT <text>

This text will be used as series title. So you can use this

 # SHORT DS9

to get "DS9'', if the title in the EPG is "Deep Space Nine''

You can use your own short title by using a "per series'' configuration file. See chapter 4.


3. VDRSeriesTimer.conf - The configuration file

If the configuration file .VDRSeriesTimer.conf in the users does not exist, an file with default values named .VDRSeriesTimer.conf will be created in your current $HOME.

Thes settings are:

ListsDir = "''

Path to the episodes list.

SeriesConfsDir = "''

Path where to find the "per series'' configuration.

UseShortTitle = yes

Replace the title with the short title found in the "per series'' configuration file or the .episodes file.

Protected = no

Don't change any file.

FormatPrefix = "%D~%T~''

Format = "%sx%e - %n. %S''

FormatSpacer = " / ''

Output format.

Fuzzy = 0.20

Fuzzy matching in percent. 0.00 means must match 100%. 1.00 means must match 0%.

Useful is something between 0.00 and 0.25.

SendEMail = no

Send an e-mail if something gets wrong, eg. an epiosde list cannot be found.

EMailTo = "''

E-mail recipient.

EMailSubject = "Season data missing''

Subject.

ChangeEPG = no

Add the season data to the epg summary. The script does this via svdrp.

KeepEPGSubtitle = yes

If the subtitle in the episode list differs from the one from EPG, don't change it to the subtitle from list.

CompareSubtitle = no

If yes, search the list by comparing the subtitle to get the season and episode numbers.

CompareEpisode = no

If yes, search the list by comparing the episode number to get the subtitle.

Fallback = yes

First, the script tries to compare Subtitle if CompareSubtitle is set. If this fails, it fall back to use other information to guess the missing data. If you don't want this, set this to no and the script returns unknown (?x? - ?.) if the first try fails.

VDRHost = "localhost'' SVDRPPort = 2001 SVDRPTimeout = 30

SVDRP settings.

MultiRegex = "(?:\s*)(?:(\d+)\.\s+)?(.*?)\s*(?:\/|$)''

How to detect multi episodes like Andromeda or Stargate on german RTL II. Fields are EpisodeNr, Subtitle. Dont' change this if you don't know what you do. ;)

Verbose = 0

Verbosity, increasing by using it more than one times, up to three times

LogFile = "''

File to log to.


4. "Per series'' configuration file

If you define the path SeriesConfsDir, you can put there one configuration file per series.

File needs to be named as the episodes file, but with ".episodes'' replaced with ".conf'', for example: Lost.conf.

Settings from this file will overwrite the global ones from VDRSeriesTimer.conf.

Possible settings are:

UseShortTitle = no

Protected = yes

FormatPrefix = "%D~%T~'' Format = "%sx%e - %n. %S'' FormatSpacer = " / ''

Fuzzy = 0.20

SendEMail = no

ChangeEPG = yes

KeepEPGSubtitle = yes

See previous chapter for description.

CompareSubtitle = no

If yes, search the list by comparing the subtitle to get the season and episode numbers.

CompareEpisode = no

If yes, search the list by comparing the episode number to get the subtitle.

Fallback = yes

First, the script tries to compare Subtitle if CompareSubtitle is set. If this fails, it fall back to use other information to guess the missing data. If you don't want this, set this to no and the script returns unknown (?x? - ?.) if the first try fails.

EpisodeIncrement = +0

If the episode number in the EPG isn't correct, you can increment or decrement the episode number. For example, +5 or -5.

StartWithSeason = 0

Start the comaparing with this season number. Needed for "24'', because there are the same subtitles in each season.

MultiRegex = "(?:\s*)(?:(\d+)\.\s+)?(.*?)\s*(?:\/|$)''

How to detect multi episodes like Andromeda or Stargate on german RTL II. Fields are EpisodeNr, Subtitle. Dont' change this if you don't know what you do. ;)

Verbose = 0

Verbosity, increasing by using it more than one times, up to three times

LogFile = "''

File to log to.


5. Examples

 VDRSeriesTimer.pl --config /etc/vdr.conf/plugins/epgsearch/data/ --title 'Smallville' --subtitle 'Lex gegen Jonathan'

Results in:

 Smallville~05x10 - 098. Lex gegen Jonathan
 VDRSeriesTimer.pl --title 'Smallville' --subtitle 'Lex gegen Jonathan' --format "%T~%3s.%e (%4n) %S"

Results in:

 Smallville~005.10 (0098) Lex gegen Jonathan

6. How to get episode files

The episode files can be found there:

http://eplists.constabel.net/eplists/eplist.cgi

If you like git, see there:

Overview:

http://eplists.constabel.net/git/gitweb.cgi?p=eplists.git;a=tree

Download:

cg-clone http://eplists.constabel.net/git/eplists.git


7. COPYRIGHT and LICENSE

Copyright (c) 2007 Mike Constabel

http://www.constabel.net/vdr/

This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.


svdrpsend-ng.pl - Man page

  • NAME
  • SYNOPSIS
  • Examples for vdr:
  • COPYRIGHT and LICENSE

NAME

svdrpsend-ng.pl - This script is compatible with the original one delivered with vdr.


SYNOPSIS

 svdrpsend-ng.pl [options] command
 Help options:
   --help | -h | -?             brief help message
   --man                        full documentation
 Options:
         -d hostname          destination hostname (default: localhost)
         -p port              SVDRP port number (default: 2001)
         -o filename or dir   write output to file or dir, useful with -c
                            
         -i filename          read data from file (e.g. for PUT/CHECK an eplist or PUTE)
         -c                   clean, only print data, no codes
         -L                   dereference links
         -V                   print version
 Special options for eplist server:
         -u username          username to authorize for writing at eplist server
         -s password          password to authorize for writing at eplist server
         * You need an account at http://eplists.constabel.net/eplists/eplist.cgi *
         -e charset           data encoding, use utf8 or latin1

Examples for vdr:

  svdrpsend-ng.pl -d video -p 2001 -c -o ZDF.epg LSTE 2
  
    Writes the EPG of channel 2 into file ZDF.epg without the svdrp codes.
  svdrpsend-ng.pl -d video -p 2001 -i ZDF.epg PUTE
    Send vdr the data back.
 Examples for eplists:
  svdrpsend-ng.pl -d eplists.constabel.net -p 2006 LHELP
    Print long help.
  svdrpsend-ng.pl -d eplists.constabel.net -p 2006 -u demo -s 1234 [options] command
  
    Authorize first, then send the command
  svdrpsend-ng.pl -d eplists.constabel.net -p 2006 GET Monc
    Get the episodes from Monk and print them on screen.
  svdrpsend-ng.pl -d eplists.constabel.net -p 2006 -c -o MonkTest.txt GET Monc
    Get the episodes from Monk and write them without svdrp codes to file MonkTest.txt.
  svdrpsend-ng.pl -d eplists.constabel.net -p 2006 -c -o /tmp/ GET Monc
   Get the episodes from Monk and write them without svdrp codes to file /tmp/Monk.episodes
  svdrpsend-ng.pl -d eplists.constabel.net -p 2006 -c -o /tmp/ GET all
   Get all lists and write them in files under /tmp/

COPYRIGHT and LICENSE

Copyright (c) 2007 Mike Constabel

http://www.constabel.net/vdr/

This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.