diff --git a/lib/modules/manga/detail/manga_detail_view.dart b/lib/modules/manga/detail/manga_detail_view.dart index 7da57b3a..8ca79831 100644 --- a/lib/modules/manga/detail/manga_detail_view.dart +++ b/lib/modules/manga/detail/manga_detail_view.dart @@ -627,10 +627,8 @@ class _MangaDetailViewState extends ConsumerState onPressed: () async { final manga = widget.manga; - if ((manga!.isLocalArchive ?? - false) && - manga.source == - "torrent") { + if (manga!.source == + "torrent") { addTorrent( context, manga: manga); @@ -1363,18 +1361,25 @@ class _MangaDetailViewState extends ConsumerState icon: Icon(Icons.add, color: context.secondaryColor), label: Text( - l10n.add_chapters, + widget.manga!.isManga! + ? l10n.add_chapters + : l10n.add_episodes, style: TextStyle( fontWeight: FontWeight.bold, color: context.secondaryColor), ), onPressed: () async { - await ref.watch( - importArchivesFromFileProvider( - isManga: widget.manga!.isManga!, - widget.manga, - init: false) - .future); + final manga = widget.manga; + if (manga!.source == "torrent") { + addTorrent(context, manga: manga); + } else { + await ref.watch( + importArchivesFromFileProvider( + isManga: manga.isManga!, + manga, + init: false) + .future); + } }, ) ],