Kometa-Team / Kometa

Python script to update metadata information for items in plex as well as automatically build collections and playlists. The Wiki Documentation is linked below.
https://kometa.wiki
MIT License
2.44k stars 303 forks source link

Multiple IMDB keywords fails with error #1779

Closed 0x5f3 closed 8 months ago

0x5f3 commented 9 months ago

Version Number

1.19.1-nightly58

What branch are you on?

nightly

Describe the Bug

An imdb_search will fail with an error if you include more than one keyword. Both 'keyword' and 'keyword.any' are covered by this. The search is successful when a single keyword is used.

It doesn't seem to be parsing the comma separated keywords as it does with "type"

[2023-12-20 11:45:34,412] [imdb.py:531]               [INFO]     | Processing IMDb Search:                                                                            |
[2023-12-20 11:45:34,412] [imdb.py:533]               [INFO]     |     limit: 1000                                                                                    |
[2023-12-20 11:45:34,412] [imdb.py:533]               [INFO]     |     keyword: ['alien,alien-invasion']                                                              |
[2023-12-20 11:45:34,412] [imdb.py:533]               [INFO]     |     language: ['en']                                                                               |
[2023-12-20 11:45:34,412] [imdb.py:533]               [INFO]     |     rating.gte: 5.0                                                                                |
[2023-12-20 11:45:34,413] [imdb.py:533]               [INFO]     |     sort_by: rating.desc                                                                           |
[2023-12-20 11:45:34,413] [imdb.py:533]               [INFO]     |     type: ['movie', 'tv_movie']                                                                    |
[2023-12-20 11:45:34,413] [imdb.py:533]               [INFO]     |     votes.gte: 1000       

Relevant Collection/Overlay/Playlist Definition

## 7_subgenre_top_debug.yml

templates:
  sub_genre:
    cache_builders: 6
    collection_mode: hide
    delete_not_scheduled: false
    limit: 200
    sort_title: "+7_<<collection_name>>"
    sync_mode: sync
    visible_home: false
    visible_library: false
    visible_shared: false
    imdb_search:
      genre: <<genre>>
      keyword.any: <<keyword.any>>
      keyword: <<keyword>>
      language: <<language>>
      limit: 1000
      rating.gte: <<rating.gte>>
      sort_by: rating.desc
      type: <<type>>
      votes.gte: <<votes.gte>>
    imdb_list:
      - <<imdb_extra_1>>
      - <<imdb_extra_2>>
      - <<imdb_extra_3>>
      - <<imdb_extra_4>>
      - <<imdb_extra_5>>
    letterboxd_list:
      - https://letterboxd.com/ediblehedgehog/list/<<letterboxd_list>>/by/rating/
      - <<letterboxd_extra_1>>
      - <<letterboxd_extra_2>>
      - <<letterboxd_extra_3>>
      - <<letterboxd_extra_4>>
      - <<letterboxd_extra_5>>
    trakt_list:
      - <<trakt_extra_1>>
      - <<trakt_extra_2>>
      - <<trakt_extra_3>>
      - <<trakt_extra_4>>
      - <<trakt_extra_5>>
    optional:
      - imdb_extra_1
      - imdb_extra_2
      - imdb_extra_3
      - imdb_extra_4
      - imdb_extra_5
      - letterboxd_extra_1
      - letterboxd_extra_2
      - letterboxd_extra_3
      - letterboxd_extra_4
      - letterboxd_extra_5
      - trakt_extra_1
      - trakt_extra_2
      - trakt_extra_3
      - trakt_extra_4
      - trakt_extra_5
      - genre
      - keyword
      - keyword.any

collections:
  "Top Rated in Aliens 1":
    summary: "Top rated movies in Aliens"
    file_poster: config/assets/7_subgenre_top/subgenre_top_aliens.png

    template: {
                    name: sub_genre,
                    keyword: "alien",
                    type: "movie,tv_movie",
                    rating.gte: 5,
                    votes.gte: 1000,
                    language: "en",
                    letterboxd_list: "theme-aliens"
                }

  "Top Rated in Aliens 2":
    summary: "Top rated movies in Aliens"
    file_poster: config/assets/7_subgenre_top/subgenre_top_aliens.png

    template: {
                    name: sub_genre,
                    keyword: "alien,alien-invasion",
                    type: "movie,tv_movie",
                    rating.gte: 5,
                    votes.gte: 1000,
                    language: "en",
                    letterboxd_list: "theme-aliens"
                }

  "Top Rated in Aliens 3":
    summary: "Top rated movies in Aliens"
    file_poster: config/assets/7_subgenre_top/subgenre_top_aliens.png

    template: {
                    name: sub_genre,
                    keyword.any: "alien,alien-invasion",
                    type: "movie,tv_movie",
                    rating.gte: 5,
                    votes.gte: 1000,
                    language: "en",
                    letterboxd_list: "theme-aliens"
                }

Logs

https://gist.github.com/0x5f3/1d54021d944753e8343aca5a6b3f63a2

YozoraXCII commented 8 months ago

I believe this has been resolved?

0x5f3 commented 8 months ago

I believe this has been resolved?

No. Nightly branch still has this issue.

At the moment, a workaround is to use imdb_list with a keyword search url.

YozoraXCII commented 8 months ago

I believe this has been resolved?

No. Nightly branch still has this issue.

At the moment, a workaround is to use imdb_list with a keyword search url.

We will investigate this further, thanks

YozoraXCII commented 8 months ago

Update:

We are working on a fix for this, in the meantime it works if you do a list like this:

collections:                    
  Test:
    imdb_search:
      keyword.any: 
       - wizard
       - witchcraft
      type: movie, tv_movie
      limit: 200
    show_missing: false
0x5f3 commented 8 months ago

Fixed with https://github.com/meisnate12/Plex-Meta-Manager/commit/c8910efc7db0da8d9ab4909614fdcfd9316ab583