Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Plex collection sort order #308

Closed
LeendertPlas opened this issue Jun 30, 2021 · 19 comments · Fixed by #362
Closed

Feature Request: Plex collection sort order #308

LeendertPlas opened this issue Jun 30, 2021 · 19 comments · Fixed by #362
Assignees
Labels
enhancement New feature or request priority:high High priority bug or feature status:added-to-develop Feature Request or Bug Fix is in Develop

Comments

@LeendertPlas
Copy link

Now that Plex has added the ability to re-order collections on an individual movie basis, it should be possible to do this for collections created with this program. For example sorting a tautulli most watched collection on duration or the imdb list in the correct order.

@meisnate12
Copy link
Member

im working on getting v1.11.0 out and then after that once its done ill be adding collection sorting to develop for release in v1.12.0

@meisnate12 meisnate12 self-assigned this Jun 30, 2021
@meisnate12 meisnate12 added enhancement New feature or request priority:high High priority bug or feature labels Jun 30, 2021
@Juansit0
Copy link

Juansit0 commented Jul 7, 2021

This is exactly what I was gonna ask. Now I can get rid of python-plexlibrary!!!! Woooooo

@meisnate12 meisnate12 changed the title Plex collection sort order [Feature Request] Feature Request: Plex collection sort order Jul 9, 2021
@Juansit0
Copy link

How this feature coming along? @meisnate12

Not to bug or rush you or anything

meisnate12 added a commit that referenced this issue Jul 29, 2021
@meisnate12
Copy link
Member

i just finished the first attempt lol

you can only use one builder in a collection youre trying to sort and only the folwoing builders can be sorted: tmdb_list, tmdb_popular, tmdb_now_playing, tmdb_top_rated, tmdb_trending_daily, tmdb_trending_weekly, tmdb_discover, tvdb_list, imdb_list, trakt_list, trakt_trending, trakt_popular, trakt_recommended, trakt_watched, trakt_collected, tautulli_popular, tautulli_watched, letterboxd_list, icheckmovies_list, anidb_popular, anilist_top_rated, anilist_popular, anilist_season, anilist_studio, anilist_genre, anilist_tag, mal_all, mal_airing, mal_upcoming, mal_tv, mal_movie, mal_ova, mal_special, mal_popular, mal_favorite, mal_suggested, mal_userlist, mal_season

to turn on custom sorting just add collection_order: custom to your collection

Note this does not work on smart collections

Example:

collections:
  Star Wars:
    imdb_list: https://www.imdb.com/list/ls068055646/
    collection_order: custom
    sync_mode: sync

@meisnate12 meisnate12 added the status:added-to-develop Feature Request or Bug Fix is in Develop label Jul 29, 2021
@Juansit0
Copy link

Works flawlessly wow…. You are the man bro seriously keep up the great work!!!

@JourneyOver
Copy link

JourneyOver commented Jul 30, 2021

Sadly it didn't work fully correct for me.. For example for MCU I am using this list https://trakt.tv/users/donxy/lists/marvel-cinematic-universe and it seems to have missed several movies in my collection making it somewhat wrong on the actual sorting..

this is what shows in the log for my MCU collection:
https://paste.ee/p/c20A7

and this is how it shows in the actual collection on my plex:
07-29-2021_22-08-32

So I'm not sure what exactly went wrong on this..

I noticed that it seems to be missing random things in the sorting that I actually have in the collection.. Like for example:

[2021-07-29 22:00:38,387] [builder.py:1801]           [INFO]     | Moving Avengers: Age of Ultron after Guardians of the Galaxy Vol. 2                                |
[2021-07-29 22:00:38,392] [builder.py:1801]           [INFO]     | Moving Captain America: Civil War after Ant-Man  

you see it says that it's moving Captain America: Civil War after Ant-Man but it doesn't say anything about Ant-Man being moved before that line... As well as various other movies seeming to be missed in the sorting bit as well from the log I posted above, which seems to correlate with how it seems to have sorted things..

@Juansit0
Copy link

Juansit0 commented Jul 30, 2021

Seems like the issue is missing movies that the script isn’t picking up… that didn’t happen with me and the list it gave me for missing movies are really missing but then again I don’t have that MCU list.

I only do major network/subscription services movies, tv and trak trending lists

@Juansit0
Copy link

I’m gonna try that list and see if it works for me… give me a few

@JourneyOver
Copy link

Seems like the issue is missing movies that the script isn’t picking up… that didn’t happen with me and the list it gave me for missing movies are really missing but then again I don’t have that MCU list.

I only do major network/subscription services movies, tv and trak trending lists

Yea it's strange, because it picks up the ones that are missing in the Sorting section in the Adding and Updating details sections just fine, so I'm not really sure why it randomly doesn't pick them up for the Sorting section at all.

@Juansit0
Copy link

Hey it works for me… the sorting is going by however it’s listed on the trakt site I don’t have any missing movies either I dunno

@JourneyOver
Copy link

Hmm that is really really strange.. I tried running it another time and I still get the same result sadly as I did before :/ Guess I will have to wait for @meisnate12 to see if they can come up with some idea on why this is happening.

@meisnate12
Copy link
Member

not everything needs to be moved to order a list for example if i have 2, 1, 3 all i have to do is move 1 to the beginning and now its sorted. so thats why you dont see a line for each movie in the sort lines.

missing movies dont matter because it just follows the order of what you have in your library.

And finally for your actual problem lol. Truth is at this moment idk i have another user ive been working with on discord who like you is having issues actually sorting the lists. Everything in the code looks correct even extra debug statements that i added shows that the right commands are being sent they just dont seem to be working. we thought it might have been his PMS version but we both updated to the newest beta channel version and i was able to get it to work while it just wouldnt for him. dont worry i havent given up and one of the reasons i released it to develop was because i was hoping if another person had the same issue it might lead me to a solution

@JourneyOver
Copy link

JourneyOver commented Jul 30, 2021

And finally for your actual problem lol. Truth is at this moment idk i have another user ive been working with on discord who like you is having issues actually sorting the lists. Everything in the code looks correct even extra debug statements that i added shows that the right commands are being sent they just dont seem to be working. we thought it might have been his PMS version but we both updated to the newest beta channel version and i was able to get it to work while it just wouldnt for him. dont worry i havent given up and one of the reasons i released it to develop was because i was hoping if another person had the same issue it might lead me to a solution

Well I am glad that I'm not the only one at least to be having issues with the custom sort, I can jump in the discord if you want, and see if we can get some more debugging going on if need be to figure out what exactly is causing this issue.

Edit: I've joined the discord

@Juansit0
Copy link

I’m on Version 1.23.5.4862

@JourneyOver
Copy link

JourneyOver commented Jul 30, 2021

On 1.23.6.4881 my self, but I tried on 1.24.5.4862 as well before noticing there was a new public plex release and I updated and the problem was still there, so I don't think it has anything to do with the plex server version.

I even tried deleting the collection completely and having PMM remake it with the custom order, and it still ended up coming out like my picture above.

@Juansit0
Copy link

https://www.imdb.com/list/ls031310794/

Try using this list

@JourneyOver
Copy link

@Juansit0 gives me the same exact issue of it not putting everything in the order of the list, I'm honestly not sure what the issue is, and I'm glad I'm not the only one having this issue going by meisnate12 ..

I just did a test on a different collection entirely as well a few minutes ago for the conjuring universe https://trakt.tv/users/zviznemte/lists/the-conjuring-universe-timeline . and it had the same issue on that collection as well with it not moving things correctly around, so I know it's not just a one collection issue.

@JourneyOver
Copy link

JourneyOver commented Jul 30, 2021

Edit: Issue has been fixed in commit ede0325

@navy2x
Copy link

navy2x commented Aug 3, 2021

Btw this is awesome! I just pulled the :develop docker image with my Unraid setup and it works flawlessly. Thanks meisnate12!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:high High priority bug or feature status:added-to-develop Feature Request or Bug Fix is in Develop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants