# Details for first Jellyfin server (source server) JF_SRC_URL = '' JF_SRC_API_KEY = '' JF_SRC_ADMIN_USERNAME = '' JF_SRC_ADMIN_PASSWORD = '' # Details for second Jellyfin server (destination server) JF_DEST_URL = '' JF_DEST_API_KEY = '' JF_DEST_ADMIN_USERNAME = '' JF_DEST_ADMIN_PASSWORD = '' jellyfin_src = jf.Jellyfin(url=JF_SRC_URL, api_key=JF_SRC_API_KEY, username=JF_SRC_ADMIN_USERNAME, password=JF_SRC_ADMIN_PASSWORD, default_policy=settings.JELLYFIN_USER_POLICY) jellyfin_dest = jf.Jellyfin(url=JF_DEST_URL, api_key=JF_DEST_API_KEY, username=JF_DEST_ADMIN_USERNAME, password=JF_DEST_ADMIN_PASSWORD, default_policy=settings.JELLYFIN_USER_POLICY) user_list = {} def password(length): return ''.join( random.choice(string.ascii_letters + string.digits)
""" import helpers.jellyfin as jf import helpers.plex as px import creds as settings from progress.bar import Bar import sys import signal import time plex = px.Plex(url=settings.PLEX_URL, token=settings.PLEX_TOKEN, server_name=settings.PLEX_SERVER_NAME) jellyfin = jf.Jellyfin(url=settings.JELLYFIN_URL, api_key=settings.JELLYFIN_API_KEY, username=settings.JELLYFIN_ADMIN_USERNAME, password=settings.JELLYFIN_ADMIN_PASSWORD, default_policy=settings.JELLYFIN_USER_POLICY) def signal_handler(signum, frame): print('Canceling...') exit() if __name__ == '__main__': signal.signal(signal.SIGINT, signal_handler) print("Beginning playlist migration...") for plex_playlist in plex.get_playlists(): # print(playlist.title) jellyfin_playlist = jellyfin.makePlaylist(name=plex_playlist.title)