TheTVDB.com content plug-in

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

WhACKO
Junior Member
Junior Member
Posts: 67
Joined: 2009-04-07, 11:17 UTC

Post by *WhACKO »

j wrote: A spontaneous (and very easy to implement) idea would be to count the numbers of "" in the pattern and cut the filename up to the Nth "" from the back:
So: [face=courier](.*)\\s(\d*)e(\d*)[/face] would match [face=courier]Name\sXeX*avi[/face]

this should be sufficient, but I can't get it to work, I 'm new with regex, could you break it down, what it searches for?

2_regexp=^(.*?)\\s(\d*)e(\d*)
2_title=$1
2_season=$2
2_episode=$3




Or did you mean it still isn't implemented? :roll:

Anyway, I spent the last hour trying to figure why it won't work, what you have is a great idea ++support for it :)
Last edited by WhACKO on 2009-05-30, 19:57 UTC, edited 1 time in total.
j
Member
Member
Posts: 124
Joined: 2009-04-13, 19:49 UTC

Post by *j »

Your expression should work with version 0.4 I just uploaded. As mentioned this feature did not exist yet.

I implemented my proposed solution, so the path depth is implicitly defined by the number of slashes in the expression.

Just to make it clear, version 0.4 should support it now, version 0.3 did not:
http://helicoid.de/tc/wdx_thetvdb_0.4.zip
WhACKO
Junior Member
Junior Member
Posts: 67
Joined: 2009-04-07, 11:17 UTC

Post by *WhACKO »

Cool! works like a charm!

how do you 'refresh' shows which have already been scanned? (I mean I clicked the dialog box)
j
Member
Member
Posts: 124
Joined: 2009-04-13, 19:49 UTC

Post by *j »

For now there is no way to manually refresh the list of shows. You can delete the [face=courier]thetvdb.sqlite[/face] file in the same folder as your [face=courier]wincmd.ini[/face] but this will also erase all the associations to the filenames. Or use the personal edition of SQLite Expert and manually modify the database.

Currently the following logic is applied:
If the requested episode is missing in the database, the list of shows is reloaded from the servers and a time stamp is saved. After that, five minutes have to pass before the list can be reloaded if the episode is still missing. This way missing episodes should not penetrate the servers that much and also speed up local operations.
(In fact you could create a file [face=courier]Show - S99E99.avi[/face] to force an update every five minutes but I would not recommend it for the sake of TheTVDB.com servers...).
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2j

How did you implement INI handling part?

I've been trying to diagnose why your plugin does not work properly with my Comparer application and it looks like INI file is not read at all!

I am sending to your plugin something like "D:\aaaa\compartest\plugins\thetvdb.ini" using ContentSetDefaultParams (through wdx_proxy.dll) and it gives the feeling that this file is used (it creates thetvdb.ini file with two default sets of parameters after first run) but any new rules are skipped. The only way to have it working correctly with my application is to use movies names which match your rules.

I've tried to put thetvdb.ini in plugins and Comparer.exe directories without success. I have also assumed that you might use hard-coded names so I did the same for contplug.ini and it does not work. Any ideas?
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
j
Member
Member
Posts: 124
Joined: 2009-04-13, 19:49 UTC

Post by *j »

fenix_productions wrote:How did you implement INI handling part?
Actually there is nothing special about it. Maybe it is because the settings are only read once when [face=courier]ContentSetDefaultParams[/face] is called that you are facing a problem? I already thought about reading the settings inside [face=courier]ContentGetValue(W)[/face] so it's easier to add settings at runtime... maybe I'll change it to this behavior later.

The [face=courier]DefaultIniName[/face] is used as INI file and settings are read with [face=courier]GetPrivateProfileStringA[/face] and written with [face=courier]WritePrivateProfileStringA[/face].

Please be sure that the rules defined are correct, as there is no error message at the moment when an faulty rule is in the list and it will stop reading at that point. Probably a simple message box when a parser error occurs would be useful.
j
Member
Member
Posts: 124
Joined: 2009-04-13, 19:49 UTC

Post by *j »

An other possible reason for your problem could be, that there are server problems with TheTVDB.com at the moment as it seems. :(
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2j
I am sure rules are correct because they worked with Total Commander but not in Comparer. The only difference is that TC sends different INI name (TC path + contplug.ini) than Comparer (plugin location + plugin name + ini). That is all. Strange thing is that I've tried to follow the same naming rules as TC - without success.

BTW Error messages might be too annoying in the case of many files. It would be better to add simple log file which would be switched on with IsDebug parameter (0 by default).
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
j
Member
Member
Posts: 124
Joined: 2009-04-13, 19:49 UTC

Post by *j »

fenix_productions wrote:Strange thing is that I've tried to follow the same naming rules as TC - without success.
The servers are still broken. This causes the lookup of shows to fail (to get the proper id). Hopefully this will be fixed soon. Maybe (hopefully) your problems will be solved "magically" then :-).

fenix_productions wrote:BTW Error messages might be too annoying in the case of many files. It would be better to add simple log file which would be switched on with IsDebug parameter (0 by default).
Sounds like a good plan.
j
Member
Member
Posts: 124
Joined: 2009-04-13, 19:49 UTC

Post by *j »

The servers seem to be fixed now. I also made a new release with logging support. Setting [face=courier]debug=4[/face] will make the plug-in much more verbose.

Hopefully your original problems are solved now with the fixed servers - otherwise the log might help.
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2j
Works perfect now:
http://fenixproductions.dcmembers.com/tmp/comparertv.png

I've changed nothing so it could really be servers problem.

Thank you very much.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

2fenix_productions
How did you get it to look like that?
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Boofo

1. get Comparer (lite version) from: http://fenixproductions.dcmembers.com/

2. go to: Options -> Plugins (WDX)

3. add proper plugin and specify extensions for it.

4. in plugins directory create thetvdb.ini file with:

Code: Select all

[thetvdb]
1_regexp=^(.*?)\s*-?\s*[Ss](\d\d?)[Ee](\d\d?)
1_title=$1
1_season=$2
1_episode=$3
2_regexp=^(.*?)\s*-?\s*(\d\d?)x(\d\d?)
2_title=$1
2_season=$2
2_episode=$3
3_regexp=Bleach.*_(\d*)
3_title=Bleach
3_absolute=$1
4_regexp=(.*?)_(\d*)
4_title=$1
4_episode=$2
5. now it should work correctly :)
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
Boofo
Power Member
Power Member
Posts: 1431
Joined: 2003-02-11, 00:29 UTC
Location: Des Moines, IA (USA)
Contact:

Post by *Boofo »

You amaze me, sir. I have been using your plugins for a while now and they always seem to be exactly what I am looking for. Thank you for this and all the other plugins you have written. And for the ones you have yet to write. ;)

Believe it or not, I have never seen Bleach. Looks like I will have check it out to now. ;)
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden

How do I un-overwrite all my data?

User of Total Commander
#60471 Single user license
WhACKO
Junior Member
Junior Member
Posts: 67
Joined: 2009-04-07, 11:17 UTC

Post by *WhACKO »

got everything working, great work!!

Does this plugin list through thetvdb.com specials section?
Can it compare listings according the avi filename?
Post Reply