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

Letterboxd filters additional detail #2255

Merged
merged 4 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# New Features
Added the `character` search option to the `imdb_search` builder

# Defaults
Fixed incorrect content rating mappings in various Default files

# Bug Fixes
Fixed the `cast` search option for the `imdb_search` builder
Fixes #2258 `imdb_list` sort was not being parsed correctly
Fixed incorrect content rating mappings in various Default files
Fixes `letterboxd_list` rating filter to use a 1-10 rating vs 1-100 to reflect how letterboxd ratings work on their website
18 changes: 10 additions & 8 deletions docs/files/builders/letterboxd.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ collections:

You can add different filters directly to this builder.

| Filter Attribute | Description |
|:---------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `limit` | **Description:** Max number of items per returned.<br>**Values:** number greater than `1` |
| `rating`<sup>1</sup> | **Description:** Search for the specified rating range. The rating is the list owner's rating not site wide rating.<br>**Values:** range of int i.e. `80-100` |
| `year`<sup>1</sup> | **Description:** Search for the specified year range.<br>**Values:** range of int i.e. `1990-1999` |
| `note`<sup>1</sup> | **Description:** Search for the specified value in the note. The note is the list owner's note not site wide note.<br>**Values:** Any String |
| Filter Attribute | Description |
|:---------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `limit` | **Description:** Max number of items per returned.<br>**Values:** number greater than `1` |
| `rating`<sup>1</sup> | **Description:** Search for the specified rating range. The rating is the list owner's rating not site wide rating.<br>**Values:** range of int i.e. `8-10` (convert Letterboxd stars to a 10 point scale) |
| `year`<sup>1</sup> | **Description:** Search for the specified year range.<br>**Values:** range of int i.e. `1990-1999` |
| `note`<sup>2</sup> | **Description:** Search for the specified value in the note. The note is the list owner's note not site wide note.<br>**Values:** Any String |

<sup>1</sup> These filters only work if the URL is to the List View of the Letterboxd list. (i.e. it should have `/detail/` in the url)
<sup>1</sup> These filters only work if the URL is to the List View of the Letterboxd list (i.e. it should have `/detail/` in the url) or to an account's Reviews (i.e. it should have `/USERNAME/films/reviews/` in the url)

<sup>2</sup> This filters only work if the URL is to the List View of the Letterboxd list. (i.e. it should have `/detail/` in the url)

```yaml
collections:
Expand All @@ -57,4 +59,4 @@ collections:
year: 1990-1999
collection_order: custom
sync_mode: sync
```
```
2 changes: 1 addition & 1 deletion modules/letterboxd.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def validate_letterboxd_lists(self, err_type, letterboxd_lists, language):
"url": util.parse(err_type, "url", letterboxd_dict, methods=dict_methods, parent="letterboxd_list").strip(),
"limit": util.parse(err_type, "limit", letterboxd_dict, methods=dict_methods, datatype="int", parent="letterboxd_list", default=0) if "limit" in dict_methods else 0,
"note": util.parse(err_type, "note", letterboxd_dict, methods=dict_methods, parent="letterboxd_list") if "note" in dict_methods else None,
"rating": util.parse(err_type, "rating", letterboxd_dict, methods=dict_methods, datatype="int", parent="letterboxd_list", maximum=100, range_split="-") if "rating" in dict_methods else None,
"rating": util.parse(err_type, "rating", letterboxd_dict, methods=dict_methods, datatype="int", parent="letterboxd_list", maximum=10, range_split="-") if "rating" in dict_methods else None,
"year": util.parse(err_type, "year", letterboxd_dict, methods=dict_methods, datatype="int", parent="letterboxd_list", minimum=1000, maximum=3000, range_split="-") if "year" in dict_methods else None
}
if not final["url"].startswith(base_url):
Expand Down
Loading