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.


Messages - Einar

Pages: [1]
1
Hello.
So there does not seem to be answers, or my questions are just expressed badly.
Thus I'm going to try it with another question:

How can I get a message to be printed into the debug-log? For Scripts there is a function "LogMessage", is there anything equivalent for the C++ Framework?

Is there anything wrong with the following signature for the GetURL method that might prevent execution of the method?
PVDIMPORTPLUGIN_API int __stdcall GetURL(const bool isEpisode, const char* CurrentURL, char* NewURL)

Best regards,
Einar

2
Hi federer.

Could you tell me how? Or perhaps send me your sourcecode as an example?
Do you know how to get the current movie path? I still can't work out how to get the current movie path within the C++ framework...

Thanks.
Einar

3
Hello.

Sorry for the late answer case56, I had too much to do recently. You're welcome to edit the script. It's nice to hear that it is useful.
I looked into the Problem of importing two images and, unfortunately, have to say that I can not find a solution either. After some experimenting it seems that the AddImageURL hasn't any effect at all (?) The image import happens when the return value (Result) of the GetDownloadURL function contains a path to an image file. But it also stops processing after this.
Even with some modification and a second, recursive, call of GetDownloadURL the second image is not added. The second image path could be obtained correctly though. Thus, the first path is returned and the image added, then the second path is returned but the image isn't added. So far I have no idea how to solve this and why the AddImageURL isn't working.

Hopefully someone else can help.

Best regards,
Einar

4
You're welcome.

Thanks for your suggestion. There is no explicit "back cover" field in PVD, but it is possible to add an image of a back cover to the "Front Cover" field. It does not seem to be possible to control the order of the images added to "Front Cover" though.
I will keep it in mind.


5
Hello akispavlopoulos.

According to your request I modified the script (see attachment to this post).
And I did that in a way that for other file names, just the name within the script has to be changed (line 167). The corresponding line in the script is commented. Currently it is 'folder.jpg' so you can use it right away ;)

So this second script is useful for the case that the poster file is within the same folder as the movie and has always one specific name (e.g. 'folder.jpg').

Greetings,
Einar




[attachment deleted by admin]

6
Hello again.

I think  IMGById is a nice utility, but using it for importing images which are situated in the same folder as the movie files, but not necessarily have the same filename or follow an explicit naming scheme is quite a fuss. I see that it is possible, but actually I don't intend to rename the files and doing all that export/import work every time I add some movies to the db. In my humble opinion the effort seems a little disproportionate for such a basic task.
So I'd like to stick with the project of developing a plugin that automatically assigns the poster found next to a movie-file while importing movies. I use the file scanner rather than add something manually and it would be the fastest and easiest way of adding the images for the initial import as well as later additions. That said, I guess i have to wait for master nostra before I can start developing ;) With answers to the questions stated above, the intended plugin shouldn't be too much trouble to write.

By the way, as mentioned before, I wrote a script that automatically adds one poster which is within the same folder as the movie file and has the same filename as the movie file. I posted it, in case someone likes to use it:
http://www.videodb.info/forum_en/index.php/topic,2336.0.html

Greetings,
Einar

7
Hello.

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.

Greetings,
Einar

[attachment deleted by admin]

8
Hello rick.ca.

Thank you for the hint! I will try the utility you mentioned.

Nevertheless, I'm looking forward to answers to the questions, for they would help for further plugin development.

Thanks again!

Einar

9
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" (http://www.videodb.info/forum_en/index.php/topic,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 (http://www.videodb.info/forum_en/index.php/topic,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,
Einar

Pages: [1]
anything