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
2. Jellyfin doesn't have a
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
It's just a little easier to read and understand when you revisit this later.
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.