anipy-cli 2.7.17__py3-none-any.whl → 3.8.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. anipy_cli/__init__.py +2 -20
  2. anipy_cli/anilist_proxy.py +229 -0
  3. anipy_cli/arg_parser.py +109 -21
  4. anipy_cli/cli.py +98 -0
  5. anipy_cli/clis/__init__.py +17 -0
  6. anipy_cli/clis/anilist_cli.py +62 -0
  7. anipy_cli/clis/base_cli.py +34 -0
  8. anipy_cli/clis/binge_cli.py +96 -0
  9. anipy_cli/clis/default_cli.py +115 -0
  10. anipy_cli/clis/download_cli.py +85 -0
  11. anipy_cli/clis/history_cli.py +96 -0
  12. anipy_cli/clis/mal_cli.py +71 -0
  13. anipy_cli/{cli/clis → clis}/seasonal_cli.py +9 -6
  14. anipy_cli/colors.py +14 -8
  15. anipy_cli/config.py +387 -90
  16. anipy_cli/discord.py +34 -0
  17. anipy_cli/download_component.py +194 -0
  18. anipy_cli/logger.py +200 -0
  19. anipy_cli/mal_proxy.py +228 -0
  20. anipy_cli/menus/__init__.py +6 -0
  21. anipy_cli/menus/anilist_menu.py +671 -0
  22. anipy_cli/{cli/menus → menus}/base_menu.py +9 -14
  23. anipy_cli/menus/mal_menu.py +657 -0
  24. anipy_cli/menus/menu.py +265 -0
  25. anipy_cli/menus/seasonal_menu.py +270 -0
  26. anipy_cli/prompts.py +387 -0
  27. anipy_cli/util.py +268 -0
  28. anipy_cli-3.8.2.dist-info/METADATA +71 -0
  29. anipy_cli-3.8.2.dist-info/RECORD +31 -0
  30. {anipy_cli-2.7.17.dist-info → anipy_cli-3.8.2.dist-info}/WHEEL +1 -2
  31. anipy_cli-3.8.2.dist-info/entry_points.txt +3 -0
  32. anipy_cli/cli/__init__.py +0 -1
  33. anipy_cli/cli/cli.py +0 -37
  34. anipy_cli/cli/clis/__init__.py +0 -6
  35. anipy_cli/cli/clis/base_cli.py +0 -43
  36. anipy_cli/cli/clis/binge_cli.py +0 -54
  37. anipy_cli/cli/clis/default_cli.py +0 -46
  38. anipy_cli/cli/clis/download_cli.py +0 -92
  39. anipy_cli/cli/clis/history_cli.py +0 -64
  40. anipy_cli/cli/clis/mal_cli.py +0 -27
  41. anipy_cli/cli/menus/__init__.py +0 -3
  42. anipy_cli/cli/menus/mal_menu.py +0 -411
  43. anipy_cli/cli/menus/menu.py +0 -102
  44. anipy_cli/cli/menus/seasonal_menu.py +0 -174
  45. anipy_cli/cli/util.py +0 -118
  46. anipy_cli/download.py +0 -454
  47. anipy_cli/history.py +0 -83
  48. anipy_cli/mal.py +0 -645
  49. anipy_cli/misc.py +0 -227
  50. anipy_cli/player/__init__.py +0 -1
  51. anipy_cli/player/player.py +0 -33
  52. anipy_cli/player/players/__init__.py +0 -3
  53. anipy_cli/player/players/base.py +0 -106
  54. anipy_cli/player/players/mpv.py +0 -19
  55. anipy_cli/player/players/mpv_contrl.py +0 -37
  56. anipy_cli/player/players/syncplay.py +0 -19
  57. anipy_cli/player/players/vlc.py +0 -18
  58. anipy_cli/query.py +0 -92
  59. anipy_cli/run_anipy_cli.py +0 -14
  60. anipy_cli/seasonal.py +0 -106
  61. anipy_cli/url_handler.py +0 -442
  62. anipy_cli/version.py +0 -1
  63. anipy_cli-2.7.17.dist-info/LICENSE +0 -674
  64. anipy_cli-2.7.17.dist-info/METADATA +0 -159
  65. anipy_cli-2.7.17.dist-info/RECORD +0 -43
  66. anipy_cli-2.7.17.dist-info/entry_points.txt +0 -2
  67. anipy_cli-2.7.17.dist-info/top_level.txt +0 -1
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.4
2
+ Name: anipy-cli
3
+ Version: 3.8.2
4
+ Summary: Watch and Download anime from the comfort of your Terminal
5
+ License: GPL-3.0
6
+ Keywords: anime,cli
7
+ Author: sdaqo
8
+ Author-email: sdaqo.dev@protonmail.com
9
+ Requires-Python: >=3.10,<4.0
10
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Dist: anipy-api (>=3.8.2,<4.0.0)
18
+ Requires-Dist: appdirs (>=1.4.4,<2.0.0)
19
+ Requires-Dist: inquirerpy (>=0.3.4,<0.4.0)
20
+ Requires-Dist: pypresence (>=4.3.0,<5.0.0)
21
+ Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
22
+ Requires-Dist: yaspin (>=3.0.2,<4.0.0)
23
+ Project-URL: Bug Tracker, https://github.com/sdaqo/anipy-cli/issues
24
+ Project-URL: Documentation, https://sdaqo.github.io/anipy-cli/getting-started-cli
25
+ Project-URL: Homepage, https://sdaqo.github.io/anipy-cli
26
+ Project-URL: Repository, https://github.com/sdaqo/anipy-cli
27
+ Description-Content-Type: text/markdown
28
+
29
+ # ANIPY-CLI
30
+ **Anime from the comfort of your Terminal**
31
+
32
+ <p align="center"><img src="https://github.com/sdaqo/anipy-cli/assets/63876564/1dafa5fb-4273-4dc1-a7ab-2664dd668fc9" /> </p>
33
+
34
+ ## What even is this?
35
+ A Little tool written in python to watch and download anime from the terminal (the better way to watch anime)
36
+ This project's main aim is to create a enjoyable anime watching and downloading experience, directly in the terminal - your favorite place.
37
+
38
+ Since the version 3 rewrite this project is split into api and frontend this makes it easy to integrate this into your project!
39
+
40
+ ## You are just here for the client?
41
+ <a href="https://pypi.org/project/anipy-cli/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/anipy-cli?style=for-the-badge&logo=pypi&label=anipy-cli"></a>
42
+
43
+ As one wise man once said:
44
+ > I DONT GIVE A FUCK ABOUT THE FUCKING CODE! i just want to download this stupid fucking application and use it.
45
+ >
46
+ > WHY IS THERE CODE??? MAKE A FUCKING .EXE FILE AND GIVE IT TO ME. these dumbfucks think that everyone is a developer and understands code. well i am not and i don't understand it. I only know to download and install applications. SO WHY THE FUCK IS THERE CODE? make an EXE file and give it to me. STUPID FUCKING SMELLY NERDS
47
+
48
+ <sub>Please do not take this seriously this is some stupid copypasta</sub>
49
+
50
+ We do not have a .exe but we have pipx: `pipx install anipy-cli`
51
+
52
+ Check out [Getting Started - CLI](https://sdaqo.github.io/anipy-cli/getting-started-cli) for better instructions and advice!
53
+
54
+ ## You want to use the api for your project?
55
+ <a href="https://pypi.org/project/anipy-api/"><img alt="PyPI - Version" src="https://img.shields.io/pypi/v/anipy-api?style=for-the-badge&logo=pypi&label=anipy-api"></a>
56
+
57
+ Feel free to - please check out [Getting Started - API](https://sdaqo.github.io/anipy-cli/getting-started-api) for instructions
58
+
59
+
60
+ ## :heart: Credits!
61
+
62
+ #### Heavily inspired by https://github.com/pystardust/ani-cli/
63
+
64
+ #### All contributors for contributing
65
+
66
+ <a href="https://github.com/sdaqo/anipy-cli/graphs/contributors">
67
+ <img src="https://contrib.rocks/image?repo=sdaqo/anipy-cli" alt="anipy-cli contributors" title="anipy-cli contributors" width="800"/>
68
+ </a>
69
+
70
+ If you want to contribute as well check out this: https://sdaqo.github.io/anipy-cli/contributing
71
+
@@ -0,0 +1,31 @@
1
+ anipy_cli/__init__.py,sha256=ALlLvJfemYvNnVZxVP67VmiMhE3KeaLKxoGq0YSF1bA,48
2
+ anipy_cli/anilist_proxy.py,sha256=tUTQvjxGHMlB0Ci9q-vJwx3R1k1Y9PXhKWiB4s0ZvtI,7441
3
+ anipy_cli/arg_parser.py,sha256=NPswRQ3e0Fs7H3DeJOnOKLj51tC4Muw-9MW280EhD9w,7740
4
+ anipy_cli/cli.py,sha256=_UK-k3sMFFrSCKZV2tby83xfjsR-881p_nhxP4-aOus,2916
5
+ anipy_cli/clis/__init__.py,sha256=zJrVQnb9E1sDsZKdFT1aoD9zNKrWxa291ZR0sPjBbRY,479
6
+ anipy_cli/clis/anilist_cli.py,sha256=XuDmEnAwOpXn3AtH2M3I7SHH_o0btOmEIaGh_jDHa3A,1857
7
+ anipy_cli/clis/base_cli.py,sha256=JfS7mnxNgTK4_Pqeg4IyjHluhfVyO_YLL_TqdyTtyiQ,803
8
+ anipy_cli/clis/binge_cli.py,sha256=rqTRJe8Wmsibkj6sKNogyun0xciffdDmsz6laPP-9-g,2705
9
+ anipy_cli/clis/default_cli.py,sha256=8y0P99K-aoyv7HdzYHF77NbVTptZxfGkUWl4HtPgH8o,3284
10
+ anipy_cli/clis/download_cli.py,sha256=sREoLhgiPk5nQ7eFzbbGznyt80_uaE4VhiOCxrg4ce0,2400
11
+ anipy_cli/clis/history_cli.py,sha256=2ccv6BpQQpUhY4K-KM7lO9qxVLXBrmCY5lec6czipSE,2863
12
+ anipy_cli/clis/mal_cli.py,sha256=s-9wOh1DkWHt3QPDQMVWAr2GcTXcTVLiXmVTR_LwDqg,2283
13
+ anipy_cli/clis/seasonal_cli.py,sha256=GV2TQNm9UotG1cxfYbrFFgg7Jmy8SFa7w_GlFtPdRVE,616
14
+ anipy_cli/colors.py,sha256=MaUeHk6Ad0xSWsii_xph4zzV0Xgr_SixRstYP9eDQPQ,975
15
+ anipy_cli/config.py,sha256=_9dRk6is-Umn9sqtl7DMobnM5GhgEtH6iNdcxU3OsGc,18516
16
+ anipy_cli/discord.py,sha256=c6mdqnEdblzZBYs3cGP66oDeS4ySm59OfTRP-R-Duls,1160
17
+ anipy_cli/download_component.py,sha256=D7PUZPoeP695mHlrSGBeXDFBWQBiCdAbp2VDK4opr0I,6437
18
+ anipy_cli/logger.py,sha256=tXsckOYeewnEyx1GBpv4WrB-icy3Z083xwb8fmnxJ9E,5195
19
+ anipy_cli/mal_proxy.py,sha256=Xns2BQU950zDR5pLOmzDKUCIrqDCoySUNsIvAhAAMX8,7252
20
+ anipy_cli/menus/__init__.py,sha256=U9RLQ61ulY3MpHvz3Q02my_q61LoM3KY1SLd9v3JhnY,253
21
+ anipy_cli/menus/anilist_menu.py,sha256=ukhKe1vYrH_O9y7J6UFoUhfVEZH4Ww9qoQqFrwVKBQQ,24625
22
+ anipy_cli/menus/base_menu.py,sha256=vDvPI36grmk0Dklthj3d_3yE_vG9oyHWNrWwVvJLxpg,1132
23
+ anipy_cli/menus/mal_menu.py,sha256=P0f1yQ1kG1KrQvBnS8zU4rFYh60o2y_HkLR6lVhTxBA,24030
24
+ anipy_cli/menus/menu.py,sha256=8-GykCW6WWLq5C2DJomxFL4MM8ZfnvXHTkKgCbw1QfA,8774
25
+ anipy_cli/menus/seasonal_menu.py,sha256=ACP_V-rexESd_GhkGmbIge3ZND-SN_FAsOIxFlHfGuE,9075
26
+ anipy_cli/prompts.py,sha256=839gD7o4yfEJTQpaz7E3qWqefZwW2lW3W0d1QUWOZDc,11946
27
+ anipy_cli/util.py,sha256=D-eSkUakEk6WMT-eHfTdzfM8THdIrdQUV8z-wnEMtq8,7102
28
+ anipy_cli-3.8.2.dist-info/METADATA,sha256=daocZ1W4jbbUMKlwkm-O1s2ahvMMWzdqzMqWtLAJRkA,3483
29
+ anipy_cli-3.8.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
30
+ anipy_cli-3.8.2.dist-info/entry_points.txt,sha256=86iXpcm_ECFndrt0JAI2mqYfXC2Ar7mGi0iOaxCrNP0,51
31
+ anipy_cli-3.8.2.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.40.0)
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ anipy-cli=anipy_cli.cli:run_cli
3
+
anipy_cli/cli/__init__.py DELETED
@@ -1 +0,0 @@
1
- from anipy_cli.cli.cli import run_cli
anipy_cli/cli/cli.py DELETED
@@ -1,37 +0,0 @@
1
- from anipy_cli.misc import error, dc_presence_connect
2
- from anipy_cli.arg_parser import parse_args
3
- from anipy_cli.config import Config
4
- from anipy_cli.colors import cprint, colors
5
- from anipy_cli.cli.clis import *
6
-
7
-
8
- def run_cli() -> None:
9
- args = parse_args()
10
-
11
- rpc_client = None
12
- if Config().dc_presence:
13
- rpc_client = dc_presence_connect()
14
-
15
- if args.config:
16
- print(Config()._config_file)
17
- return
18
- elif args.delete:
19
- try:
20
- Config().history_file_path.unlink()
21
- cprint(colors.RED, "Done")
22
- except FileNotFoundError:
23
- error("no history file found")
24
- return
25
-
26
- clis_dict = {
27
- args.download: DownloadCli,
28
- args.binge: BingeCli,
29
- args.seasonal: SeasonalCli,
30
- args.history: HistoryCli,
31
- args.mal: MalCli,
32
- args.auto_update: SeasonalCli,
33
- }
34
-
35
- cli_class = clis_dict.get(True, DefaultCli)
36
-
37
- cli_class(options=args, rpc_client=rpc_client).run()
@@ -1,6 +0,0 @@
1
- from anipy_cli.cli.clis.default_cli import DefaultCli
2
- from anipy_cli.cli.clis.history_cli import HistoryCli
3
- from anipy_cli.cli.clis.mal_cli import MalCli
4
- from anipy_cli.cli.clis.seasonal_cli import SeasonalCli
5
- from anipy_cli.cli.clis.binge_cli import BingeCli
6
- from anipy_cli.cli.clis.download_cli import DownloadCli
@@ -1,43 +0,0 @@
1
- import sys
2
- from abc import ABC, abstractmethod
3
-
4
- from anipy_cli.arg_parser import CliArgs
5
- from anipy_cli.misc import error
6
-
7
-
8
- class CliBase(ABC):
9
- def __init__(self, options: CliArgs, rpc_client=None):
10
- self.options = options
11
- self.rpc_client = rpc_client
12
-
13
- @abstractmethod
14
- def print_header(self):
15
- pass
16
-
17
- @abstractmethod
18
- def take_input(self):
19
- pass
20
-
21
- @abstractmethod
22
- def process(self):
23
- pass
24
-
25
- @abstractmethod
26
- def show(self):
27
- pass
28
-
29
- @abstractmethod
30
- def post(self):
31
- pass
32
-
33
- def run(self):
34
- self.print_header()
35
- self.take_input()
36
- self.process()
37
- self.show()
38
- self.post()
39
-
40
- @staticmethod
41
- def exit(error_str: str):
42
- error(error_str)
43
- sys.exit()
@@ -1,54 +0,0 @@
1
- from anipy_cli.colors import cprint, colors
2
- from anipy_cli.misc import Entry
3
- from anipy_cli.query import query
4
- from anipy_cli.url_handler import epHandler
5
- from anipy_cli.player import get_player
6
- from anipy_cli.arg_parser import CliArgs
7
- from anipy_cli.cli.util import binge
8
- from anipy_cli.cli.clis.base_cli import CliBase
9
-
10
-
11
- class BingeCli(CliBase):
12
- def __init__(self, options: CliArgs, rpc_client=None):
13
- super().__init__(options, rpc_client)
14
- self.entry = Entry()
15
- self.ep_list = []
16
- self.binge_list = {}
17
- self.player = get_player(self.rpc_client, self.options.optional_player)
18
-
19
- def print_header(self):
20
- cprint(colors.GREEN, "***Binge Mode***")
21
-
22
- def take_input(self):
23
- inp = input("Search: ")
24
- user_query = query(inp, self.entry)
25
-
26
- if user_query.get_links() == 0:
27
- self.exit("no search results")
28
-
29
- self.entry = user_query.pick_show()
30
- self.ep_list = epHandler(self.entry).pick_range()
31
-
32
- def process(self):
33
- ep_urls = []
34
- for i in self.ep_list:
35
- ent = Entry()
36
- ent.ep = int(i)
37
- ent.category_url = self.entry.category_url
38
- ep_class = epHandler(ent)
39
- ent = ep_class.gen_eplink()
40
- ep_urls.append(ent.ep_url)
41
-
42
- self.binge_list = {
43
- self.entry.show_name: {
44
- "ep_urls": ep_urls,
45
- "eps": self.ep_list,
46
- "category_url": self.entry.category_url,
47
- }
48
- }
49
-
50
- def show(self):
51
- binge(self.binge_list, self.options.quality, self.player)
52
-
53
- def post(self):
54
- self.player.kill_player()
@@ -1,46 +0,0 @@
1
- import sys
2
-
3
- from anipy_cli.misc import Entry
4
- from anipy_cli.query import query
5
- from anipy_cli.url_handler import epHandler, videourl
6
- from anipy_cli.player import get_player
7
- from anipy_cli.arg_parser import CliArgs
8
- from anipy_cli.cli.menus import Menu
9
- from anipy_cli.cli.clis.base_cli import CliBase
10
-
11
-
12
- class DefaultCli(CliBase):
13
- def __init__(self, options: CliArgs, rpc_client=None):
14
- super().__init__(options, rpc_client)
15
-
16
- self.entry = Entry()
17
- self.player = get_player(self.rpc_client, self.options.optional_player)
18
-
19
- def print_header(self):
20
- pass
21
-
22
- def take_input(self):
23
- inp = input("Search: ")
24
- user_query = query(inp, self.entry)
25
-
26
- if user_query.get_links() == 0:
27
- self.exit("no search results")
28
-
29
- self.entry = user_query.pick_show()
30
- self.entry = epHandler(self.entry).pick_ep()
31
-
32
- def process(self):
33
- url_parser = videourl(self.entry, self.options.quality)
34
- url_parser.stream_url()
35
- self.entry = url_parser.get_entry()
36
-
37
- def show(self):
38
- self.player.play_title(self.entry)
39
-
40
- def post(self):
41
- Menu(
42
- options=self.options,
43
- entry=self.entry,
44
- player=self.player,
45
- rpc_client=self.rpc_client,
46
- ).run()
@@ -1,92 +0,0 @@
1
- from copy import deepcopy
2
-
3
- from anipy_cli.arg_parser import CliArgs
4
- from anipy_cli.config import Config
5
- from anipy_cli.colors import cprint, colors
6
- from anipy_cli.misc import Entry, parsenum
7
- from anipy_cli.query import query
8
- from anipy_cli.url_handler import videourl, epHandler
9
- from anipy_cli.download import download
10
- from anipy_cli.cli.util import get_season_searches
11
- from anipy_cli.cli.clis.base_cli import CliBase
12
-
13
-
14
- class DownloadCli(CliBase):
15
- def __init__(self, options: CliArgs, rpc_client=None):
16
- super().__init__(options, rpc_client)
17
-
18
- self.entry = Entry()
19
- self.show_entries = []
20
- self.dl_path = Config().download_folder_path
21
- if options.location:
22
- self.dl_path = options.location
23
-
24
- def print_header(self):
25
- cprint(colors.GREEN, "***Download Mode***")
26
- cprint(colors.GREEN, "Downloads are stored in: ", colors.END, str(self.dl_path))
27
-
28
- def take_input(self):
29
- is_season_search = False
30
-
31
- searches = []
32
- if (
33
- not self.options.no_season_search
34
- and input("Search MyAnimeList for anime in Season? (y|n): \n>> ") == "y"
35
- ):
36
- searches = get_season_searches()
37
-
38
- else:
39
- another = "y"
40
- while another == "y":
41
- searches.append(input("Search: "))
42
- another = input("Add another search: (y|n)\n")
43
-
44
- for search in searches:
45
- links = 0
46
- query_class = None
47
- if isinstance(search, dict):
48
- is_season_search = True
49
- links = [search["category_url"]]
50
-
51
- else:
52
- print("\nCurrent: ", search)
53
- query_class = query(search, self.entry)
54
- query_class.get_pages()
55
- links = query_class.get_links()
56
-
57
- if links == 0:
58
- self.exit("no search results")
59
-
60
- if is_season_search:
61
- self.entry = Entry()
62
- self.entry.show_name = search["name"]
63
- self.entry.category_url = search["category_url"]
64
-
65
- else:
66
- self.entry = query_class.pick_show()
67
-
68
- ep_class = epHandler(self.entry)
69
- ep_list = ep_class.pick_range()
70
- self.show_entries.append(
71
- {"show_entry": deepcopy(self.entry), "ep_list": deepcopy(ep_list)}
72
- )
73
-
74
- def process(self):
75
- for ent in self.show_entries:
76
- entry = ent["show_entry"]
77
- ep_list = ent["ep_list"]
78
- for i in ep_list:
79
- entry.ep = parsenum(i)
80
- entry.embed_url = ""
81
- ep_class = epHandler(entry)
82
- entry = ep_class.gen_eplink()
83
- url_class = videourl(entry, self.options.quality)
84
- url_class.stream_url()
85
- entry = url_class.get_entry()
86
- download(entry, self.options.quality, self.options.ffmpeg).download()
87
-
88
- def show(self):
89
- pass
90
-
91
- def post(self):
92
- pass
@@ -1,64 +0,0 @@
1
- from anipy_cli.arg_parser import CliArgs
2
- from anipy_cli.misc import Entry, error, print_names
3
- from anipy_cli.colors import cinput, colors
4
- from anipy_cli.history import history
5
- from anipy_cli.url_handler import epHandler, videourl
6
- from anipy_cli.player import get_player
7
- from anipy_cli.cli.menus import Menu
8
- from anipy_cli.cli.clis.base_cli import CliBase
9
-
10
-
11
- class HistoryCli(CliBase):
12
- def __init__(self, options: CliArgs, rpc_client=None):
13
- super().__init__(options, rpc_client)
14
-
15
- self.entry = Entry()
16
- self.player = get_player(
17
- rpc_client=self.rpc_client, player_override=self.options.optional_player
18
- )
19
- self.hist = history(self.entry).read_save_data()
20
-
21
- def print_header(self):
22
- pass
23
-
24
- def take_input(self):
25
- if not self.hist:
26
- self.exit("No History")
27
-
28
- shows = [x for x in self.hist]
29
- print_names(shows)
30
-
31
- while True:
32
- inp = cinput(colors.CYAN, "Enter Number: ")
33
- try:
34
- if int(inp) <= 0:
35
- raise ValueError
36
-
37
- picked = shows[int(inp) - 1]
38
- break
39
- except ValueError:
40
- error("invalid input")
41
- except IndexError:
42
- error("invalid Input")
43
-
44
- self.entry.show_name = picked
45
- self.entry.ep = self.hist[picked]["ep"]
46
- self.entry.ep_url = self.hist[picked]["ep-link"]
47
- self.entry.category_url = self.hist[picked]["category-link"]
48
- self.entry.latest_ep = epHandler(self.entry).get_latest()
49
-
50
- def process(self):
51
- url_parser = videourl(self.entry, self.options.quality)
52
- url_parser.stream_url()
53
- self.entry = url_parser.get_entry()
54
-
55
- def show(self):
56
- self.player.play_title(self.entry)
57
-
58
- def post(self):
59
- Menu(
60
- options=self.options,
61
- entry=self.entry,
62
- player=self.player,
63
- rpc_client=self.rpc_client,
64
- ).run()
@@ -1,27 +0,0 @@
1
- from anipy_cli.arg_parser import CliArgs
2
- from anipy_cli.cli.menus import MALMenu
3
- from anipy_cli.cli.clis.base_cli import CliBase
4
-
5
-
6
- class MalCli(CliBase):
7
- def __init__(self, options: CliArgs, rpc_client=None):
8
- super().__init__(options, rpc_client)
9
-
10
- def print_header(self):
11
- pass
12
-
13
- def take_input(self):
14
- pass
15
-
16
- def process(self):
17
- pass
18
-
19
- def show(self):
20
- pass
21
-
22
- def post(self):
23
- menu = MALMenu(options=self.options, rpc_client=self.rpc_client)
24
- if self.options.auto_update:
25
- menu.download(mode="all")
26
- else:
27
- menu.run()
@@ -1,3 +0,0 @@
1
- from anipy_cli.cli.menus.menu import Menu
2
- from anipy_cli.cli.menus.mal_menu import MALMenu
3
- from anipy_cli.cli.menus.seasonal_menu import SeasonalMenu