English > Development
Downloading Multiple PEOPLE Images
mgpw4me@yahoo.com:
I must be doing something wrong....I have a gallery of images, so far so good. Processing the images in the gallery works fine, as long as I only select 1 image.
AddSearchResult(name, '# ' + IntToStr(ImageCount, '', PLink, TLink);
correctly displays all the images, but when I select more than 1, title field is used to add new database records ie. Halle Berry #1
with an image for each selection made in the search results.
If I remove the TITLE2 field, the result list isn't displayed, and no updates are made.
What am I missing?
nostra:
You are probably returning the wrong value in ParsePage. You should return prList (= 2) if you have a list of Movies or Persons and prListImage (= 3) if you have a list of images...
mgpw4me@yahoo.com:
Aaaahhhh !!!
Hmmm, obviously, not like this:
(1/18/2010 2:23:20 AM) . ParseGallery: (27) Images found.
(1/18/2010 2:23:20 AM) . ParsePage: RETURN CODE (3)
I'm getting a selection list now (took out the titles...gag), but the scripting engine is only downloading the image selected. In silent mode, it runs through the script and doesn't do any updates. If I add a name to the selection list, the first item will get uploaded, silent mode or not, without any user interaction...in fact no selection list comes. If I make the title unique, I can upload multiple images...but a new person is added for each, with the title for a name.
I suspect what I'm describing is a single setting or procedure that goes with processing the image lists, but that I'm not currently aware of.
Any ideas? I didn't see anything in your scripting tutorial, or any of the other scripts.
-------------------------------------------------------------------------------------
Here's the AddSearchResult statement I'm using:
AddSearchResult('','','', PictureLink, ThumbLink);
-------------------------------------------------------------------------------------
function ParsePage(HTML : WideString; URL : String): Cardinal;
var
RVal : Integer;
begin
if (Pos('/mediaindex',URL) > 0) then begin;
RVal := ParseGallery(HTML, URL)
if (RVal > 0 ) then
Result := prListImage
else
Result := prFinished;
end
else
if (Mode = smGallery) then
Result := prFinished
else begin;
AddSearchResult('',GetFieldValue(pfName),'',PersonUrl,'');
Result := prDownload;
end;
Msg('ParsePage','RETURN CODE (' + IntToStr(Result) + ')', mlInfo );
end;
mgpw4me@yahoo.com:
It appears that prListImage hasn't been implemented for People.
If I go to a poster download, multiple posters come up in the selection dialog, and checkmarks only have 2 modes...aye or nay. In people view there are 3...do nothing, update if no image, overwrite.
My attempts to upload multiple images in a people script stops here until this is fixed. I don't think it's a big issue. For myself, 1 image is enough in most cases and I can get along via the user mode interface for the others.
nostra:
People scripts and movie scripts are not meant to get multiple images, only the poster type is meant to.
You can still add multiple images in movie/person scripts using
--- Code: ---AddImageURL(ImageType : Integer; url : String)
--- End code ---
but you will not get a selection dialog in this case.
Navigation
[0] Message Index
[#] Next page
Go to full version