Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Subject:
Message icon:

Attach:
(Clear Attachment)
(more attachments)
Allowed file types: gif, jpg, png, txt, tpl, lng, ini, pvd, psf, ini, cfg, csv, zip, xml, pas, 7z
Restrictions: 4 per post, maximum total size 1024KB, maximum individual size 1024KB
Note that any files attached will not be displayed until approved by a moderator.
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the best video database software?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: raldo
« on: September 17, 2009, 07:20:04 am »

MOVIES."defposter" = IMAGES."imgid"
Thanks, Nostra, It's now on my list of todos in PvdImport...
Posted by: nostra
« on: September 17, 2009, 02:58:50 am »

Quote
I assume raldo will be able to figure out how to combine this statement with the first one—so if there is no default poster, a random one will be retrieved.

Should be easy...
Posted by: rick.ca
« on: September 17, 2009, 02:43:58 am »

Thanks!

Quote
This code will return nothing if no poster is set as default

I assume raldo will be able to figure out how to combine this statement with the first one—so if there is no default poster, a random one will be retrieved.
Posted by: nostra
« on: September 17, 2009, 02:13:03 am »

Quote
In other words, even though the poster selected for display can't be identified, can it be done in such a way that "poster #1" is the one retrieved?

There is no way to be sure which post you get (currently). ;)

Quote
If it's possible to do this via SQL, then that would definitely be the best solution since that is the only way PvdImport currenly communicates with PVD.

Is there some kind of record in the database, perhaps, that keep track of "selected  images"? In my DB, I've only got one image per movie, so this hasn't been an issue for me...

Select one (random) poster as BLOB (you will get actual bytes of the post in "imgdata" field) (this poster is shown for a movie if you have not manually defined default poster):
Code: [Select]
SELECT FIRST 1 * FROM IMAGES WHERE ("imgtype" = 0) AND ("mid" = %d)
Select all posters as BLOB (you will get actual bytes of the post in "imgdata" field):
Code: [Select]
SELECT * FROM IMAGES WHERE ("imgtype" = 0) AND ("mid" = %d)
Select poster set as default as BLOB (you will get actual bytes of the post in "imgdata" field):
Code: [Select]
SELECT * FROM IMAGES
INNER JOIN MOVIES ON (MOVIES."mid" = IMAGES."mid" AND MOVIES."defposter" = IMAGES."imgid")
WHERE IMAGES."mid" = %d

Note: This code will return nothing if no poster is set as default
Posted by: raldo
« on: September 16, 2009, 01:06:17 pm »

the only way PvdImport currenly communicates with PVD.

Let me clarify something here: PvdImport only uses the Pvd database to retrieve information. This also true for cover art retrieval.

This means that there is an SQL statement in PvdImport which the user cannot see. It basically retrieves the first image blob from the DB and saves it where the user has indicated in the PvdImport configuration.

I basically need some way of determining the index into the image table to where the desired image is stored. Does this info exist somewhere?
Posted by: raldo
« on: September 16, 2009, 08:44:20 am »

Do you need a solution using SQL (there is one) or export plugin (no way to retrieve a particular poster, but image types are distinguished)?

If it's possible to do this via SQL, then that would definitely be the best solution since that is the only way PvdImport currenly communicates with PVD.

Is there some kind of record in the database, perhaps, that keep track of "selected  images"? In my DB, I've only got one image per movie, so this hasn't been an issue for me...
Posted by: rick.ca
« on: September 15, 2009, 11:16:48 pm »

Export plugin, I guess. The plugin maps SQL statements to MC fields, but it has a separate option for importing "cover art" to a designated folder or "beside" the media file. I'll have to let raldo explain further, it that's necessary.

This doesn't seem likely, but... Assuming the best he can do is restrict image type to posters, is there a way to relate the poster retrieved to the poster numbers that appear in the PVD interface? In other words, even though the poster selected for display can't be identified, can it be done in such a way that "poster #1" is the one retrieved?
Posted by: nostra
« on: September 15, 2009, 10:46:57 pm »

Do you need a solution using SQL (there is one) or export plugin (no way to retrieve a particular poster, but image types are distinguished)?
Posted by: rick.ca
« on: September 15, 2009, 09:57:13 pm »

Nostra, I don't expect you to know how raldo has coded his plugin (I certainly don't!), but I would like to ask on his behalf...

What is the method for addressing/selecting one particular image associated with a movie? In particular, is there a way of selecting the poster that has been selected ("paper clipped") for display when there are multiple posters? MC can handle only one "cover art" item, and this is the obvious one to import.

From my testing of the plugin, I can only guess the issue of multiple posters has not been addressed. Where there are multiple images, it might select anything—usually a poster, but sometimes a screenshot or cover. I don't see any pattern to this, so maybe it's getting image with the highest or lowest index number. The only way I've found to change the image it's getting, is to delete the image, run it again, and hope it gets a poster. If I re-add the "offending" screenshot or cover again, it may be selected again, or it may not.

Looking at the database tables, I see there's a field for the image type. So I guess the obvious solution is to restrict the selection to posters. It would be desirable, however, if the specific poster selected for display in PVD could be selected. I couldn't determine how this is recorded in the database.