If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

PhotoItem problem

jwrayjwray Posts: 1,268Members, Plex Pass Plex Pass
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

Comments

  • jwrayjwray Posts: 1,268Members, Plex Pass Plex Pass
    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.
  • elanelan CTO and Co-founder MauiPosts: 9,397Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee
    You're asking and responding to your own questions faster than I can read them :)

    instagram @elan // the wife's photography site.
    the Medium page // the dog's twitter feed.

  • jwrayjwray Posts: 1,268Members, Plex Pass Plex Pass
    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.

    elan wrote on Jun 12 2009, 05:47 AM:
    You're asking and responding to your own questions faster than I can read them :)
Sign In or Register to comment.