cinnamon-cli 0.2.34__tar.gz → 0.2.38__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 (38) hide show
  1. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/PKG-INFO +14 -5
  2. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/README.md +10 -3
  3. cinnamon_cli-0.2.38/cinnamon/__init__.py +1 -0
  4. cinnamon_cli-0.2.38/cinnamon/anilist.py +92 -0
  5. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/cli.py +378 -98
  6. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/config.py +1 -0
  7. cinnamon_cli-0.2.38/cinnamon/embedapi.py +198 -0
  8. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/history.py +22 -9
  9. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/player.py +233 -14
  10. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/scrapers/__init__.py +0 -1
  11. cinnamon_cli-0.2.38/cinnamon/scrapers/_vidlink_crypto.py +163 -0
  12. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/scrapers/anime.py +259 -9
  13. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/scrapers/base.py +1 -0
  14. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/scrapers/vidsrc.py +1 -1
  15. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/scrapers/webstream.py +132 -69
  16. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon_cli.egg-info/PKG-INFO +14 -5
  17. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon_cli.egg-info/SOURCES.txt +2 -0
  18. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon_cli.egg-info/requires.txt +3 -0
  19. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/pyproject.toml +5 -2
  20. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/tests/test_ui_smoke.py +1 -1
  21. cinnamon_cli-0.2.34/cinnamon/__init__.py +0 -1
  22. cinnamon_cli-0.2.34/cinnamon/anilist.py +0 -33
  23. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/LICENSE +0 -0
  24. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/downloads.py +0 -0
  25. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/errors.py +0 -0
  26. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/scrapers/torrentio.py +0 -0
  27. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/tmdb.py +0 -0
  28. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon/tui.py +0 -0
  29. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon_cli.egg-info/dependency_links.txt +0 -0
  30. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon_cli.egg-info/entry_points.txt +0 -0
  31. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/cinnamon_cli.egg-info/top_level.txt +0 -0
  32. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/setup.cfg +0 -0
  33. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/tests/test_directstream.py +0 -0
  34. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/tests/test_directstream2.py +0 -0
  35. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/tests/test_directstream3.py +0 -0
  36. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/tests/test_directstream4.py +0 -0
  37. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/tests/test_directstream5.py +0 -0
  38. {cinnamon_cli-0.2.34 → cinnamon_cli-0.2.38}/tests/test_directstream6.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cinnamon-cli
3
- Version: 0.2.34
4
- Summary: CLI to search TV shows, movies & anime via TMDB/AniList, scrape m3u8 links, and play in VLC/mpv
3
+ Version: 0.2.38
4
+ Summary: Watch Movies, TV shows and anime from your terminal.
5
5
  Author: pizza-droid
6
6
  License: CC BY-NC 4.0
7
7
  Project-URL: Homepage, https://github.com/pizza-droid/cinnamon
@@ -23,6 +23,8 @@ Requires-Dist: questionary>=2
23
23
  Requires-Dist: pycryptodome>=3
24
24
  Provides-Extra: scrapers
25
25
  Requires-Dist: playwright>=1.60; extra == "scrapers"
26
+ Provides-Extra: vidlink
27
+ Requires-Dist: pynacl>=1.5; extra == "vidlink"
26
28
  Provides-Extra: download
27
29
  Requires-Dist: yt-dlp>=2024.1.0; extra == "download"
28
30
  Dynamic: license-file
@@ -47,7 +49,7 @@ pip install cinnamon-cli
47
49
  cinnamon setup
48
50
  ```
49
51
 
50
- > The setup wizard asks for a TMDB API key ([Create a free account here](https://www.themoviedb.org/signup)), the api key is used for show and movie information.
52
+ > The setup wizard asks for a TMDB API key ([Create a free account here](https://www.themoviedb.org/signup)), the api key is used for show and movie information. If you skip it, `search` & `watch` fall back to an **experimental** 2embed metadata proxy (no key needed) — it works but is less reliable.
51
53
 
52
54
 
53
55
 
@@ -117,8 +119,12 @@ cinnamon search "Breaking Bad" -d -e 1-5
117
119
  | `cinnamon watch --id 123 -s 2 -e 5` | Go straight to S2E5 without menus |
118
120
  | `cinnamon play-url <url>` | Play any m3u8/mp4 link |
119
121
  | `cinnamon resume` | Continue an interrupted download |
120
- | `cinnamon history` | Show watch history and resume from the next unwatched episode |
121
- | `cinnamon history --clear` | Clear all watch history |
122
+ | `cinnamon history` | Show watch history |
123
+ | `cinnamon history <query>` | Show episodes played for a show and continue from next |
124
+ | `cinnamon history clear` | Clear all watch history |
125
+ | `cinnamon history toggle [on|off]` | Enable or disable history tracking |
126
+ | `cinnamon config history show` | Show whether history tracking is enabled |
127
+ | `cinnamon config history toggle [on|off]` | Enable or disable via config |
122
128
  | `cinnamon scrapers` | See available streaming sources |
123
129
  | `cinnamon install <name>` | Add an optional scraper (vidsrc, torrentio) |
124
130
  | `cinnamon update` | Check for and install the latest version |
@@ -149,6 +155,7 @@ cinnamon search "Breaking Bad" -d -e 1-5
149
155
  | `webstream` | TV shows & movies from vixsrc.to and vidlink.pro (HLS) |
150
156
  | `anime` | Anime from allanime.day via mp4upload |
151
157
 
158
+
152
159
  **Optional (install with `cinnamon install <name>`):**
153
160
 
154
161
  | Name | Needs |
@@ -177,6 +184,8 @@ cinnamon config set-api-key YOUR_KEY
177
184
 
178
185
  ## Notes
179
186
 
187
+ **Experimental 2embed metadata proxy:** When no TMDB API key is configured, `search` and `watch` fall back to `api.2embed.cc` (no key needed). This works for most popular shows/movies but may be slower, less reliable, or return incomplete results. We reccomend getting a TMDB key for a more reliable experience
188
+
180
189
  This project is mostly vibe coded and our lazy ass didnt even write more than 300 lines.
181
190
  feel free to give us feedback so we can improve this project and make it as good as possible.
182
191
 
@@ -18,7 +18,7 @@ pip install cinnamon-cli
18
18
  cinnamon setup
19
19
  ```
20
20
 
21
- > The setup wizard asks for a TMDB API key ([Create a free account here](https://www.themoviedb.org/signup)), the api key is used for show and movie information.
21
+ > The setup wizard asks for a TMDB API key ([Create a free account here](https://www.themoviedb.org/signup)), the api key is used for show and movie information. If you skip it, `search` & `watch` fall back to an **experimental** 2embed metadata proxy (no key needed) — it works but is less reliable.
22
22
 
23
23
 
24
24
 
@@ -88,8 +88,12 @@ cinnamon search "Breaking Bad" -d -e 1-5
88
88
  | `cinnamon watch --id 123 -s 2 -e 5` | Go straight to S2E5 without menus |
89
89
  | `cinnamon play-url <url>` | Play any m3u8/mp4 link |
90
90
  | `cinnamon resume` | Continue an interrupted download |
91
- | `cinnamon history` | Show watch history and resume from the next unwatched episode |
92
- | `cinnamon history --clear` | Clear all watch history |
91
+ | `cinnamon history` | Show watch history |
92
+ | `cinnamon history <query>` | Show episodes played for a show and continue from next |
93
+ | `cinnamon history clear` | Clear all watch history |
94
+ | `cinnamon history toggle [on|off]` | Enable or disable history tracking |
95
+ | `cinnamon config history show` | Show whether history tracking is enabled |
96
+ | `cinnamon config history toggle [on|off]` | Enable or disable via config |
93
97
  | `cinnamon scrapers` | See available streaming sources |
94
98
  | `cinnamon install <name>` | Add an optional scraper (vidsrc, torrentio) |
95
99
  | `cinnamon update` | Check for and install the latest version |
@@ -120,6 +124,7 @@ cinnamon search "Breaking Bad" -d -e 1-5
120
124
  | `webstream` | TV shows & movies from vixsrc.to and vidlink.pro (HLS) |
121
125
  | `anime` | Anime from allanime.day via mp4upload |
122
126
 
127
+
123
128
  **Optional (install with `cinnamon install <name>`):**
124
129
 
125
130
  | Name | Needs |
@@ -148,6 +153,8 @@ cinnamon config set-api-key YOUR_KEY
148
153
 
149
154
  ## Notes
150
155
 
156
+ **Experimental 2embed metadata proxy:** When no TMDB API key is configured, `search` and `watch` fall back to `api.2embed.cc` (no key needed). This works for most popular shows/movies but may be slower, less reliable, or return incomplete results. We reccomend getting a TMDB key for a more reliable experience
157
+
151
158
  This project is mostly vibe coded and our lazy ass didnt even write more than 300 lines.
152
159
  feel free to give us feedback so we can improve this project and make it as good as possible.
153
160
 
@@ -0,0 +1 @@
1
+ __version__ = "0.2.38"
@@ -0,0 +1,92 @@
1
+ import requests
2
+
3
+ from .errors import CinnamonError
4
+
5
+ API = "https://graphql.anilist.co"
6
+ UA = "cinnamon/0.1.0"
7
+
8
+ _SEARCH_QUERY = """
9
+ query ($search: String, $page: Int) {
10
+ Page(page: $page, perPage: 20) {
11
+ media(search: $search, type: ANIME) {
12
+ id
13
+ idMal
14
+ title { romaji english native }
15
+ episodes
16
+ status
17
+ format
18
+ startDate { year }
19
+ genres
20
+ }
21
+ }
22
+ }
23
+ """
24
+
25
+
26
+ _RELATION_QUERY = """
27
+ query ($search: String) {
28
+ Page(page: 1, perPage: 5) {
29
+ media(search: $search, type: ANIME) {
30
+ id
31
+ title { romaji english }
32
+ relations {
33
+ edges {
34
+ relationType
35
+ node {
36
+ id
37
+ title { romaji english }
38
+ episodes
39
+ status
40
+ format
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ """
48
+
49
+
50
+ def search_anime(query):
51
+ try:
52
+ resp = requests.post(
53
+ API,
54
+ json={"query": _SEARCH_QUERY, "variables": {"search": query, "page": 1}},
55
+ timeout=15,
56
+ headers={"User-Agent": UA, "Content-Type": "application/json", "Accept": "application/json"},
57
+ )
58
+ resp.raise_for_status()
59
+ data = resp.json()
60
+ return data.get("data", {}).get("Page", {}).get("media", [])
61
+ except requests.ConnectionError:
62
+ raise CinnamonError("Could not reach AniList. Check your internet connection.")
63
+ except requests.Timeout:
64
+ raise CinnamonError("AniList request timed out.")
65
+ except requests.HTTPError as e:
66
+ raise CinnamonError(f"AniList returned an error (HTTP {e.response.status_code}).")
67
+
68
+
69
+ def find_sequel(anime_name):
70
+ """Search AniList for an anime and return its first SEQUEL relation, or None."""
71
+ try:
72
+ resp = requests.post(
73
+ API,
74
+ json={"query": _RELATION_QUERY, "variables": {"search": anime_name}},
75
+ timeout=15,
76
+ headers={"User-Agent": UA, "Content-Type": "application/json", "Accept": "application/json"},
77
+ )
78
+ resp.raise_for_status()
79
+ data = resp.json()
80
+ media_list = data.get("data", {}).get("Page", {}).get("media", [])
81
+ for m in media_list:
82
+ edges = m.get("relations", {}).get("edges", [])
83
+ for e in edges:
84
+ if e.get("relationType") == "SEQUEL":
85
+ node = e.get("node", {})
86
+ title = node.get("title", {})
87
+ name = title.get("romaji") or title.get("english") or ""
88
+ if name:
89
+ return {"id": node["id"], "name": name}
90
+ return None
91
+ except (requests.RequestException, CinnamonError):
92
+ return None