You are here



The MDB postprocessor of WebGrab+Plus, automatically adds MDB (eg IMDb) data to the xmltv file created by the basic WebGrab+Plus EPG frontend grabber.
To activate/de-activate this postprocess, use the <postprocess> setting in WebGrab++.config.xml

This postprocessor performs the following steps:
1. Select 'candidate' shows from the xmltv input file (<selectmovie> and <selectserie> )
2. Match the selected show 'candidates' with shows in the online MDB (<matchmovie> and <matchserie>)
2.1 Primary search in a general search site like BING, ASK, YAHOO or directly in the MDB site if that supports search.
       This results in a number of possible show-id's for the next step:
2.2 Verify the results of the primary search in a MDB site like IMDb
       Each of the show-id's from step 2.1 is examined for a match with the <matchmovie> and <matchserie> setting.
3. Grab the MDB data (see element-names in allocation and presentation)
4. Merge the grabbed MDB data with the epg data from existing xmltv file (allocation and presentation)

The resulting xmltv output file (<filename>) must be different from the input xmltv file . (changing that would disturb the incremental nature of the epg grabbing)

Similar to the function of the siteini's in the epg grabbing all site dependent settings are stored in mdbini files.
The Match and Grab results can be saved in a local MDB data file. This speeds up the process. (<ldbfilename>)

This file (mdb.config.xml), the mdbini files (e.g and the mdbdata file (e.g. mdb.xml) are stored in the MDB postprocess home folder (WebGrab+Plus-homefolder\MDB)




Specifies the mdbini files that will be used for grabbing the mdb info. The value used here must correspond with an mdbini file (without the .ini extension)
If a second site is entered here, it will be used as a 'second chance' if the first doesn't find a match for a certain show.
Optionally you can separately configure the mdbini file for the movies and for the series. This way you can use dedicated mdbini files for both types of shows.

Element values
mdbini mdbini file name without the .ini file extension. (second change, separated with a comma)
movies mdbini file name only used with movies (same principle as with the element value)
series mdbini file name only used with series (same principle as with the element value)



The output xmltv file. This file will contain the original xmltv data merged with the new mdb info.
Because of the incremental nature of the grabbing process this file must be different (name and/or path) from the target file of the grabbing as specified in WebGrab++.Config.xml !! If omitted here or if by mistake the same file is specified , the file path will be changed to the mdb subfolder of the WG++ program home folder. When only a filename is specified, the mdb subfolder in the WG++ program home folder will be used.

Element values
output file path path of the output xmltv file. Can be the full absolute path, or a file name relative to the MDB subdirectory inside the WG++ program home folder



The ldb (local data base) file can be used to save the mdb info locally. This will speed up later grabbings of mdb data. If not specified, no local data file will be used. When only a file name is specified, the mdb subfolder in the WG++ program home folder will be used.

Element value
database file path path of the local database file. Can be the full absolute path, or a file name relative to the MDB subdirectory inside the WG++ program home folder
update Determines how the local MDB database file is updated
update=""  , no update
update="i" , incremental, only the selected shows will be saved in the local MDB data file
update="f" , all shows will be kept and new shows added. This is the preferred update mode.

Over time this MDB data file could grow to an impractical size with update="f". Impractical if the time to match a selected show in this file exceeds the time to do the same online




The MDB postprocessor will select shows from the input xmltv file for which MDB data will be searched

duration minimum duration a show must have to be selected (in minutes)
musthave obligatory input xmltv show elements that will be used to do the mdb lookup. Only shows with all these elements will be used. (separated with a comma)
optional optional input xmltv show elements that will be added to the selection if available (separated with a comma)
minimum minimal number of selected elements (musthave + optional) for an input show to be used to get mdb info
contains optional an extra filtering can be done after the 3 switches (musthave, optional, minimum). The epg data must contain at least the words specified here. This also allows to select single shows! An empty value disables this setting. (separated with a comma)
unselect allows to unselect shows containing the specified word(s) (separated with a comma)

The following element-names can be used:
 title, description, starrating, subtitle, productiondate, category, director, actor, presenter, writer, composer, producer, rating, episode, showicon, subtitles, premiere, previously-shown, aspect, quality.

The most useful once are:

serie: musthave="title,subtitle"   optional="actor, director" minimum="2"
movie: musthave="title" optional="productiodate,actor,director" minimum="2"




Compare the epg of the selected 'candidates' with mdb values found in the mdb site or the local MDB data file. If a correct match is found, the info of the mdb will be merged with the input xmltv info.

mustmatch These elements must match all. (separated with a comma)
optional Other elements that can be used to match. (separated with a comma)
minimum Minimal number of matching elements (mustmatch + optional) before merging mdb info

The same element-names as mentioned in <selectserie> & <selectmovie> can be used here.

Remark: Be aware that <match...> and <select....> are dependent on each other. eg. If you put musthave="subtitle" in matchserie/matchmovie, but you don't have the element in selectserie/selectmovie, then the MDB postprocessor will never find a match.


Disney Channel

Optional, a way to exclude channels that don’t need mdb processing.
Default all channels in the WebGrab++.config.xml will be used to select shows for mdb processing. Adding a channel line here, with the update attribute empty (="") will exclude the channel from mdb processing.
Any other update value, will leave the channel included.
The syntax of the channel element(s) is(are) the same as the channel element in WebGrab++.config and the .channel.xml files in the siteini.pack.

See the WebGrab++.config.xml channel documentation for more info about this line(s)

allocation and presentation

This MDB-postprocessor makes use of the REX-postprocessor to allocate the mdb elements in the xmltv target. Please read the detailed explanation in rex.config.xml for information about the background of the specification syntax.

Here only the summary of it:
1. Syntax
  - the content of the xmltv-target elements can be specified by means of a mixture of text and element-values. (Some xmltv-target elements do not accept the additional text components because of their intended use, like episode-num and icon.)
  - the element-values must be entered by their element-name enclosed by ''
  - multiple value elements (like actor) will be converted to single value elements if the xmltv-target element is a single value element, like <desc>. The individual values will be listed with a (standard WG++ internal element separator) | as separator unless another separator is specified as follows:
'element-name(separator-string)' e.g. 'actor(, )'
  - additional text and element-names can be linked together by enclosing them by {}. This will ensure that, when the element in it is empty, everything between the {} is ignored. E.g. {\nProduced in : ('productiondate')}
  - the text in the xmltv-target elements may contain the following simple formatting :
      - \n or \r to force a newline
      - \t to add a tab
  - existing xmltv-target elements can be erased by specifying the element without a value as in: <writer></writer>
2. The allowed xmltv-target elements (the ones in the target xmltv file specified above) are :
  <title> (= special case : if the first mdb-title, which is the original showtitle, differs from the xmltv title it can be added to xmltv as extra 'original' title.)
  <date> = the xmltv element name containing the productiondate
  <review> (= optional new xmltv element)
  <director> e.g to add /substitute the (additional?) mdb-director
  <actor> e.g to add /substitute the (additional?) mdb-actor  
  <icon>  e.g. <icon>'mdb-showicon'</icon> !! no addtional text allowed!
  <episode-num> e.g. <episode-num>'mdb-episodenum'</episode-num>  !! no additional text allowed!
  - IMPORTANT! : any of the above listed xmltv-target elements that is specified in this allocation specification, replaces the existing xmltv element and its content!  
3. Supported element-names (from the existing xmltv listing, name definitions as in Appendix D of the documentation) :
  - 'title' 'description' 'starrating' 'subtitle' 'productiondate' 'category' 'director' 'actor' 'presenter' 'writer' 'composer' 'producer' 'rating' 'episode' 'showicon'   'subtitles' 'premiere' previously-shown' 'aspect' 'quality'
4. Supported MDB element-names.
  The following MDB element names are recognized by the program. (However, do realize that their values depend on the mdbini used and their existence in the mdb-site)
  - 'mdb-title' :
   If 'mdb-title' is used in the xmltv-target element <title>, it will only be added if different from the existing xmltv title (see 2. above)
   If used in any of the other supported xmltv-target elements, there is no such restriction and it will be listed in any case.
  - 'mdb-starrating' 'mdb-description' 'mdb-plot' 'mdb-commentsummary' 'mdb-review' 'mdb-actor' 'mdb-director' 'mdb-showid' 'mdb-subtitle' 'mdb-episodeid' 'mdb-episodenum' 'mdb-showicon' and 'mdb-productiondate'
5. Attributes  
  - for each of the xmltv-target elements the following attribute can be specified
          (if not specified, the existing one, if present in the xmltv, will be used) :
      - lang   for <title> <sub-title> and <desc>
      - system   for <star-rating> and <episode-num>
          mdb-episodenum takes the system attribute from the mdbini if specified there.
      - type  for <review> , default: type="text"

mdb-starrating correction:

Allows to convert the mdb-starrating into a value that suits a media-center starrating display. E.g. , the majority of the IMDb starrating values are between 4 (bad) and 8 (good) in a scale of 10. In a 5 star display system , like the one in MCE, there is too little difference between these values.  
The previous settings, first subtracts 4 from the grabbed mdb-starrating and multiplies the result by 1.2 with a maximum of 5 . That will convert the values above, in 0 (was 4) and 5 (was 8).
Default values: subtract="0" multiply="1" and max="10"

Example allocation 'title':
<title lang="xx">'mdb-title'</title>

The previous two lines add mdb-title (if different) as an extra <title> element before the existing one

Example allocation 'desc':
{'mdb-title'...}{[plot: 'mdb-plot']\n}'description'{\n[imdb description: 'mdb-description']}

Replaces the existing <desc> by this one, composed as follows:
The value of the first mdb-title, then ... [plot: followed by the value of mdb-plot] then, on a newline the existing description then, on a newline the text [imdb descripti0n: , followed by the value of the mdb-description]

Example allocation 'star-rating':

Replace the existing star-rating element(s) (if any) with the two specified here.  First is the existing followed by the mdb-starrating

{From Site : 'starrating'\t\t}{From IMDb : 'mdb-starrating'}

It is also possible to add the two starrating values into one <star-rating> element

Example allocation 'review':
{IMDb review: 'mdb-review'} 
{IMDb data; ttnr: 'mdb-showid', }{Title: 'mdb-title', }{Starrating: 'mdb-starrating' }{\n --- Description: 'mdb-description' }{\n --- Director: 'mdb-director(, )'}{\n --- Actors: 'mdb-actor(, )'}{\n --- Review: 'mdb-review'}{\n --- Kijkers Commentaar: 'mdb-commentsummary( ... )'}
{Episode data; ttnr: 'mdb-episodeid', }{Episode title: 'mdb-subtitle', }{Episode: 'mdb-episodenum' }{\n Showicon: 'mdb-showicon'}

These create multiple elements, it splits the review data in three <review> elements.

Full example:
<title lang="xx">'mdb-title'</title>
<review type="text">{IMDb review: 'mdb-review'}</review>
<review>{IMDb data; ttnr: 'mdb-showid', }{Title: 'mdb-title', }{Starrating: 'mdb-starrating' }{\n --- Description: 'mdb-description' }{\n --- Director: 'mdb-director(, )'}{\n --- Actors: 'mdb-actor(, )'}{\n --- Review: 'mdb-review'}{\n --- Viewers reactions: 'mdb-commentsummary( ... )'}</review>
<review>{Episode data; ttnr: 'mdb-episodeid', }{Episode title: 'mdb-subtitle', }{Episode: 'mdb-episodenum' }{\n Showicon: 'mdb-showicon'}</review>
<star-rating system="mixed">{From Site : 'starrating'\t\t}{From IMDb : 'mdb-starrating'}</star-rating>


Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: