ghomasHudson / Jellyfin-Auto-Collections

Automatically make jellyfin collections from IMDB, Letterboxd lists and more.
MIT License
60 stars 9 forks source link

10.9.0+ breaks functionality #23

Closed slimshizn closed 1 month ago

slimshizn commented 1 month ago

Traceback while running letterboxd_list.py. (running prior to update without issue.)

Traceback (most recent call last):
  File "/opt/jellyfin/Jellyfin-Auto-Collections/letterboxd_list.py", line 82, in <module>
    update_letterboxd_list_collections(app_config)
  File "/opt/jellyfin/Jellyfin-Auto-Collections/letterboxd_list.py", line 53, in update_letterboxd_list_collections
    collection_data = get_collection_data_from_letterboxd_list(list_id)
  File "/opt/jellyfin/Jellyfin-Auto-Collections/letterboxd_list.py", line 20, in get_collection_data_from_letterboxd_list
    list_name = html.unescape(res.text.split('<h1 class="title-1 prettify">')[1].split("</h1>")[0]).strip()
IndexError: list index out of range
BoHoliday commented 1 month ago

Any update on this? Functionality is still broken on 10.9+

mzrimsek commented 1 month ago

Just out of curiosity have you tried running stuff through the Docker container? I just ran that against my Jellyfin instance and it worked.

It looks like we haven't gotten a build off for this repo BUT I have the image hosted from my fork that works.

Here is my configuration that just runs the Letterboxd script when it starts and then exits after.

docker-compose.yml

version: "3"

services:
  jellyfin-auto-collections:
    image: ghcr.io/mzrimsek/jellyfin-auto-collections
    container_name: jellyfin-auto-collections
    environment:
      - JELLYFIN_SERVER_URL=${JELLYFIN_SERVER_URL}
      - JELLYFIN_API_KEY=${JELLYFIN_API_KEY}
      - JELLYFIN_USER_ID=${JELLYFIN_USER_ID}
      - JELLYFIN_MOVIES_DIR=${JELLYFIN_MOVIES_DIR}

      - DISABLE_TV_YEAR_CHECK=false

      - SCHEDULING_ENABLED=false
      - SCHEDULING_CRONTAB=-0 6 * * *
      - SCHEDULING_TIMEZONE=America/New_York
      - RUN_SCHEDULED_TASK_IMMEDIATELY=false

      - DO_KERMODE_INTROS=false
      - DO_KERMODE_LIST=false
      - DO_TURNER_CLASSIC_MOVIE_EXTRAS=false
      - DO_TOP_1000_MOVIES_LIST=false
      - DO_IMDB_CHARTS=false
      - DO_IMDB_LISTS=false
      - DO_LETTERBOXD_LISTS=true
    volumes:
      - ${CONFIG_DIR}/jellyfin-auto-collections/config:/app/config
    restart: no

config.yaml

letterboxd_list_ids:
  - "YOUR URL HERE"

Wherever you end up mapping the configuration directory to, drop that config in there with your collection url and update the docker compose with your API stuff.

ghomasHudson commented 1 month ago

@slimshizn That error looks like it's nothing to do with the jellyfin server version - it's an error parsing the letterbox list page - Are you sure your letterbox list ids in config.yaml are correct?

If this doesn't fix things, post your config.yaml here and I'll do some investigation. It seems to work fine for me on 10.9.3.

mzrimsek commented 1 month ago

@slimshizn That error looks like it's nothing to do with the jellyfin server version - it's an error parsing the letterbox list page - Are you sure your letterbox list ids in config.yaml are correct?

If this doesn't fix things, post your config.yaml here and I'll do some investigation. It seems to work fine for me on 10.9.3.

This was my next thought is the config changed a bit with the update and the script is failing to pick it up since it's a yaml file and not an ini now.

ghomasHudson commented 1 month ago

Very True. This repo is just a random collection of scripts I wrote for myself. It's not even properly parsing the html of the list pages.

I'll do a bit of a rewrite tonight.

BoHoliday commented 1 month ago

Thanks for the replies! I use the Trakt version and was going to try to fix it, but I admittedly don't know much about how this works.

ghomasHudson commented 1 month ago

I've done a rewrite of everything which uses a plugin architecture to make things a lot more maintainable - https://github.com/ghomasHudson/Jellyfin-Auto-Collections/tree/rewrite

Just need to add back in all the config option, docker container etc and will push to main.

mzrimsek commented 1 month ago

The github workflow in the repo I added should allow this to build an image automatically once that's all back but you do need to add a secret to the repo that it uses to authenticate with the container registry. Lmk if you want/need any help getting that going once it's all merged and whatnot

ghomasHudson commented 1 month ago

The github workflow in the repo I added should allow this to build an image automatically once that's all back but you do need to add a secret to the repo that it uses to authenticate with the container registry. Lmk if you want/need any help getting that going once it's all merged and whatnot

Think this is working now too. There's been a lot of config changes so might be a pain to transition but the code is a lot more maintainable now. Things like cacheing the jellyfin API calls etc can be done universally.