Desperate for help with photos in a slideshow for a google photos client

Hi all, I’ve almost finished a channel that displays albums and photos from google photos but have hit an issue i just cannot seem to resolve.

The albums are loading without issue and displaying the thumbs, when clicking on an album it displays the thumbs of the photos in the albums but when i click on a photo and the slideshow starts it shows the cropped thumbnail not the actual image itself. I have outputted the urls I get back from the api i am calling and there is a cropped and original which i am passing to the thumb and url parameters.

The slideshow plays…just with the thumb, not the url. This doesnt however seem to be happening in the ios client.

Here is the code I am using to generate the photos in the album view which in-turn launches the slideshow in the web client:


@route(PREFIX + ‘/photos’)
def GetPhotos(id,title):
oc = ObjectContainer(no_cache=True,view_group=“Images”)
oc.title1 = title
photos = gd_client.GetFeed(’/data/feed/api/user/%s/albumid/%s?kind=photo’ % (Prefs[‘email’], id))

for photo in photos.entry:
    url = photo.media.content[0].url
    title = photo.media.title.text.split(".")[0].upper()
    thumb = photo.media.thumbnail[2].url
    oc.add(CreatePhotoObject(url, title, thumb))

return oc

def CreatePhotoObject(url,title,thumb,include_container=False):

photo_obj = PhotoObject(
    key = Callback(CreatePhotoObject,url=url,title=title,thumb=thumb, include_container=True),
    title = title,
    thumb = thumb,
    url=url,
    items = [
        MediaObject(
            parts = [
                PartObject(key=url)
            ]
        )
    ]
)

if include_container:
    return ObjectContainer(objects=[photo_obj])
else:
    return photo_obj

I’ve just got no idea where on earth I am going wrong. Any help would be greatly appreciated.

Thanks in advance.

@yoadster@gmail.com said:

container is imho not necessary. I would use your first loop to build the PhotoObject.

for photo in photos.entry:
    url = photo.media.content[0].url
    title = photo.media.title.text.split(".")[0].upper()
    thumb = photo.media.thumbnail[2].url

	oc.add(PhotoObject(
		key=url,
		rating_key='%s.%s' % (Plugin.Identifier, 'Pic ' + str(image)),	# rating_key = distinct ID
		title=title,
		thumb = url
		))
	image += 1

For thumb I take the url of the picture as parameter.
/R


######Plugins: ARDMediathek2016, Plex-Plugin-KIKA_und_tivi, Plex-Plugin-3Sat_Mediathek, Plex-Plugin-Flickr, Plex-Plugin-TagesschauXL, Plex-Plugin-Phoenix_Mediathek

Hi, thanks for your prompt reply. I shall give that a whirl and get back to you.

THANKS!!! :slight_smile:

@yoadster@gmail.com said:
Hi, thanks for your prompt reply. I shall give that a whirl and get back to you.

THANKS!!! :slight_smile:

perhaps it’s better to see the code in context. Please, take a look on my Plex-Plugin-KIKA_und_tivi, Function Tivi_Bildgalerie (sorry for the german comments).
/R


######Plugins: ARDMediathek2016, Plex-Plugin-KIKA_und_tivi, Plex-Plugin-3Sat_Mediathek, Plex-Plugin-Flickr, Plex-Plugin-TagesschauXL, Plex-Plugin-Phoenix_Mediathek

great help, thanks!

@rols1 said:

@yoadster@gmail.com said:

container is imho not necessary. I would use your first loop to build the PhotoObject.

for photo in photos.entry:
    url = photo.media.content[0].url
    title = photo.media.title.text.split(".")[0].upper()
    thumb = photo.media.thumbnail[2].url

	oc.add(PhotoObject(
		key=url,
		rating_key='%s.%s' % (Plugin.Identifier, 'Pic ' + str(image)),	# rating_key = distinct ID
		title=title,
		thumb = url
		))
	image += 1

For thumb I take the url of the picture as parameter.
/R


######Plugins: ARDMediathek2016, Plex-Plugin-KIKA_und_tivi, Plex-Plugin-3Sat_Mediathek, Plex-Plugin-Flickr, Plex-Plugin-TagesschauXL, Plex-Plugin-Phoenix_Mediathek

actually, this is still now working. After changing the code to match your exactly it still display the image as a trimmed thumbnail rather than the full image. Im starting to think that theres an issue with the web client as it doesnt seem to occur on the other clients.

@yoadster@gmail.com said:

actually, this is still now working. After changing the code to match your exactly it still display the image as a trimmed thumbnail rather than the full image. Im starting to think that theres an issue with the web client as it doesnt seem to occur on the other clients.

Yes, the web client is the problem. Therefore I use an old version (2.7.0), which I must reinstall after every PMS-Upgrade. Primarily I need the functionality for using my flickr-plugin.
The newer PMS-versions and also the extern Webplayer (https://app.plex.tv/web/app) worked as you say (cropped). The newest version 3.9.0 - I tried it few minutes ago - does not start the slideshow - I try to resolve this next days, but I’m not confident that it works without cropping.
/R


######Plugins: ARDMediathek2016, Plex-Plugin-KIKA_und_tivi, Plex-Plugin-3Sat_Mediathek, Plex-Plugin-Flickr, Plex-Plugin-TagesschauXL, Plex-Plugin-Phoenix_Mediathek

@rols1 said:

@yoadster@gmail.com said:

actually, this is still now working. After changing the code to match your exactly it still display the image as a trimmed thumbnail rather than the full image. Im starting to think that theres an issue with the web client as it doesnt seem to occur on the other clients.

Yes, the web client is the problem. Therefore I use an old version (2.7.0), which I must reinstall after every PMS-Upgrade. Primarily I need the functionality for using my flickr-plugin.
The newer PMS-versions and also the extern Webplayer (https://app.plex.tv/web/app) worked as you say (cropped). The newest version 3.9.0 - I tried it few minutes ago - does not start the slideshow - I try to resolve this next days, but I’m not confident that it works without cropping.
/R


######Plugins: ARDMediathek2016, Plex-Plugin-KIKA_und_tivi, Plex-Plugin-3Sat_Mediathek, Plex-Plugin-Flickr, Plex-Plugin-TagesschauXL, Plex-Plugin-Phoenix_Mediathek

If you get it working without cropping I would love to know what i need to do to fix it. Thanks again.

@yoadster@gmail.com said:

If you get it working without cropping I would love to know what i need to do to fix it. Thanks again.

as temporary solution you can use the old Webplayer like me. I stored the bundle for you there:
Edit (updated Link): Cloud

1.
Download and extract it (ca. 10 MByte). Then search the Path of the installed Version, for me:
/usr/lib/plexmediaserver/Resources/Plug-ins-995f1dead/WebClient.bundle
The Versions-Tag of PMS changed with every Update, here 995f1dead (it’s hexcode).

2.
Replace the exisiting directory WebClient.bundle with the downloaded one.
Don’t forget to make a backup from the existing WebClient.bundle.

3.
Restart PMS and test the Webplayer in new Browsertab. Menu Preferences should show the version 2.0.7. (show pic).

This version also allows Direct-Play, the newer version always do transcoding. Unfortunately the compatibility with coming PMS-Versions cannot be foreseen. It works for me since February (https://forums.plex.tv/discussion/260454/no-directplay-with-httplivestreamurl-in-the-latest-web-players)

Edit 28.05.2019:
4.
Add 2 new favourites to your browser:

This allows to change between old and new plugin-functions.
/R

Plugins: ARDMediathek2016, Plex-Plugin-KIKA_und_tivi, Plex-Plugin-3Sat_Mediathek, Plex-Plugin-Flickr, Plex-Plugin-TagesschauXL, Plex-Plugin-Phoenix_Mediathek

That did the track,thanks