lostb1t / replex

Remix your Plex hubs
221 stars 7 forks source link

collections with random sort order #49

Closed jl94x4 closed 3 months ago

jl94x4 commented 1 year ago

Random sort on hero style when more than 1 collections are merged seems to not work, seems to only randomise the first on the row, everything else stays the same for some reason.

jl94x4 commented 1 year ago

Also clicking the collection from home shows an error

image

This doesn't error for any other collections with normal poster layout.

lostb1t commented 1 year ago

Any errors or panics in the log?

lostb1t commented 1 year ago

Random sort on hero style when more than 1 collections are merged seems to not work, seems to only randomise the first on the row, everything else stays the same for some reason.

This works for me. Could you mention on which client you are seeing this issue?

jl94x4 commented 1 year ago

Seeing this on plex web haven't tried any other devices.

lostb1t commented 1 year ago

What are your Replex settings?

jl94x4 commented 1 year ago

docker run --rm -it -p 90:80 -e REPLEX_HOST="http://ip:32400" -e REPLEX_TMDB_API_KEY=key -e REPLEX_DISABLE_USER_STATE=true -e REPLEX_DISABLE_LEAF_COUNT=true -e RUST_LOG=“info,replex=debug -e INCLUDE_WATCHED=0 ghcr.io/sarendsen/replex:latest

jl94x4 commented 1 year ago

Random doesn't seem to be working on any of my collections on the homescreen row

jl94x4 commented 1 year ago

When you click on the collection it shows as random each time, but when refreshing the home screen the rows don't show a different order each time when using Replex however with the native plex app they randomise quite often "live"

jl94x4 commented 1 year ago

image

https://app.plex.tv/desktop/#!/media/48f6e63f630d2c7d444e4182b877de7edeb547df/com.plexapp.plugins.library?key=%2Freplex%2Flibrary%2Fcollections%2F%2Freplex%2Freplex494159%2C494178%2C494179%2C494180%2Fchildren%3FcontentDirectoryID%3D6%26pinnedContentDirectoryID%3D6%252C9%252C10%252C4%252C5%252C3%252C18%252C19&title=Trending%20on%20[Plex](https://app.plex.tv/desktop/#!/media/48f6e63f630d2c7d444e4182b877de7edeb547df/com.plexapp.plugins.library?key=%2Freplex%2Flibrary%2Fcollections%2F%2Freplex%2Freplex494159%2C494178%2C494179%2C494180%2Fchildren%3FcontentDirectoryID%3D6%26pinnedContentDirectoryID%3D6%252C9%252C10%252C4%252C5%252C3%252C18%252C19&title=Trending%20on%20Plexified&source=server%3A%2F%2F48f6e63f630d2c7d444e4182b877de7edeb547df%2Fcom.plexapp.plugins.library&pageType=list&context=home%3Ahub.custom.collection~1)ified&source=server%3A%2F%2F48f6e63f630d2c7d444e4182b877de7edeb547df%2Fcom.plexapp.plugins.library&pageType=list&context=home%3Ahub.custom.collection~1

lostb1t commented 1 year ago

When you click on the collection it shows as random each time, but when refreshing the home screen the rows don't show a different order each time when using Replex however with the native plex app they randomise quite often "live"

This is because of the cache. It will be different order when cache expires. The reason that random "works" on the native app is because the app refreshes itself from a different endpoint at certain intervals (and after closing an roeping the app)

lostb1t commented 1 year ago

I think l add an option to disable caching for rows. So a user can decide for himself

lostb1t commented 1 year ago

k you can now disable rows caching if you want with REPLEX_CACHE_ROWS

lostb1t commented 1 year ago

:tada: This issue has been resolved in version 0.12.10 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

jl94x4 commented 1 year ago

I see this is working on a singular Movies collection I have pinned to the home screen.

It doesn't work when more than 1 library has the same collection name and all pinned to the home screen (merged collection). Is this an impossible thing to get working or a bug?

lostb1t commented 1 year ago

Did you disable caching rows?

jl94x4 commented 1 year ago

docker run --rm -it -p 90:80 -e REPLEX_HOST="http://ip:32400" -e REPLEX_TMDB_API_KEY=<api> -e REPLEX_CACHE_TTL=30 -e REPLEX_CACHE_ROWS=true -e RUST_LOG=“info,replex=debug ghcr.io/sarendsen/replex:latest

I'm using the above cmd

lostb1t commented 1 year ago

Should be REPLEX_CACHE_ROWS=0 (or REPLEX_CACHE_ROWS=false)

jl94x4 commented 1 year ago

I see this is working on a singular Movies collection I have pinned to the home screen.

It doesn't work when more than 1 library has the same collection name and all pinned to the home screen (merged collection). Is this an impossible thing to get working or a bug?

Still having the same issue as above

Even when refreshing the page the collection row doesn't change.

lostb1t commented 1 year ago

Hmm seems still some caching is happening. If you set the ttl to 0 it should work

jl94x4 commented 1 year ago

docker run --rm -it -p 90:80 -e REPLEX_HOST="http://ip:32400" -e REPLEX_TMDB_API_KEY=<api> -e REPLEX_CACHE_TTL=0 -e REPLEX_CACHE_ROWS=0 -e RUST_LOG=“info,replex=debug ghcr.io/sarendsen/replex:latest

Running this now, tried restarting, the mixed/merged collections still don't refresh/randomize.

lostb1t commented 1 year ago

K I'll take another look in the morning. I'm guessing the web app needs hero tweaking aswell

lostb1t commented 1 year ago

So I checked this out. And random rows don't even work for me without replex in the web app. So this is a plex bug not replex. Can you confirm?

jl94x4 commented 1 year ago

Random rows are working without Replex for me.

lostb1t commented 3 months ago

Cache has been removed for rows so this should work correctly