-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add playlist to multiple users #14
Comments
It's possible to copy playlist(s) created from main user to other users. But there are a few problems with it.
Maybe there is a workaround to these but I haven't looked much into it. You may ask why not just run another docker container with the user's credentials. I don't think this is not possible because the users will not have a plex token. I will leave this issue open. |
Thanks for the fast reply. Hm copy could be an option if I run it only once. However, I agree it is not suited for regular synchs. I also tried to run the same script with a different plex token, and it indeed fails to work (as you said as well). Thank you for your reply and effort! |
I see two ways to enable multiple user support without sharing from one user, which appears to me as a 'hack'.
|
No offense but did you read completely said above?
Users WILL NOT have a plex token (only admin gets token) so cannot login to api which is needed to run api. |
None taken, this is clearly my fault. So only the first solution (in the two points I cited above) seems viable, right? Do you think an OAuth mechanism would work? |
You first point will also need some sort of plex authentication and token key from the user, users wont have token so not sure how this different from your other point. If you have a POC of this working, I am happy to implement it. |
@rnagabhyrava thanks for making this it's super useful! I just wanted to add my own 2 cents to this. I've been able to create 2 containers for this (one for me and one for my partner) which synchronises our playlists against our Deezer and Plex account individually. I found out after quite a bit of research that home users also have plex tokens, you just have to dig around to find them. You have to log in as the managed user, open up the bottom console and go to the network tab and play songs etc and you find it here https://i.imgur.com/ainu7v1.png The only issue is they don't get a poster assigned to the playlist - but I think that's a plex bug as managed users can't upload posters for some reason (unauthorized error 401). This is a bug report on plex so I think they'll fix it eventually. Hope that's helpful to someone looking to do the same. |
@rocstack Thanks for digging into it. The reason for posters not showing up is very well do to access issue. I believe users will not have write access to the server. I may be wrong tho.... Anyways, thanks for the comment. I'll update the readme. |
No worries. I found out that if you get the managed users playlist ID you can upload it using the admin users token via the API. That way you get around the access issue. So just make a POST request to this with the playlist ID and whatever image you want as a param: Not sure if that could be automated as part of this project - doing it manually is a bit tedious. Otherwise I'll create a script and share it. |
I never looked into this. Looks easy enough to upload the posters but I
have to edit some components of the code to handle multiple users. I'll try
to get this done in a week or two.
…On Thu, Oct 20, 2022, 14:19 Brad ***@***.***> wrote:
No worries. I found out that if you get the managed users playlist ID you
can upload it using the admin users token via the API. That way you get
around the access issue.
So just make a POST request to this with the playlist ID and whatever
image you want as a param:
http://192.168.0.21:32400/library/metadata/<playlistId>/posters?url=
https://someimage.jpg&X-Plex-Token=XXXXXX
Not sure if that could be automated as part of this project - doing it
manually is a bit tedious. Otherwise I'll create a script and share it.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIJEHWS3VBHOEKKWRGA4MYDWEGLMVANCNFSM5QTVUY3A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@rnagabhyrava thanks :) |
Has this been implemented into this project. I'm quite interested in having multiple users having Spotify playlists syncs. Seems easy enough after reading above to create another instance for each user and sync through finding their API. But unsure on the access poster thing. You mention it's a manual process, was there any development on automating this into the code? |
Not sure if the repository's owner has done anything but I managed to automate all of the above. I would create a PR but the implementation is ugly (I'm not a python dev) and wouldn't want to scramble the existing codebase. So I just created a private fork and use it locally. Happy to make that public? |
If you don't mind. I'm assuming it is as simple as taking and replacing this repository with yours? Since it's a copy of the original but changed? Do you have any documentation on additional things that are added, or is it pretty much the same with extra fields? How would I go about adding extra users on yours? |
Pretty much. I'd have build a new docker image for it to share. It would just need one additional field for all the plex users. It's just one container/instance which builds the playlists and copies them to all the users. I'll have a look this weekend. |
No worries, really appreciate your effort on this! But to clarify would it be user1spotify -> user1plex, user2spotify -> user2plex (since its using individual apis for each plex user, should I still assume your going that route?) or more of a case of user1spotify -> all plex users that you have listed in the field? |
It's just one Spotify account for api access. You define all the playlist IDs in the config and it pulls them from Spotify and copies them to the Plex accounts. You can also pull from playlist groups Spotify define like featured, top, indie, hip-hop etc.. Makes it a bit more dynamic. Might not be exactly what you're looking for but it works well for the accounts on my server. |
Yea, that sounds alright for what I'm doing. Could do it that way too, didn't think of that, instead of having each Spotify accounts with their playlists, just have one and pull the playlist IDs. That makes sense! Let me know when you finish up with it, so I can try out, thanks! |
How did you go making it? |
Everything's working just not in a docker container. Nearly there.. |
Any new updates on the docker container creation? Just thought I would check in? |
Yeah give it a try if you like. Let me know if you run into any issues. |
Do you mind opening the issues tab on your project? Running into a few problems not sure if its the way I have it configured or not |
Opened |
First of all, thanks for the amazing script. It works very well.
I have a question/ feature request. Instead of adding the playlist 'only' for one user, I would like to add it to the main user + one additional user in plex. The reason: the audio app (Plexamp) doesn't show shared playlists, but only playlists created by the user.
Would it be possible to add this feature (or you could also give me a hint here and I could try myself). Thanks in advance.
The text was updated successfully, but these errors were encountered: