ginjaninja 537 Posted May 20, 2020 Share Posted May 20, 2020 I want the image for my playlist to be based on the first four playlist entries I clear the playlist add the first four entries to playlist delete the image and refresh the playlist (so its based on the first four entries) clear the playlist write all the entries to the playlist $ApiURL = $this.api.root + '/emby/Items/' + $this.id + "/Images/Primary" + "?api_key=" + $this.api.apikey Invoke-WebRequest -Uri $ApiUrl -Method Delete $ApiURL = $this.api.root + '/emby/items/' + $this.id + "/Refresh?Recursive=true&ImageRefreshMode=FullRefresh&MetadataRefreshMode=FullRefresh&ReplaceAllImages=true&ReplaceAllMetadata=true" + "&api_key=" + $this.api.apikey Invoke-WebRequest -Uri $ApiUrl -Method Post not very elegant but the whole process works if i put a pause statement after the refresh metadata call and go and have a look before continueing but if i just let it run, the image is made up of the full playlist entries... so perhaps the full refresh doeesnt cause the image to be created until the page is visited. is there a way to force the image creation at a given point in time..a different api call perhaps....or do i just have to have a very long pause to give the server time to create the image.. thanks Link to comment Share on other sites More sharing options...
Luke 37112 Posted May 20, 2020 Share Posted May 20, 2020 It's not currently possible to control this via api. Link to comment Share on other sites More sharing options...
ginjaninja 537 Posted May 20, 2020 Author Share Posted May 20, 2020 It's not currently possible to control this via api. i may have a workaround, by requesting the image after creation it seems to force emby to create the image...with a bit of a script delay to give emby time to adjust. $ApiURL = $this.api.root + '/emby/items/' + $this.id + "/images/Primary?MaxWidth=180" Invoke-WebRequest -Uri $ApiUrl -Method Get 2020-05-20 18:22:55.136 Debug App: ConvertImageToLocal item 321275 - image url: emby://playlistcollage Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now