TheTVDB.com content plug-in for Total Commander - Version 0.7
Description
This plug-in fetches information about TV shows from TheTVDB.com, an open online TV database.
The name of the TV show, as well as the season and episode is purely determined by the (input) filename.
When the name is not unique a dialog will be shown to ask for the correct show. Pressing "Cancel" will ignore the pattern for 5 minutes.
To speed up operations (and go easy on the servers), all retrieved data is stored in a SQLite 3 database, which is placed in the same folder as the [face=courier]wincmd.ini[/face] named [face=courier]thetvdb.sqlite[/face].
If anything goes wrong you can just delete the database file or use tools like SQLite Expert to manually modify the database directly.
The location of the database file will probably also be configurable in future versions, if there is any demand for it.
It is possible to change the language for querying TheTVDB.com by modifying [face=courier]contentplug.ini[/face] and adding:
Code: Select all
[thetvdb]
language=XX
Currently valid language codes:
all - All langauges
da - Dansk
fi - Suomeksi
nl - Nederlands
de - Deutsch
iz - Italiano
es - Español
fr - Français
pl - Polski
hu - Magyar
el - Ελληνικά
tr - Türkçe
ru - русский язык
he - עברית
ja - 日本語
pt - Português
zh - 中文
cs - čeština
sl - Slovenski
hr - Hrvatski
ko - 한국어
en - English
sv - Svenska
no - Norsk
The default is "en".
Detection patterns
To determine the name of the series as well as the number of the episode and season a regular expression based pattern is used which can be defined in the [face=courier][thetvdb][/face] section of the [face=courier]contetplug.ini[/face] file.
Per default, four entries are generated:
Code: Select all
[thetvdb]
1_regexp=^(.*?)[\s\.]*-?[\s\.]*[Ss](\d\d?)[Ee](\d\d?)
1_title=$1
1_season=$3
2_regexp=^(.*?)[\s\.]*-?[\s\.]*(\d\d?)x(\d\d?)
2_title=$1
2_season=$3
3_regexp=^(.*?)(\d\d\d\d)[^\d](\d\d)[^\d](\d\d)
3_title=$1
3_year=$2
3_month=$3
3_day=$4
4_regexp=^(.*?)(\d\d)[^\d](\d\d)[^\d](\d\d\d\d)
4_title=$1
4_year=$4
4_month=$2
4_day=$3
For every pattern at least the regexp and the title have to be defined. There are four types of different pattern you can define and for every match of
the regular expression a placeholder [face=courier]$x[/face], starting from 1 is defined.
To match an series by its episode and season number, you have to define the episode field and optionally a season field. When no season is defined, season "1" is assumed.
Code: Select all
1_regexp=^(.*?)[\s\.]*-?[\s\.]*[Ss](\d\d?)[Ee](\d\d?)
1_title=$1
1_season=$3
Code: Select all
5_regexp=(.*?)_(\d*)
5_title=$1
5_absolute=$2
Code: Select all
6_regexp=(.*?)\\xx (.*)\.avi
6_title=$1
6_episodeName=$2
Code: Select all
3_regexp=^(.*?)(\d\d\d\d)[^\d](\d\d)[^\d](\d\d)
3_title=$1
3_year=$2
3_month=$3
3_day=$4
Notes
Support for Unicode is available when using Total Commander 7.5 (beta).
Known bugs and limitations
- Due to synchronous http connection, the GUI will be blocked when fetching data from thetvdb.com.
Change log
0.1 (2009-05-28): Initial release.
0.2 (2009-05-30): Added custom pattern support. Thanks to fenix_productions for the idea.
0.3 (2009-05-30): Added support for absolute episode numbers.
0.4 (2009-05-30): Added support to match the folder.
0.5 (2009-05-30): Enable logging by setting debug=N in the ini file where N is 0=ERROR, 1=WARNING, 2=INFO 3=DEBUG and 0 is the default.
0.6 (2009-06-01): Added support to match episode name.
0.7 (2009-06-14): Added support to match airdate. Improved support for multiple languages in queries ([face=courier]language=all[/face]). Note: All assigned lookups will be lost due to database changes.
Screenshot
Image: http://helicoid.de/tc/wdx_thetvdb.png
Download
http://helicoid.de/tc/wdx_thetvdb_0.7.zip (352 KB)
The source code will probably be made available later, if somebody is interested in it.