vega-cli 0.1.1__tar.gz → 0.1.2__tar.gz

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 (93) hide show
  1. {vega_cli-0.1.1 → vega_cli-0.1.2}/PKG-INFO +1 -1
  2. {vega_cli-0.1.1 → vega_cli-0.1.2}/pyproject.toml +1 -1
  3. vega_cli-0.1.2/vega_cli/display.py +568 -0
  4. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/interactive.py +3 -3
  5. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli.egg-info/PKG-INFO +1 -1
  6. vega_cli-0.1.1/vega_cli/display.py +0 -197
  7. {vega_cli-0.1.1 → vega_cli-0.1.2}/README.md +0 -0
  8. {vega_cli-0.1.1 → vega_cli-0.1.2}/setup.cfg +0 -0
  9. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/__init__.py +0 -0
  10. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/__main__.py +0 -0
  11. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/cli.py +0 -0
  12. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/config.py +0 -0
  13. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/downloader.py +0 -0
  14. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/history.py +0 -0
  15. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/html.py +0 -0
  16. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/player.py +0 -0
  17. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/__init__.py +0 -0
  18. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/ani_dream.py +0 -0
  19. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/anikoto.py +0 -0
  20. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/animesalt.py +0 -0
  21. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/animesub.py +0 -0
  22. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/animeworld.py +0 -0
  23. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/auto_embed.py +0 -0
  24. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/castle.py +0 -0
  25. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/cncverse.py +0 -0
  26. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/__init__.py +0 -0
  27. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/aes.py +0 -0
  28. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/aniskip.py +0 -0
  29. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/base_url.py +0 -0
  30. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/cinemeta.py +0 -0
  31. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/errors.py +0 -0
  32. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/__init__.py +0 -0
  33. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/abbasy.py +0 -0
  34. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/buzzheavier.py +0 -0
  35. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/cinejoy.py +0 -0
  36. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/gdflix.py +0 -0
  37. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/gofile.py +0 -0
  38. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/hubcloud.py +0 -0
  39. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/movy.py +0 -0
  40. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/st111477.py +0 -0
  41. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/transferit.py +0 -0
  42. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/vegadrive.py +0 -0
  43. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/vidstuck.py +0 -0
  44. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/zcloud.py +0 -0
  45. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/extractors/zypter.py +0 -0
  46. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/headers.py +0 -0
  47. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/http.py +0 -0
  48. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/net_mirror.py +0 -0
  49. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/theintrodb.py +0 -0
  50. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/common/unpack.py +0 -0
  51. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/disney_mirror.py +0 -0
  52. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/dramacool.py +0 -0
  53. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/drive.py +0 -0
  54. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/durbin_live.py +0 -0
  55. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/eon_movies.py +0 -0
  56. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/extraflix.py +0 -0
  57. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/four_khdhub.py +0 -0
  58. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/goku_hd.py +0 -0
  59. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/hdhub4u.py +0 -0
  60. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/internet_archive.py +0 -0
  61. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/kartoons.py +0 -0
  62. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/kartoons2.py +0 -0
  63. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/katmovies.py +0 -0
  64. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/kick_ass_anime.py +0 -0
  65. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/kiss_kh.py +0 -0
  66. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/live_tg_tv.py +0 -0
  67. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/lux_movies.py +0 -0
  68. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/mod.py +0 -0
  69. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/movie_box_web.py +0 -0
  70. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/movielinkdb.py +0 -0
  71. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/movies4u.py +0 -0
  72. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/moviezwap.py +0 -0
  73. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/mxplayer.py +0 -0
  74. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/netflix_mirror.py +0 -0
  75. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/one_cinevood.py +0 -0
  76. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/prime_mirror.py +0 -0
  77. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/rareanimes.py +0 -0
  78. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/registry.py +0 -0
  79. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/showbox.py +0 -0
  80. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/topmovies.py +0 -0
  81. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/torrentio.py +0 -0
  82. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/uhd.py +0 -0
  83. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/vega.py +0 -0
  84. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/youtube.py +0 -0
  85. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/providers/zeefliz.py +0 -0
  86. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/search_all.py +0 -0
  87. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/store.py +0 -0
  88. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli/utils.py +0 -0
  89. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli.egg-info/SOURCES.txt +0 -0
  90. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli.egg-info/dependency_links.txt +0 -0
  91. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli.egg-info/entry_points.txt +0 -0
  92. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli.egg-info/requires.txt +0 -0
  93. {vega_cli-0.1.1 → vega_cli-0.1.2}/vega_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vega-cli
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Pure-Python CLI for Vega streaming and download providers
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "vega-cli"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "Pure-Python CLI for Vega streaming and download providers"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -0,0 +1,568 @@
1
+ """Rich console display helpers for Vega CLI."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pathlib import Path
6
+ from typing import Any
7
+
8
+ from rich.console import Console
9
+ from rich.panel import Panel
10
+ from rich.table import Table
11
+
12
+ console = Console()
13
+
14
+
15
+ def print_providers(providers: list[dict[str, Any]]) -> None:
16
+ """Render available Vega providers in a Rich table."""
17
+ table = Table(title=f"Vega Providers ({len(providers)})")
18
+ table.add_column("#", justify="right", style="cyan")
19
+ table.add_column("ID", style="bold green")
20
+ table.add_column("Name", style="bold")
21
+ table.add_column("Type", style="magenta")
22
+ table.add_column("Version", style="cyan")
23
+ table.add_column("Status")
24
+ for idx, p in enumerate(providers, start=1):
25
+ status = "[red]disabled[/red]" if p.get("disabled") else "[green]enabled[/green]"
26
+ table.add_row(
27
+ str(idx),
28
+ p.get("value", ""),
29
+ p.get("display_name", ""),
30
+ p.get("type", ""),
31
+ str(p.get("version", "")),
32
+ status,
33
+ )
34
+ console.print(table)
35
+
36
+
37
+ def print_search_all(results: list[dict[str, Any]], query: str) -> None:
38
+ """Render grouped multi-provider search results in a Rich table."""
39
+ table = Table(title=f"Global Search: '{query}' ({len(results)} results)")
40
+ table.add_column("#", justify="right", style="cyan")
41
+ table.add_column("Provider", style="magenta")
42
+ table.add_column("Title", style="bold")
43
+ table.add_column("Link", style="dim")
44
+ for idx, item in enumerate(results, start=1):
45
+ table.add_row(
46
+ str(idx),
47
+ item.get("provider", ""),
48
+ item.get("title", ""),
49
+ item.get("link", ""),
50
+ )
51
+ console.print(table)
52
+
53
+
54
+ def print_history(items: list[dict[str, Any]], title: str = "Watch History") -> None:
55
+ """Render watch history entries in a Rich table."""
56
+ table = Table(title=title)
57
+ table.add_column("#", justify="right", style="cyan")
58
+ table.add_column("Provider", style="magenta")
59
+ table.add_column("Title", style="bold")
60
+ table.add_column("Episode", style="green")
61
+ table.add_column("Link", style="dim")
62
+ for idx, item in enumerate(items, start=1):
63
+ table.add_row(
64
+ str(idx),
65
+ item.get("provider", ""),
66
+ item.get("title", ""),
67
+ item.get("episode", ""),
68
+ item.get("link", ""),
69
+ )
70
+ console.print(table)
71
+
72
+
73
+ def print_bookmarks(items: list[dict[str, Any]], title: str = "Bookmarks") -> None:
74
+ """Render bookmarked titles in a Rich table."""
75
+ table = Table(title=title)
76
+ table.add_column("#", justify="right", style="cyan")
77
+ table.add_column("Provider", style="magenta")
78
+ table.add_column("Title", style="bold")
79
+ table.add_column("Link", style="dim")
80
+ for idx, item in enumerate(items, start=1):
81
+ table.add_row(
82
+ str(idx),
83
+ item.get("provider", ""),
84
+ item.get("title", ""),
85
+ item.get("link", ""),
86
+ )
87
+ console.print(table)
88
+
89
+
90
+
91
+ def print_catalog(
92
+ catalog: list[dict[str, str]],
93
+ genres: list[dict[str, str]],
94
+ *,
95
+ title: str = "Catalog & Genres",
96
+ ) -> None:
97
+ """Render catalog categories and genres in a Rich table."""
98
+ table = Table(title=title)
99
+ table.add_column("Group", style="cyan")
100
+ table.add_column("Title", style="bold")
101
+ table.add_column("Filter", style="green")
102
+ for item in catalog:
103
+ table.add_row("Catalog", item.get("title", ""), item.get("filter") or "(root)")
104
+ for item in genres:
105
+ table.add_row("Genre", item.get("title", ""), item.get("filter", ""))
106
+ console.print(table)
107
+
108
+
109
+ def print_search_all(results: list[dict[str, Any]], query: str) -> None:
110
+ """Render grouped multi-provider search results in a Rich table."""
111
+ table = Table(title=f"Global Search: '{query}' ({len(results)} results)")
112
+ table.add_column("#", justify="right", style="cyan")
113
+ table.add_column("Provider", style="magenta")
114
+ table.add_column("Title", style="bold")
115
+ table.add_column("Link", style="dim")
116
+ for idx, item in enumerate(results, start=1):
117
+ table.add_row(
118
+ str(idx),
119
+ item.get("provider", ""),
120
+ item.get("title", ""),
121
+ item.get("link", ""),
122
+ )
123
+ console.print(table)
124
+
125
+
126
+ def print_history(items: list[dict[str, Any]], title: str = "Watch History") -> None:
127
+ """Render watch history entries in a Rich table."""
128
+ table = Table(title=title)
129
+ table.add_column("#", justify="right", style="cyan")
130
+ table.add_column("Provider", style="magenta")
131
+ table.add_column("Title", style="bold")
132
+ table.add_column("Episode", style="green")
133
+ table.add_column("Link", style="dim")
134
+ for idx, item in enumerate(items, start=1):
135
+ table.add_row(
136
+ str(idx),
137
+ item.get("provider", ""),
138
+ item.get("title", ""),
139
+ item.get("episode", ""),
140
+ item.get("link", ""),
141
+ )
142
+ console.print(table)
143
+
144
+
145
+ def print_bookmarks(items: list[dict[str, Any]], title: str = "Bookmarks") -> None:
146
+ """Render bookmarked titles in a Rich table."""
147
+ table = Table(title=title)
148
+ table.add_column("#", justify="right", style="cyan")
149
+ table.add_column("Provider", style="magenta")
150
+ table.add_column("Title", style="bold")
151
+ table.add_column("Link", style="dim")
152
+ for idx, item in enumerate(items, start=1):
153
+ table.add_row(
154
+ str(idx),
155
+ item.get("provider", ""),
156
+ item.get("title", ""),
157
+ item.get("link", ""),
158
+ )
159
+ console.print(table)
160
+
161
+
162
+
163
+ def print_posts(items: list[dict[str, str]], title: str) -> None:
164
+ """Render a list of posts in a Rich table."""
165
+ table = Table(title=title)
166
+ table.add_column("#", justify="right", style="cyan")
167
+ table.add_column("Title", style="bold")
168
+ table.add_column("Link", style="green")
169
+ for idx, item in enumerate(items, start=1):
170
+ table.add_row(str(idx), item.get("title", ""), item.get("link", ""))
171
+ console.print(table)
172
+
173
+
174
+ def print_search_all(results: list[dict[str, Any]], query: str) -> None:
175
+ """Render grouped multi-provider search results in a Rich table."""
176
+ table = Table(title=f"Global Search: '{query}' ({len(results)} results)")
177
+ table.add_column("#", justify="right", style="cyan")
178
+ table.add_column("Provider", style="magenta")
179
+ table.add_column("Title", style="bold")
180
+ table.add_column("Link", style="dim")
181
+ for idx, item in enumerate(results, start=1):
182
+ table.add_row(
183
+ str(idx),
184
+ item.get("provider", ""),
185
+ item.get("title", ""),
186
+ item.get("link", ""),
187
+ )
188
+ console.print(table)
189
+
190
+
191
+ def print_history(items: list[dict[str, Any]], title: str = "Watch History") -> None:
192
+ """Render watch history entries in a Rich table."""
193
+ table = Table(title=title)
194
+ table.add_column("#", justify="right", style="cyan")
195
+ table.add_column("Provider", style="magenta")
196
+ table.add_column("Title", style="bold")
197
+ table.add_column("Episode", style="green")
198
+ table.add_column("Link", style="dim")
199
+ for idx, item in enumerate(items, start=1):
200
+ table.add_row(
201
+ str(idx),
202
+ item.get("provider", ""),
203
+ item.get("title", ""),
204
+ item.get("episode", ""),
205
+ item.get("link", ""),
206
+ )
207
+ console.print(table)
208
+
209
+
210
+ def print_bookmarks(items: list[dict[str, Any]], title: str = "Bookmarks") -> None:
211
+ """Render bookmarked titles in a Rich table."""
212
+ table = Table(title=title)
213
+ table.add_column("#", justify="right", style="cyan")
214
+ table.add_column("Provider", style="magenta")
215
+ table.add_column("Title", style="bold")
216
+ table.add_column("Link", style="dim")
217
+ for idx, item in enumerate(items, start=1):
218
+ table.add_row(
219
+ str(idx),
220
+ item.get("provider", ""),
221
+ item.get("title", ""),
222
+ item.get("link", ""),
223
+ )
224
+ console.print(table)
225
+
226
+
227
+
228
+ def print_meta(info: dict[str, Any]) -> None:
229
+ """Render post metadata and available links."""
230
+ console.print(
231
+ Panel(
232
+ f"[bold]{info.get('title', '')}[/bold] ({info.get('type', '')})\n"
233
+ f"IMDb: {info.get('imdbId') or 'N/A'}\n\n"
234
+ f"{info.get('synopsis') or 'No synopsis'}",
235
+ title="Metadata",
236
+ )
237
+ )
238
+ table = Table(title="Available Links")
239
+ table.add_column("#", justify="right", style="cyan")
240
+ table.add_column("Title", style="bold")
241
+ table.add_column("Quality", style="magenta")
242
+ for idx, item in enumerate(info.get("linkList") or [], start=1):
243
+ table.add_row(str(idx), item.get("title", ""), item.get("quality", ""))
244
+ console.print(table)
245
+
246
+
247
+ def print_search_all(results: list[dict[str, Any]], query: str) -> None:
248
+ """Render grouped multi-provider search results in a Rich table."""
249
+ table = Table(title=f"Global Search: '{query}' ({len(results)} results)")
250
+ table.add_column("#", justify="right", style="cyan")
251
+ table.add_column("Provider", style="magenta")
252
+ table.add_column("Title", style="bold")
253
+ table.add_column("Link", style="dim")
254
+ for idx, item in enumerate(results, start=1):
255
+ table.add_row(
256
+ str(idx),
257
+ item.get("provider", ""),
258
+ item.get("title", ""),
259
+ item.get("link", ""),
260
+ )
261
+ console.print(table)
262
+
263
+
264
+ def print_history(items: list[dict[str, Any]], title: str = "Watch History") -> None:
265
+ """Render watch history entries in a Rich table."""
266
+ table = Table(title=title)
267
+ table.add_column("#", justify="right", style="cyan")
268
+ table.add_column("Provider", style="magenta")
269
+ table.add_column("Title", style="bold")
270
+ table.add_column("Episode", style="green")
271
+ table.add_column("Link", style="dim")
272
+ for idx, item in enumerate(items, start=1):
273
+ table.add_row(
274
+ str(idx),
275
+ item.get("provider", ""),
276
+ item.get("title", ""),
277
+ item.get("episode", ""),
278
+ item.get("link", ""),
279
+ )
280
+ console.print(table)
281
+
282
+
283
+ def print_bookmarks(items: list[dict[str, Any]], title: str = "Bookmarks") -> None:
284
+ """Render bookmarked titles in a Rich table."""
285
+ table = Table(title=title)
286
+ table.add_column("#", justify="right", style="cyan")
287
+ table.add_column("Provider", style="magenta")
288
+ table.add_column("Title", style="bold")
289
+ table.add_column("Link", style="dim")
290
+ for idx, item in enumerate(items, start=1):
291
+ table.add_row(
292
+ str(idx),
293
+ item.get("provider", ""),
294
+ item.get("title", ""),
295
+ item.get("link", ""),
296
+ )
297
+ console.print(table)
298
+
299
+
300
+
301
+ def print_episodes(episodes: list[dict[str, Any]], title: str = "Episodes") -> None:
302
+ """Render episode links in a Rich table."""
303
+ table = Table(title=title)
304
+ table.add_column("#", justify="right", style="cyan")
305
+ table.add_column("Title", style="bold")
306
+ table.add_column("Link", style="green")
307
+ for idx, ep in enumerate(episodes, start=1):
308
+ table.add_row(str(idx), ep.get("title", ""), ep.get("link", ""))
309
+ console.print(table)
310
+
311
+
312
+ def print_search_all(results: list[dict[str, Any]], query: str) -> None:
313
+ """Render grouped multi-provider search results in a Rich table."""
314
+ table = Table(title=f"Global Search: '{query}' ({len(results)} results)")
315
+ table.add_column("#", justify="right", style="cyan")
316
+ table.add_column("Provider", style="magenta")
317
+ table.add_column("Title", style="bold")
318
+ table.add_column("Link", style="dim")
319
+ for idx, item in enumerate(results, start=1):
320
+ table.add_row(
321
+ str(idx),
322
+ item.get("provider", ""),
323
+ item.get("title", ""),
324
+ item.get("link", ""),
325
+ )
326
+ console.print(table)
327
+
328
+
329
+ def print_history(items: list[dict[str, Any]], title: str = "Watch History") -> None:
330
+ """Render watch history entries in a Rich table."""
331
+ table = Table(title=title)
332
+ table.add_column("#", justify="right", style="cyan")
333
+ table.add_column("Provider", style="magenta")
334
+ table.add_column("Title", style="bold")
335
+ table.add_column("Episode", style="green")
336
+ table.add_column("Link", style="dim")
337
+ for idx, item in enumerate(items, start=1):
338
+ table.add_row(
339
+ str(idx),
340
+ item.get("provider", ""),
341
+ item.get("title", ""),
342
+ item.get("episode", ""),
343
+ item.get("link", ""),
344
+ )
345
+ console.print(table)
346
+
347
+
348
+ def print_bookmarks(items: list[dict[str, Any]], title: str = "Bookmarks") -> None:
349
+ """Render bookmarked titles in a Rich table."""
350
+ table = Table(title=title)
351
+ table.add_column("#", justify="right", style="cyan")
352
+ table.add_column("Provider", style="magenta")
353
+ table.add_column("Title", style="bold")
354
+ table.add_column("Link", style="dim")
355
+ for idx, item in enumerate(items, start=1):
356
+ table.add_row(
357
+ str(idx),
358
+ item.get("provider", ""),
359
+ item.get("title", ""),
360
+ item.get("link", ""),
361
+ )
362
+ console.print(table)
363
+
364
+
365
+
366
+ def print_streams(
367
+ streams: list[dict[str, Any]],
368
+ *,
369
+ title: str = "Extracted Streams",
370
+ include_type: bool = True,
371
+ ) -> None:
372
+ """Render extracted stream/download links in a Rich table."""
373
+ table = Table(title=title)
374
+ table.add_column("#", justify="right", style="cyan")
375
+ table.add_column("Server", style="cyan")
376
+ if include_type:
377
+ table.add_column("Type", style="magenta")
378
+ table.add_column("Link", style="green")
379
+ for idx, stream in enumerate(streams, start=1):
380
+ row = [str(idx), stream.get("server", "")]
381
+ if include_type:
382
+ row.append(stream.get("type", ""))
383
+ row.append(stream.get("link", ""))
384
+ table.add_row(*row)
385
+ console.print(table)
386
+
387
+
388
+ def print_search_all(results: list[dict[str, Any]], query: str) -> None:
389
+ """Render grouped multi-provider search results in a Rich table."""
390
+ table = Table(title=f"Global Search: '{query}' ({len(results)} results)")
391
+ table.add_column("#", justify="right", style="cyan")
392
+ table.add_column("Provider", style="magenta")
393
+ table.add_column("Title", style="bold")
394
+ table.add_column("Link", style="dim")
395
+ for idx, item in enumerate(results, start=1):
396
+ table.add_row(
397
+ str(idx),
398
+ item.get("provider", ""),
399
+ item.get("title", ""),
400
+ item.get("link", ""),
401
+ )
402
+ console.print(table)
403
+
404
+
405
+ def print_history(items: list[dict[str, Any]], title: str = "Watch History") -> None:
406
+ """Render watch history entries in a Rich table."""
407
+ table = Table(title=title)
408
+ table.add_column("#", justify="right", style="cyan")
409
+ table.add_column("Provider", style="magenta")
410
+ table.add_column("Title", style="bold")
411
+ table.add_column("Episode", style="green")
412
+ table.add_column("Link", style="dim")
413
+ for idx, item in enumerate(items, start=1):
414
+ table.add_row(
415
+ str(idx),
416
+ item.get("provider", ""),
417
+ item.get("title", ""),
418
+ item.get("episode", ""),
419
+ item.get("link", ""),
420
+ )
421
+ console.print(table)
422
+
423
+
424
+ def print_bookmarks(items: list[dict[str, Any]], title: str = "Bookmarks") -> None:
425
+ """Render bookmarked titles in a Rich table."""
426
+ table = Table(title=title)
427
+ table.add_column("#", justify="right", style="cyan")
428
+ table.add_column("Provider", style="magenta")
429
+ table.add_column("Title", style="bold")
430
+ table.add_column("Link", style="dim")
431
+ for idx, item in enumerate(items, start=1):
432
+ table.add_row(
433
+ str(idx),
434
+ item.get("provider", ""),
435
+ item.get("title", ""),
436
+ item.get("link", ""),
437
+ )
438
+ console.print(table)
439
+
440
+
441
+
442
+ def print_settings(
443
+ schema: list[dict[str, Any]],
444
+ current: dict[str, Any],
445
+ store_path: Path,
446
+ *,
447
+ title: str | None = None,
448
+ ) -> None:
449
+ """Render current provider settings in a Rich table."""
450
+ table = Table(title=title or f"Settings ({store_path})")
451
+ table.add_column("Key", style="cyan")
452
+ table.add_column("Label", style="bold")
453
+ table.add_column("Type", style="magenta")
454
+ table.add_column("Value", style="green")
455
+ for field in schema:
456
+ table.add_row(
457
+ field["key"],
458
+ field.get("label", field["key"]),
459
+ field.get("type", "text"),
460
+ str(current[field["key"]]),
461
+ )
462
+ console.print(table)
463
+
464
+
465
+ def print_search_all(results: list[dict[str, Any]], query: str) -> None:
466
+ """Render grouped multi-provider search results in a Rich table."""
467
+ table = Table(title=f"Global Search: '{query}' ({len(results)} results)")
468
+ table.add_column("#", justify="right", style="cyan")
469
+ table.add_column("Provider", style="magenta")
470
+ table.add_column("Title", style="bold")
471
+ table.add_column("Link", style="dim")
472
+ for idx, item in enumerate(results, start=1):
473
+ table.add_row(
474
+ str(idx),
475
+ item.get("provider", ""),
476
+ item.get("title", ""),
477
+ item.get("link", ""),
478
+ )
479
+ console.print(table)
480
+
481
+
482
+ def print_history(items: list[dict[str, Any]], title: str = "Watch History") -> None:
483
+ """Render watch history entries in a Rich table."""
484
+ table = Table(title=title)
485
+ table.add_column("#", justify="right", style="cyan")
486
+ table.add_column("Provider", style="magenta")
487
+ table.add_column("Title", style="bold")
488
+ table.add_column("Episode", style="green")
489
+ table.add_column("Link", style="dim")
490
+ for idx, item in enumerate(items, start=1):
491
+ table.add_row(
492
+ str(idx),
493
+ item.get("provider", ""),
494
+ item.get("title", ""),
495
+ item.get("episode", ""),
496
+ item.get("link", ""),
497
+ )
498
+ console.print(table)
499
+
500
+
501
+ def print_bookmarks(items: list[dict[str, Any]], title: str = "Bookmarks") -> None:
502
+ """Render bookmarked titles in a Rich table."""
503
+ table = Table(title=title)
504
+ table.add_column("#", justify="right", style="cyan")
505
+ table.add_column("Provider", style="magenta")
506
+ table.add_column("Title", style="bold")
507
+ table.add_column("Link", style="dim")
508
+ for idx, item in enumerate(items, start=1):
509
+ table.add_row(
510
+ str(idx),
511
+ item.get("provider", ""),
512
+ item.get("title", ""),
513
+ item.get("link", ""),
514
+ )
515
+ console.print(table)
516
+
517
+
518
+ def print_search_all(results: list[dict[str, Any]], query: str) -> None:
519
+ """Render grouped multi-provider search results in a Rich table."""
520
+ table = Table(title=f"Global Search: '{query}' ({len(results)} results)")
521
+ table.add_column("#", justify="right", style="cyan")
522
+ table.add_column("Provider", style="magenta")
523
+ table.add_column("Title", style="bold")
524
+ table.add_column("Link", style="dim")
525
+ for idx, item in enumerate(results, start=1):
526
+ table.add_row(
527
+ str(idx),
528
+ item.get("provider", ""),
529
+ item.get("title", ""),
530
+ item.get("link", ""),
531
+ )
532
+ console.print(table)
533
+
534
+
535
+ def print_history(items: list[dict[str, Any]], title: str = "Watch History") -> None:
536
+ """Render watch history entries in a Rich table."""
537
+ table = Table(title=title)
538
+ table.add_column("#", justify="right", style="cyan")
539
+ table.add_column("Provider", style="magenta")
540
+ table.add_column("Title", style="bold")
541
+ table.add_column("Episode", style="green")
542
+ table.add_column("Link", style="dim")
543
+ for idx, item in enumerate(items, start=1):
544
+ table.add_row(
545
+ str(idx),
546
+ item.get("provider", ""),
547
+ item.get("title", ""),
548
+ item.get("episode", ""),
549
+ item.get("link", ""),
550
+ )
551
+ console.print(table)
552
+
553
+
554
+ def print_bookmarks(items: list[dict[str, Any]], title: str = "Bookmarks") -> None:
555
+ """Render bookmarked titles in a Rich table."""
556
+ table = Table(title=title)
557
+ table.add_column("#", justify="right", style="cyan")
558
+ table.add_column("Provider", style="magenta")
559
+ table.add_column("Title", style="bold")
560
+ table.add_column("Link", style="dim")
561
+ for idx, item in enumerate(items, start=1):
562
+ table.add_row(
563
+ str(idx),
564
+ item.get("provider", ""),
565
+ item.get("title", ""),
566
+ item.get("link", ""),
567
+ )
568
+ console.print(table)
@@ -119,7 +119,7 @@ def _open_post(
119
119
 
120
120
  print_streams(streams, title=f"{provider_label} Streams", include_type=False)
121
121
  action = Prompt.ask(
122
- "Action: [p]lay, [d]ownload, or [s]kip",
122
+ r"Action: \[p]lay, \[d]ownload, or \[s]kip",
123
123
  choices=["p", "d", "s"],
124
124
  default="p",
125
125
  )
@@ -175,7 +175,7 @@ def _browse_and_play(
175
175
 
176
176
  print_posts(items, f"{provider_label} Results (page {page})")
177
177
  sel = Prompt.ask(
178
- "Select # (or [n]ext page, [p]rev page, [b]ack)",
178
+ r"Select # (or \[n]ext page, \[p]rev page, \[b]ack)",
179
179
  default="1",
180
180
  ).strip().lower()
181
181
  if sel == "b":
@@ -306,7 +306,7 @@ def _pick_provider(history: HistoryStore) -> dict[str, Any] | None:
306
306
 
307
307
  while True:
308
308
  raw = Prompt.ask(
309
- "Choose provider # or ID ([s]earch-all, [h]istory, [b]ookmarks, [q]uit)",
309
+ r"Choose provider # or ID (\[s]earch-all, \[h]istory, \[b]ookmarks, \[q]uit)",
310
310
  default="drive",
311
311
  ).strip()
312
312
  low = raw.lower()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vega-cli
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Pure-Python CLI for Vega streaming and download providers
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,197 +0,0 @@
1
- """Rich console display helpers for Vega CLI."""
2
-
3
- from __future__ import annotations
4
-
5
- from pathlib import Path
6
- from typing import Any
7
-
8
- from rich.console import Console
9
- from rich.panel import Panel
10
- from rich.table import Table
11
-
12
- console = Console()
13
-
14
-
15
- def print_providers(providers: list[dict[str, Any]]) -> None:
16
- """Render available Vega providers in a Rich table."""
17
- table = Table(title=f"Vega Providers ({len(providers)})")
18
- table.add_column("#", justify="right", style="cyan")
19
- table.add_column("ID", style="bold green")
20
- table.add_column("Name", style="bold")
21
- table.add_column("Type", style="magenta")
22
- table.add_column("Version", style="cyan")
23
- table.add_column("Status")
24
- for idx, p in enumerate(providers, start=1):
25
- status = "[red]disabled[/red]" if p.get("disabled") else "[green]enabled[/green]"
26
- table.add_row(
27
- str(idx),
28
- p.get("value", ""),
29
- p.get("display_name", ""),
30
- p.get("type", ""),
31
- str(p.get("version", "")),
32
- status,
33
- )
34
- console.print(table)
35
-
36
-
37
-
38
- def print_catalog(
39
- catalog: list[dict[str, str]],
40
- genres: list[dict[str, str]],
41
- *,
42
- title: str = "Catalog & Genres",
43
- ) -> None:
44
- """Render catalog categories and genres in a Rich table."""
45
- table = Table(title=title)
46
- table.add_column("Group", style="cyan")
47
- table.add_column("Title", style="bold")
48
- table.add_column("Filter", style="green")
49
- for item in catalog:
50
- table.add_row("Catalog", item.get("title", ""), item.get("filter") or "(root)")
51
- for item in genres:
52
- table.add_row("Genre", item.get("title", ""), item.get("filter", ""))
53
- console.print(table)
54
-
55
-
56
-
57
- def print_posts(items: list[dict[str, str]], title: str) -> None:
58
- """Render a list of posts in a Rich table."""
59
- table = Table(title=title)
60
- table.add_column("#", justify="right", style="cyan")
61
- table.add_column("Title", style="bold")
62
- table.add_column("Link", style="green")
63
- for idx, item in enumerate(items, start=1):
64
- table.add_row(str(idx), item.get("title", ""), item.get("link", ""))
65
- console.print(table)
66
-
67
-
68
-
69
- def print_meta(info: dict[str, Any]) -> None:
70
- """Render post metadata and available links."""
71
- console.print(
72
- Panel(
73
- f"[bold]{info.get('title', '')}[/bold] ({info.get('type', '')})\n"
74
- f"IMDb: {info.get('imdbId') or 'N/A'}\n\n"
75
- f"{info.get('synopsis') or 'No synopsis'}",
76
- title="Metadata",
77
- )
78
- )
79
- table = Table(title="Available Links")
80
- table.add_column("#", justify="right", style="cyan")
81
- table.add_column("Title", style="bold")
82
- table.add_column("Quality", style="magenta")
83
- for idx, item in enumerate(info.get("linkList") or [], start=1):
84
- table.add_row(str(idx), item.get("title", ""), item.get("quality", ""))
85
- console.print(table)
86
-
87
-
88
-
89
- def print_episodes(episodes: list[dict[str, Any]], title: str = "Episodes") -> None:
90
- """Render episode links in a Rich table."""
91
- table = Table(title=title)
92
- table.add_column("#", justify="right", style="cyan")
93
- table.add_column("Title", style="bold")
94
- table.add_column("Link", style="green")
95
- for idx, ep in enumerate(episodes, start=1):
96
- table.add_row(str(idx), ep.get("title", ""), ep.get("link", ""))
97
- console.print(table)
98
-
99
-
100
-
101
- def print_streams(
102
- streams: list[dict[str, Any]],
103
- *,
104
- title: str = "Extracted Streams",
105
- include_type: bool = True,
106
- ) -> None:
107
- """Render extracted stream/download links in a Rich table."""
108
- table = Table(title=title)
109
- table.add_column("#", justify="right", style="cyan")
110
- table.add_column("Server", style="cyan")
111
- if include_type:
112
- table.add_column("Type", style="magenta")
113
- table.add_column("Link", style="green")
114
- for idx, stream in enumerate(streams, start=1):
115
- row = [str(idx), stream.get("server", "")]
116
- if include_type:
117
- row.append(stream.get("type", ""))
118
- row.append(stream.get("link", ""))
119
- table.add_row(*row)
120
- console.print(table)
121
-
122
-
123
-
124
- def print_settings(
125
- schema: list[dict[str, Any]],
126
- current: dict[str, Any],
127
- store_path: Path,
128
- *,
129
- title: str | None = None,
130
- ) -> None:
131
- """Render current provider settings in a Rich table."""
132
- table = Table(title=title or f"Settings ({store_path})")
133
- table.add_column("Key", style="cyan")
134
- table.add_column("Label", style="bold")
135
- table.add_column("Type", style="magenta")
136
- table.add_column("Value", style="green")
137
- for field in schema:
138
- table.add_row(
139
- field["key"],
140
- field.get("label", field["key"]),
141
- field.get("type", "text"),
142
- str(current[field["key"]]),
143
- )
144
- console.print(table)
145
-
146
-
147
- def print_search_all(results: list[dict[str, Any]], query: str) -> None:
148
- """Render grouped multi-provider search results in a Rich table."""
149
- table = Table(title=f"Global Search: '{query}' ({len(results)} results)")
150
- table.add_column("#", justify="right", style="cyan")
151
- table.add_column("Provider", style="magenta")
152
- table.add_column("Title", style="bold")
153
- table.add_column("Link", style="dim")
154
- for idx, item in enumerate(results, start=1):
155
- table.add_row(
156
- str(idx),
157
- item.get("provider", ""),
158
- item.get("title", ""),
159
- item.get("link", ""),
160
- )
161
- console.print(table)
162
-
163
-
164
- def print_history(items: list[dict[str, Any]], title: str = "Watch History") -> None:
165
- """Render watch history entries in a Rich table."""
166
- table = Table(title=title)
167
- table.add_column("#", justify="right", style="cyan")
168
- table.add_column("Provider", style="magenta")
169
- table.add_column("Title", style="bold")
170
- table.add_column("Episode", style="green")
171
- table.add_column("Link", style="dim")
172
- for idx, item in enumerate(items, start=1):
173
- table.add_row(
174
- str(idx),
175
- item.get("provider", ""),
176
- item.get("title", ""),
177
- item.get("episode", ""),
178
- item.get("link", ""),
179
- )
180
- console.print(table)
181
-
182
-
183
- def print_bookmarks(items: list[dict[str, Any]], title: str = "Bookmarks") -> None:
184
- """Render bookmarked titles in a Rich table."""
185
- table = Table(title=title)
186
- table.add_column("#", justify="right", style="cyan")
187
- table.add_column("Provider", style="magenta")
188
- table.add_column("Title", style="bold")
189
- table.add_column("Link", style="dim")
190
- for idx, item in enumerate(items, start=1):
191
- table.add_row(
192
- str(idx),
193
- item.get("provider", ""),
194
- item.get("title", ""),
195
- item.get("link", ""),
196
- )
197
- console.print(table)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes