[mangadex] allow 'ratings' to be a (comma-separated) string (#7799)
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user