PhotoItem problem

plugin-dev

#1

Hi,



Got some photos I want to add in the current plugin I'm working on and I'm hitting a snag. I'm sure it's simple but I'm stumped.



I extract the title, image url and a thumb url then add PhotoItems to a directory with

dir = MediaContainer(viewGroup='Photos', title2=sender.itemTitle)

... extract values in loop:

dir.Append(PhotoItem(photoUrl, title=title, Summary=None, thumb=thumb))



and I have Plugin.AddViewGroup("Photos", viewMode="List", mediaType="photos") in Start()



What I get displayed is a list of photos with the correct thumbs and titles. But, when I select an item it either hangs for a while then nothing or I get an error dialog with 'Playlist playback aborted. The original file may have moved, been deleted or is currently unavailable'.



The error dialog suggests the wrong media handler is being triggered but I've no idea why. Oh, and I've checked the photoUrl and it loads fine in a browser.



thanks,

Jonny


#2

Figured it out. Found an example (guardian.co.uk) plugin that deals with multiple media types and after looking at the code there my mistake was obvious.


#3

You're asking and responding to your own questions faster than I can read them :)


#4

Ideal customer eh?



I work at night, so sometimes tired, get frustrated too easily, post question that then looks easy the next morning. Not sure how many times this has happened to me over the years but somehow I never learn the lesson.


[quote name='elan' post='43745' date='Jun 12 2009, 05:47 AM']
You're asking and responding to your own questions faster than I can read them :)

[/quote]