feat: refactor add_jellyfin_user_to_playlist to use internal method for user assignment
This commit is contained in:
@@ -506,6 +506,10 @@ def remove_jellyfin_user_from_playlist():
|
||||
def add_jellyfin_user_to_playlist():
|
||||
playlist_id = request.args.get('playlist')
|
||||
user_id = request.args.get('user')
|
||||
return add_jellyfin_user_to_playlist_internal(user_id, playlist_id)
|
||||
|
||||
|
||||
def add_jellyfin_user_to_playlist_internal(user_id, playlist_id):
|
||||
# assign this playlist also to the user in the database
|
||||
# get the playlist from the db
|
||||
playlist = Playlist.query.filter_by(jellyfin_id=playlist_id).first()
|
||||
|
||||
Reference in New Issue
Block a user