diff --git a/mangadex_downloader/cli/__init__.py b/mangadex_downloader/cli/__init__.py index 411569f..4e3ee5b 100644 --- a/mangadex_downloader/cli/__init__.py +++ b/mangadex_downloader/cli/__init__.py @@ -17,6 +17,7 @@ from ..errors import MangaDexException _deprecated_opts = { + "unsafe": "--unsafe or -u option is deprecated and will be removed in v1.4.0" } def _check_deprecations(log, args): diff --git a/mangadex_downloader/iterator.py b/mangadex_downloader/iterator.py index 1110739..ba124be 100644 --- a/mangadex_downloader/iterator.py +++ b/mangadex_downloader/iterator.py @@ -97,12 +97,10 @@ def fill_data(self): content_ratings = [ 'safe', 'suggestive', + 'erotica', + 'pornographic' ] - if self.unsafe: - content_ratings.append('erotica') - content_ratings.append('pornographic') - params = { 'includes[]': includes, 'title': self.title, @@ -172,13 +170,6 @@ def next(self) -> Manga: while True: manga = self.queue.get_nowait() - if not self.unsafe and ( - manga.content_rating == ContentRating.Pornographic or - manga.content_rating == ContentRating.Erotica - ): - # YOU SHALL NOT PASS - continue - if not self._check_status(manga): # Filter is used continue @@ -245,14 +236,6 @@ def next(self) -> Manga: while True: manga = self.queue.get_nowait() - if not self.unsafe and ( - manga.content_rating == ContentRating.Pornographic or - manga.content_rating == ContentRating.Erotica - ): - # No unsafe ? - # No way - continue - return manga def fill_data(self): diff --git a/mangadex_downloader/main.py b/mangadex_downloader/main.py index dce9386..0edf089 100644 --- a/mangadex_downloader/main.py +++ b/mangadex_downloader/main.py @@ -238,12 +238,6 @@ def fetch(url, language=Language.English, use_alt_details=False, unsafe=False): log.info('Fetching manga %s' % manga_id) manga = _fetch_manga(manga_id, lang, use_alt_details=use_alt_details) - if ( - manga.content_rating == ContentRating.Pornographic or - manga.content_rating == ContentRating.Erotica - ) and not unsafe: - raise NotAllowed(f"You are not allowed to see \"{manga.title}\"") - log.info("Found manga \"%s\"" % manga.title) return manga @@ -377,12 +371,6 @@ def download( else: manga = url - if ( - manga.content_rating == ContentRating.Pornographic or - manga.content_rating == ContentRating.Erotica - ) and not unsafe: - raise NotAllowed(f"You are not allowed to see \"{manga.title}\"") - # base path base_path = Path('.') @@ -550,11 +538,6 @@ def download_chapter( # Fetch manga chap, manga = _get_manga_from_chapter(chap_id) - if ( - manga.content_rating == ContentRating.Pornographic or - manga.content_rating == ContentRating.Erotica - ) and not unsafe: - raise NotAllowed(f"You are not allowed to see \"{manga.title}\"") log.info("Found chapter %s from manga \"%s\"" % (chap.chapter, manga.title))