• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Development Feature Requests Create collections within seconds based on lists from mdblist

     
    • 0 Vote(s) - 0 Average

    Create collections within seconds based on lists from mdblist

    python script
    mcarlton00
    Offline

    Kodi Addon Maintainer

    Posts: 145
    Threads: 1
    Joined: 2023 Sep
    Reputation: 9
    Country:United States
    #2
    2023-10-05, 12:56 PM
    > emby_api_url = f"https://YOUR-EMBY-DOMAIN-OR-IPADDRESS/emby/Items?Recursive=true&AnyProviderIdEquals={imdb_ids_str}&api_key={emby_api_key}"

    At a glance, I see two reasons this probably isn't working.

    1. I'm pretty confident that /emby/whatever api endpoints don't work in Jellyfin anymore.  It's just /Items or /Collections now.
    2. Jellyfin doesn't have a AnyProviderEquals URL parameter option.  That's something Emby added after the fork.  So I believe you'd need to query all items and filter them locally, but there may be another way I'm not aware of off the top of my head.

    There's some general code structure cleanup that could happen too, if you're interested.

    * I'm not sure why you're utilizing both curl and requests.  Requests could handle all of it.
    * Manually building URL strings.  A bit cleaner method is to build out your parameters in a dictionary and then urlencode() it into a string.

    Code:
    from urllib.parse import urlencode
    parameters = {
        "Name" = collection_name,
        "Ids" = ','.join(movie_ids),
        "api_key" = emby_api_key
    }
    parameter_string = urlencode(parameters)
    url = f"https://{your_domain_or_ipaddress}/Collections?{parameter_string}"

    It's just a little easier to read and understand when you revisit this later.
    « Next Oldest | Next Newest »

    Users browsing this thread:


    Messages In This Thread
    Create collections within seconds based on lists from mdblist - by soy_titooo - 2023-10-04, 12:09 PM
    RE: Create collections within seconds based on lists from mdblist - by mcarlton00 - 2023-10-05, 12:56 PM
    RE: Create collections within seconds based on lists from mdblist - by soy_titooo - 2023-10-10, 09:11 AM
    RE: Create collections within seconds based on lists from mdblist - by Yankees4life - 2023-10-13, 02:10 AM
    RE: Create collections within seconds based on lists from mdblist - by soy_titooo - 2023-10-13, 11:43 PM
    RE: Create collections within seconds based on lists from mdblist - by soy_titooo - 2023-10-14, 11:00 AM
    RE: Create collections within seconds based on lists from mdblist - by Yankees4life - 2023-10-14, 06:19 PM
    RE: Create collections within seconds based on lists from mdblist - by soy_titooo - 2023-10-15, 07:13 AM
    RE: Create collections within seconds based on lists from mdblist - by Yankees4life - 2023-10-18, 07:33 PM

    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode