[mangadex] allow 'ratings' to be a (comma-separated) string (#7799)

This commit is contained in:
Mike Fährmann
2025-07-10 16:46:18 +02:00
parent 25c63deebf
commit a619638178
2 changed files with 8 additions and 1 deletions

View File

@@ -3490,9 +3490,14 @@ Description
extractor.mangadex.ratings
--------------------------
Type
``list`` of ``strings``
* ``string``
* ``list`` of ``strings``
Default
``["safe", "suggestive", "erotica", "pornographic"]``
Example
* ``"safe"``
* ``"erotica,suggestive"``
* ``["erotica", "suggestive"]``
Description
List of acceptable content ratings for returned chapters.

View File

@@ -384,6 +384,8 @@ class MangadexAPI():
ratings = config("ratings")
if ratings is None:
ratings = ("safe", "suggestive", "erotica", "pornographic")
elif isinstance(ratings, str):
ratings = ratings.split(",")
params["contentRating[]"] = ratings
params["offset"] = 0