Skip to content

Commit

Permalink
Fixes #2258 imdb_list sort was not being parsed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Oct 8, 2024
1 parent 5fb7cf3 commit c477b47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
Added the `character` search option to the `imdb_search` builder

# Bug Fixes
Fixed the `cast` search option for the `imdb_search` builder
Fixed the `cast` search option for the `imdb_search` builder
Fixes #2258 `imdb_list` sort was not being parsed correctly
6 changes: 3 additions & 3 deletions modules/imdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"year": "YEAR",
"release": "RELEASE_DATE",
}
sort_options = [f"{a}.{d}"for a in sort_by_options for d in ["asc", "desc"]]
sort_options = [f"{a}.{d}" for a in sort_by_options for d in ["asc", "desc"]]
list_sort_by_options = {
"custom": "LIST_ORDER",
"popularity": "POPULARITY",
Expand All @@ -96,7 +96,7 @@
"added": "DATE_ADDED",
"release": "RELEASE_DATE",
}
list_sort_options = [f"{a}.{d}"for a in sort_by_options for d in ["asc", "desc"]]
list_sort_options = [f"{a}.{d}" for a in list_sort_by_options for d in ["asc", "desc"]]
title_type_options = {
"movie": "movie", "tv_series": "tvSeries", "short": "short", "tv_episode": "tvEpisode", "tv_mini_series": "tvMiniSeries",
"tv_movie": "tvMovie", "tv_special": "tvSpecial", "tv_short": "tvShort", "video_game": "videoGame", "video": "video",
Expand Down Expand Up @@ -257,7 +257,7 @@ def validate_imdb(self, err_type, method, imdb_dicts):
new_dict["limit"] = 0

if "sort_by" in dict_methods:
new_dict["sort_by"] = util.parse(err_type, dict_methods, imdb_dict, parent=method, default="custom.asc", options=list_sort_options)
new_dict["sort_by"] = util.parse(err_type, "sort_by", imdb_dict, methods=dict_methods, parent=method, default="custom.asc", options=list_sort_options)

valid_lists.append(new_dict)
return valid_lists
Expand Down

0 comments on commit c477b47

Please sign in to comment.