Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10.9.0+ breaks functionality #23

Closed
slimshizn opened this issue May 15, 2024 · 9 comments
Closed

10.9.0+ breaks functionality #23

slimshizn opened this issue May 15, 2024 · 9 comments

Comments

@slimshizn
Copy link

slimshizn commented May 15, 2024

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
@slimshizn slimshizn changed the title 10.9.0 + breaks functionality . May 15, 2024
@slimshizn slimshizn changed the title . 10.9.0+ breaks functionality May 15, 2024
@slimshizn slimshizn reopened this May 15, 2024
@BoHoliday
Copy link

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

@mzrimsek
Copy link
Contributor

mzrimsek commented Jun 5, 2024

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
Copy link
Owner

ghomasHudson commented Jun 5, 2024

@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
Copy link
Contributor

mzrimsek commented Jun 5, 2024

@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
Copy link
Owner

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
Copy link

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
Copy link
Owner

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
Copy link
Contributor

mzrimsek commented Jun 7, 2024

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants