Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Einar

Pages: [1]

On the basis of the script that imports movie information from a text file I wrote a little script to automatically import posters from movie folders, but with the following restrictions. The poster file has to be within the same folder as the movie and the filename needs to be the same as the movie filename.

So here it is (see attachment), just for the case that it might be helpful to anyone.


[attachment deleted by admin]

Hello everyone,

I'm new to the forum and first I'd like to say that I really like PVD. I Tried some other applications, just recently found PVD and finally decided that it fits best, not least because of the possibility to adapt it with scripts, plugins and templates. 

Right now I'm trying to develop a plugin on the basis of the "C++ Plugin Skeleton" (,1211.0.html) and got some problems while working with it. Mainly there are some basic questions I can't find an answer to. Actually I tried to develop the desired functionality as a script, but as it seems that the script engine does not support the necessary functions and datatypes, that isn't possible.

What i'm trying to do is, automatically getting an image, that is in the same folder as the movie-file, and assign it as a movie poster. I managed to do this with a script for the case that the image has the same filename as the movie-file. However, I like to get this working for arbitrary filenames. So obviously I tried "FindNext" and failed because the script engine does not know the function and the datatypes needed for it. 

Thus, I read the topic about programming own plugins (,764.0.html), and tried different things with the C++ skeleton, but nothing works so far. So I hope someone here could enlighten me regarding some basic questions:

1. How can I get the Path of the current movie file (e.g. while scanning for movie files to include the movies in the db)? In the script it's "GetFieldValue(31)", but is there a way I can access the path within the C++ skeleton?

2. When I set the plugin type to PLUGIN_WEBPICIMPORT, which function is executed by starting the plugin? I thought that "BeginWork" and "GetURL" might be executed automatically when the plugin is used in PVD, but that does not seem to be the case with the C++ skeleton. I tried to write files with debug messages in order to find out which functions are executed, but apart from GetType, GetName and so on, nothing was executed. So what has to be done to get, for example, the "GetURL" function rolling when the plugin is started? Are there any preconditions apart from the function being implemented in some way? The signature is:
PVDIMPORTPLUGIN_API int __stdcall GetURL(const bool isEpisode, const PCHAR CurrentURL, PCHAR NewURL);

3. Let's assume 1. is answered and an image is found. How can the image be assigned to the current movie (as a poster)? Is there a function or a datastructure which has to be used so that PVD gets the path from the plugin and completes the assignment?

4. How, in general, can movie-field-values be accessed or changed respectively, within the C++ framework?

That's enough for now, I guess. Hope somebody can help with this.

Best regards,

Pages: [1]