emby-cli 0.5.0__tar.gz → 0.5.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.
- {emby_cli-0.5.0 → emby_cli-0.5.2}/.github/workflows/ci.yml +3 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/CHANGELOG.md +25 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/PKG-INFO +41 -38
- {emby_cli-0.5.0 → emby_cli-0.5.2}/README.md +39 -37
- {emby_cli-0.5.0 → emby_cli-0.5.2}/pyproject.toml +14 -3
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/_version.py +2 -2
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/cli.py +1 -5
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/client.py +233 -204
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/download.py +56 -77
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/play.py +4 -8
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/search.py +18 -14
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/show.py +1 -1
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/version.py +5 -1
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/constants.py +1 -1
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/download_ops.py +53 -22
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/mode_args.py +15 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/output.py +2 -1
- emby_cli-0.5.2/src/emby_cli/types.py +123 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/util.py +1 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_client.py +56 -1
- emby_cli-0.5.2/tests/test_client_retry.py +685 -0
- emby_cli-0.5.2/tests/test_download_one.py +133 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_download_ops.py +29 -3
- emby_cli-0.5.2/tests/test_output.py +46 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_play.py +3 -3
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_resolve.py +18 -0
- emby_cli-0.5.2/tests/test_resolve_titles.py +164 -0
- emby_cli-0.5.2/tests/test_search.py +118 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_session_auth.py +35 -33
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_validate_args.py +23 -5
- emby_cli-0.5.0/tests/test_output.py +0 -19
- emby_cli-0.5.0/tests/test_search.py +0 -52
- {emby_cli-0.5.0 → emby_cli-0.5.2}/.env.example +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/.github/workflows/publish.yml +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/.gitignore +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/LICENSE +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/__init__.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/__main__.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/auth_cache.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/__init__.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/config.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/help.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/info.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/login.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/commands/logout.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/credentials.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/resolve.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/src/emby_cli/version.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_auth_cache.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_config.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_credentials.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_download_library.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_info.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_logout.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_parser.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_resolve_table.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_show.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_util.py +0 -0
- {emby_cli-0.5.0 → emby_cli-0.5.2}/tests/test_version.py +1 -1
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.2
|
|
4
|
+
|
|
5
|
+
Changed:
|
|
6
|
+
|
|
7
|
+
- Validation and per-item `error:` messages go to **stderr** (tables and normal progress stay on stdout), so scripts can separate data from failures.
|
|
8
|
+
- `download --dry-run`: planned items count as `ok` in the Done summary (was always `ok=0`).
|
|
9
|
+
- 401 re-authentication is limited to **one attempt per request** (no retry loop if the new token is also rejected).
|
|
10
|
+
|
|
11
|
+
Fixed:
|
|
12
|
+
|
|
13
|
+
- HLS segment downloads retry when the body disconnects mid-stream and overwrite the partial segment.
|
|
14
|
+
- Reauth invalidates the cached session before obtaining a new AccessToken.
|
|
15
|
+
|
|
16
|
+
Internal:
|
|
17
|
+
|
|
18
|
+
- Shared helpers for retries/backoff, pagination, download loop, item-id resolution, and optional request kwargs.
|
|
19
|
+
- TypedDict shapes for Emby API responses; Ruff lint gate in CI.
|
|
20
|
+
- Much stronger automated tests (retry matrix, title resolution, download skip/dry-run, stderr contracts). Editable installs link to `src/` so pytest sees live edits.
|
|
21
|
+
|
|
22
|
+
## 0.5.1
|
|
23
|
+
|
|
24
|
+
- Set HTTP `User-Agent` to `emby-cli/<version>` (clear client identity; replaces the default `python-requests` UA).
|
|
25
|
+
- `search`: when results are capped by `--count`, print `Total: N (out of M)`.
|
|
26
|
+
- README: example tweaks and docs polish.
|
|
27
|
+
|
|
3
28
|
## 0.5.0
|
|
4
29
|
|
|
5
30
|
Breaking:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: emby-cli
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: CLI to list, search, play, and download/backup original media from an Emby server via its REST API.
|
|
5
5
|
Project-URL: Homepage, https://github.com/soukron/emby-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/soukron/emby-cli
|
|
@@ -29,6 +29,7 @@ Requires-Dist: tqdm>=4.66
|
|
|
29
29
|
Provides-Extra: dev
|
|
30
30
|
Requires-Dist: build>=1.0; extra == 'dev'
|
|
31
31
|
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
32
33
|
Requires-Dist: twine>=5.0; extra == 'dev'
|
|
33
34
|
Description-Content-Type: text/markdown
|
|
34
35
|
|
|
@@ -66,7 +67,7 @@ emby-cli info
|
|
|
66
67
|
|
|
67
68
|
```bash
|
|
68
69
|
emby-cli search --item "matrix"
|
|
69
|
-
emby-cli download --item "matrix" --pick-best-item
|
|
70
|
+
emby-cli download --item "matrix (1999)" --pick-best-item
|
|
70
71
|
```
|
|
71
72
|
|
|
72
73
|
Use `emby-cli help` for the command list, and `emby-cli <command> -h` for options.
|
|
@@ -88,7 +89,7 @@ Find movies, episodes, and other media — or list libraries:
|
|
|
88
89
|
|
|
89
90
|
```bash
|
|
90
91
|
emby-cli search --item "fast and furious"
|
|
91
|
-
emby-cli search --item "fast and furious" --count
|
|
92
|
+
emby-cli search --item "fast and furious" --count 5
|
|
92
93
|
emby-cli search --item --id 123456
|
|
93
94
|
emby-cli search --library "peliculas"
|
|
94
95
|
emby-cli search --library --all
|
|
@@ -110,7 +111,7 @@ emby-cli show --library --id 614156
|
|
|
110
111
|
Open a title in an external player (VLC, mpv, IINA, …):
|
|
111
112
|
|
|
112
113
|
```bash
|
|
113
|
-
emby-cli play --item "
|
|
114
|
+
emby-cli play --item "matrix (1999)" --pick-best-item
|
|
114
115
|
emby-cli play --id 123456
|
|
115
116
|
emby-cli play --id 111,222,333
|
|
116
117
|
emby-cli play --id 123456 --player vlc --wait
|
|
@@ -125,8 +126,8 @@ Download a single title, a whole library, or a list of titles from a file:
|
|
|
125
126
|
```bash
|
|
126
127
|
emby-cli download --item --id 123456
|
|
127
128
|
emby-cli download --item --id 111,222,333
|
|
128
|
-
emby-cli download --item "
|
|
129
|
-
emby-cli download --library "
|
|
129
|
+
emby-cli download --item "breaking bad S01E01" --pick-best-item
|
|
130
|
+
emby-cli download --library "peliculas 4k"
|
|
130
131
|
emby-cli download --from-file titles.txt
|
|
131
132
|
```
|
|
132
133
|
|
|
@@ -146,7 +147,7 @@ Useful options:
|
|
|
146
147
|
|
|
147
148
|
- `Movie (2010)`
|
|
148
149
|
- `Show S01E05`
|
|
149
|
-
- `Show S01` — whole season
|
|
150
|
+
- `Show S01` — whole season
|
|
150
151
|
|
|
151
152
|
By default, matching is **strict**: a wrong year or several ambiguous results stops with a table of candidates. Add `--pick-best-item` to choose automatically (best quality up to 1080p).
|
|
152
153
|
|
|
@@ -156,11 +157,11 @@ Library downloads match the library **name** (case-insensitive, unique match req
|
|
|
156
157
|
|
|
157
158
|
## Logging in and switching servers
|
|
158
159
|
|
|
159
|
-
| Approach
|
|
160
|
-
|
|
161
|
-
| `emby-cli login` | Recommended — saves a session and remembers the server
|
|
162
|
-
| API key
|
|
163
|
-
| Flags / env
|
|
160
|
+
| Approach | When to use |
|
|
161
|
+
| ---------------- | ------------------------------------------------------------------ |
|
|
162
|
+
| `emby-cli login` | Recommended — saves a session and remembers the server |
|
|
163
|
+
| API key | `--api-key` / `EMBY_API_KEY` (keys are not stored by `login`) |
|
|
164
|
+
| Flags / env | `--server`, `--username`, `--password` or `EMBY_*` for one-off use |
|
|
164
165
|
|
|
165
166
|
Manage saved servers:
|
|
166
167
|
|
|
@@ -180,11 +181,11 @@ Sessions live under `~/.cache/emby-cli/auth.json` (override with `EMBY_CACHE_DIR
|
|
|
180
181
|
|
|
181
182
|
Choose with `-m` / `EMBY_METHOD`:
|
|
182
183
|
|
|
183
|
-
| Method
|
|
184
|
-
|
|
185
|
-
| `download` (default) | Normal file download from Emby
|
|
186
|
-
| `stream`
|
|
187
|
-
| `hls`
|
|
184
|
+
| Method | Best for |
|
|
185
|
+
| -------------------- | --------------------------------------- |
|
|
186
|
+
| `download` (default) | Normal file download from Emby |
|
|
187
|
+
| `stream` | Direct stream URL (similar to Emby Web) |
|
|
188
|
+
| `hls` | HLS remux to `.mkv` |
|
|
188
189
|
|
|
189
190
|
---
|
|
190
191
|
|
|
@@ -192,17 +193,17 @@ Choose with `-m` / `EMBY_METHOD`:
|
|
|
192
193
|
|
|
193
194
|
Flags override environment variables. Optional template: `.env.example` (export the vars yourself — the CLI does not load `.env` files).
|
|
194
195
|
|
|
195
|
-
| Variable
|
|
196
|
-
|
|
197
|
-
| `EMBY_SERVER`
|
|
198
|
-
| `EMBY_API_KEY`
|
|
199
|
-
| `EMBY_USERNAME` / `EMBY_PASSWORD` | Username / password
|
|
200
|
-
| `EMBY_OUTPUT`
|
|
201
|
-
| `EMBY_METHOD`
|
|
202
|
-
| `EMBY_PLAYER`
|
|
203
|
-
| `EMBY_ITEM_ID`
|
|
204
|
-
| `EMBY_CACHE_DIR`
|
|
205
|
-
| `EMBY_NO_AUTH_CACHE`
|
|
196
|
+
| Variable | Description |
|
|
197
|
+
| --------------------------------- | --------------------------------------------------- |
|
|
198
|
+
| `EMBY_SERVER` | Server URL |
|
|
199
|
+
| `EMBY_API_KEY` | API key |
|
|
200
|
+
| `EMBY_USERNAME` / `EMBY_PASSWORD` | Username / password |
|
|
201
|
+
| `EMBY_OUTPUT` | Download directory (default `./downloads`) |
|
|
202
|
+
| `EMBY_METHOD` | `download`, `stream`, or `hls` |
|
|
203
|
+
| `EMBY_PLAYER` | External player command or path |
|
|
204
|
+
| `EMBY_ITEM_ID` | Default `--id` for item download / play |
|
|
205
|
+
| `EMBY_CACHE_DIR` | Credentials directory (default `~/.cache/emby-cli`) |
|
|
206
|
+
| `EMBY_NO_AUTH_CACHE` | `1` = disable session cache |
|
|
206
207
|
|
|
207
208
|
---
|
|
208
209
|
|
|
@@ -210,19 +211,11 @@ Flags override environment variables. Optional template: `.env.example` (export
|
|
|
210
211
|
|
|
211
212
|
- Prefer **search → show → download** when you are unsure of the exact title.
|
|
212
213
|
- Prefer **IDs** (`--id`) when you already have them — no ambiguity.
|
|
213
|
-
- Use
|
|
214
|
+
- Use `--dry-run` before a large library or file-list download.
|
|
214
215
|
- Content totals in `info` can count multiple versions of the same title separately.
|
|
215
216
|
|
|
216
217
|
---
|
|
217
218
|
|
|
218
|
-
## Responsible use
|
|
219
|
-
|
|
220
|
-
This tool talks to Emby over its normal HTTP API. Whether download or playback is allowed depends on **how that server is configured** and on **the terms set by whoever runs it**.
|
|
221
|
-
|
|
222
|
-
Use `emby-cli` only on servers you are authorized to access, and only in ways that comply with that server’s terms of use, policies, and applicable law. The authors provide the software as-is and are **not responsible** for misuse, for downloads from servers that disallow them, or for any consequences of using the tool.
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
219
|
## For contributors
|
|
227
220
|
|
|
228
221
|
```bash
|
|
@@ -232,7 +225,17 @@ pytest -q
|
|
|
232
225
|
python -m build && twine check dist/*
|
|
233
226
|
```
|
|
234
227
|
|
|
235
|
-
Releases: tag `vX.Y.Z` and push
|
|
228
|
+
Releases: tag `vX.Y.Z` and push. CI publishes to PyPI via Trusted Publisher.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Responsible use
|
|
233
|
+
|
|
234
|
+
This tool talks to Emby over its normal HTTP API. Whether download or playback is allowed depends on **how that server is configured** and on **the terms set by whoever runs it**.
|
|
235
|
+
|
|
236
|
+
Use `emby-cli` only on servers you are authorized to access, and only in ways that comply with that server’s terms of use, policies, and applicable law. The authors provide the software as-is and are **not responsible** for misuse, for downloads from servers that disallow them, or for any consequences of using the tool.
|
|
237
|
+
|
|
238
|
+
---
|
|
236
239
|
|
|
237
240
|
## License
|
|
238
241
|
|
|
@@ -32,7 +32,7 @@ emby-cli info
|
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
emby-cli search --item "matrix"
|
|
35
|
-
emby-cli download --item "matrix" --pick-best-item
|
|
35
|
+
emby-cli download --item "matrix (1999)" --pick-best-item
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
Use `emby-cli help` for the command list, and `emby-cli <command> -h` for options.
|
|
@@ -54,7 +54,7 @@ Find movies, episodes, and other media — or list libraries:
|
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
emby-cli search --item "fast and furious"
|
|
57
|
-
emby-cli search --item "fast and furious" --count
|
|
57
|
+
emby-cli search --item "fast and furious" --count 5
|
|
58
58
|
emby-cli search --item --id 123456
|
|
59
59
|
emby-cli search --library "peliculas"
|
|
60
60
|
emby-cli search --library --all
|
|
@@ -76,7 +76,7 @@ emby-cli show --library --id 614156
|
|
|
76
76
|
Open a title in an external player (VLC, mpv, IINA, …):
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
emby-cli play --item "
|
|
79
|
+
emby-cli play --item "matrix (1999)" --pick-best-item
|
|
80
80
|
emby-cli play --id 123456
|
|
81
81
|
emby-cli play --id 111,222,333
|
|
82
82
|
emby-cli play --id 123456 --player vlc --wait
|
|
@@ -91,8 +91,8 @@ Download a single title, a whole library, or a list of titles from a file:
|
|
|
91
91
|
```bash
|
|
92
92
|
emby-cli download --item --id 123456
|
|
93
93
|
emby-cli download --item --id 111,222,333
|
|
94
|
-
emby-cli download --item "
|
|
95
|
-
emby-cli download --library "
|
|
94
|
+
emby-cli download --item "breaking bad S01E01" --pick-best-item
|
|
95
|
+
emby-cli download --library "peliculas 4k"
|
|
96
96
|
emby-cli download --from-file titles.txt
|
|
97
97
|
```
|
|
98
98
|
|
|
@@ -112,7 +112,7 @@ Useful options:
|
|
|
112
112
|
|
|
113
113
|
- `Movie (2010)`
|
|
114
114
|
- `Show S01E05`
|
|
115
|
-
- `Show S01` — whole season
|
|
115
|
+
- `Show S01` — whole season
|
|
116
116
|
|
|
117
117
|
By default, matching is **strict**: a wrong year or several ambiguous results stops with a table of candidates. Add `--pick-best-item` to choose automatically (best quality up to 1080p).
|
|
118
118
|
|
|
@@ -122,11 +122,11 @@ Library downloads match the library **name** (case-insensitive, unique match req
|
|
|
122
122
|
|
|
123
123
|
## Logging in and switching servers
|
|
124
124
|
|
|
125
|
-
| Approach
|
|
126
|
-
|
|
127
|
-
| `emby-cli login` | Recommended — saves a session and remembers the server
|
|
128
|
-
| API key
|
|
129
|
-
| Flags / env
|
|
125
|
+
| Approach | When to use |
|
|
126
|
+
| ---------------- | ------------------------------------------------------------------ |
|
|
127
|
+
| `emby-cli login` | Recommended — saves a session and remembers the server |
|
|
128
|
+
| API key | `--api-key` / `EMBY_API_KEY` (keys are not stored by `login`) |
|
|
129
|
+
| Flags / env | `--server`, `--username`, `--password` or `EMBY_*` for one-off use |
|
|
130
130
|
|
|
131
131
|
Manage saved servers:
|
|
132
132
|
|
|
@@ -146,11 +146,11 @@ Sessions live under `~/.cache/emby-cli/auth.json` (override with `EMBY_CACHE_DIR
|
|
|
146
146
|
|
|
147
147
|
Choose with `-m` / `EMBY_METHOD`:
|
|
148
148
|
|
|
149
|
-
| Method
|
|
150
|
-
|
|
151
|
-
| `download` (default) | Normal file download from Emby
|
|
152
|
-
| `stream`
|
|
153
|
-
| `hls`
|
|
149
|
+
| Method | Best for |
|
|
150
|
+
| -------------------- | --------------------------------------- |
|
|
151
|
+
| `download` (default) | Normal file download from Emby |
|
|
152
|
+
| `stream` | Direct stream URL (similar to Emby Web) |
|
|
153
|
+
| `hls` | HLS remux to `.mkv` |
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
@@ -158,17 +158,17 @@ Choose with `-m` / `EMBY_METHOD`:
|
|
|
158
158
|
|
|
159
159
|
Flags override environment variables. Optional template: `.env.example` (export the vars yourself — the CLI does not load `.env` files).
|
|
160
160
|
|
|
161
|
-
| Variable
|
|
162
|
-
|
|
163
|
-
| `EMBY_SERVER`
|
|
164
|
-
| `EMBY_API_KEY`
|
|
165
|
-
| `EMBY_USERNAME` / `EMBY_PASSWORD` | Username / password
|
|
166
|
-
| `EMBY_OUTPUT`
|
|
167
|
-
| `EMBY_METHOD`
|
|
168
|
-
| `EMBY_PLAYER`
|
|
169
|
-
| `EMBY_ITEM_ID`
|
|
170
|
-
| `EMBY_CACHE_DIR`
|
|
171
|
-
| `EMBY_NO_AUTH_CACHE`
|
|
161
|
+
| Variable | Description |
|
|
162
|
+
| --------------------------------- | --------------------------------------------------- |
|
|
163
|
+
| `EMBY_SERVER` | Server URL |
|
|
164
|
+
| `EMBY_API_KEY` | API key |
|
|
165
|
+
| `EMBY_USERNAME` / `EMBY_PASSWORD` | Username / password |
|
|
166
|
+
| `EMBY_OUTPUT` | Download directory (default `./downloads`) |
|
|
167
|
+
| `EMBY_METHOD` | `download`, `stream`, or `hls` |
|
|
168
|
+
| `EMBY_PLAYER` | External player command or path |
|
|
169
|
+
| `EMBY_ITEM_ID` | Default `--id` for item download / play |
|
|
170
|
+
| `EMBY_CACHE_DIR` | Credentials directory (default `~/.cache/emby-cli`) |
|
|
171
|
+
| `EMBY_NO_AUTH_CACHE` | `1` = disable session cache |
|
|
172
172
|
|
|
173
173
|
---
|
|
174
174
|
|
|
@@ -176,19 +176,11 @@ Flags override environment variables. Optional template: `.env.example` (export
|
|
|
176
176
|
|
|
177
177
|
- Prefer **search → show → download** when you are unsure of the exact title.
|
|
178
178
|
- Prefer **IDs** (`--id`) when you already have them — no ambiguity.
|
|
179
|
-
- Use
|
|
179
|
+
- Use `--dry-run` before a large library or file-list download.
|
|
180
180
|
- Content totals in `info` can count multiple versions of the same title separately.
|
|
181
181
|
|
|
182
182
|
---
|
|
183
183
|
|
|
184
|
-
## Responsible use
|
|
185
|
-
|
|
186
|
-
This tool talks to Emby over its normal HTTP API. Whether download or playback is allowed depends on **how that server is configured** and on **the terms set by whoever runs it**.
|
|
187
|
-
|
|
188
|
-
Use `emby-cli` only on servers you are authorized to access, and only in ways that comply with that server’s terms of use, policies, and applicable law. The authors provide the software as-is and are **not responsible** for misuse, for downloads from servers that disallow them, or for any consequences of using the tool.
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
184
|
## For contributors
|
|
193
185
|
|
|
194
186
|
```bash
|
|
@@ -198,7 +190,17 @@ pytest -q
|
|
|
198
190
|
python -m build && twine check dist/*
|
|
199
191
|
```
|
|
200
192
|
|
|
201
|
-
Releases: tag `vX.Y.Z` and push
|
|
193
|
+
Releases: tag `vX.Y.Z` and push. CI publishes to PyPI via Trusted Publisher.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Responsible use
|
|
198
|
+
|
|
199
|
+
This tool talks to Emby over its normal HTTP API. Whether download or playback is allowed depends on **how that server is configured** and on **the terms set by whoever runs it**.
|
|
200
|
+
|
|
201
|
+
Use `emby-cli` only on servers you are authorized to access, and only in ways that comply with that server’s terms of use, policies, and applicable law. The authors provide the software as-is and are **not responsible** for misuse, for downloads from servers that disallow them, or for any consequences of using the tool.
|
|
202
|
+
|
|
203
|
+
---
|
|
202
204
|
|
|
203
205
|
## License
|
|
204
206
|
|
|
@@ -47,16 +47,17 @@ dev = [
|
|
|
47
47
|
"pytest>=8.0",
|
|
48
48
|
"build>=1.0",
|
|
49
49
|
"twine>=5.0",
|
|
50
|
+
"ruff",
|
|
50
51
|
]
|
|
51
52
|
|
|
52
53
|
[project.scripts]
|
|
53
54
|
emby-cli = "emby_cli.cli:main"
|
|
54
55
|
|
|
55
56
|
[tool.hatch.build.targets.wheel]
|
|
56
|
-
|
|
57
|
+
packages = ["src/emby_cli"]
|
|
57
58
|
|
|
58
|
-
[tool.hatch.build
|
|
59
|
-
|
|
59
|
+
[tool.hatch.build]
|
|
60
|
+
dev-mode-dirs = ["src"]
|
|
60
61
|
|
|
61
62
|
[tool.hatch.version]
|
|
62
63
|
source = "vcs"
|
|
@@ -66,3 +67,13 @@ version-file = "src/emby_cli/_version.py"
|
|
|
66
67
|
|
|
67
68
|
[tool.pytest.ini_options]
|
|
68
69
|
testpaths = ["tests"]
|
|
70
|
+
pythonpath = ["src"]
|
|
71
|
+
|
|
72
|
+
[tool.ruff]
|
|
73
|
+
target-version = "py39"
|
|
74
|
+
|
|
75
|
+
[tool.ruff.lint]
|
|
76
|
+
select = ["E4", "E7", "E9", "F", "I", "B", "UP"]
|
|
77
|
+
|
|
78
|
+
[tool.ruff.lint.per-file-ignores]
|
|
79
|
+
"src/emby_cli/cli.py" = ["E402"] # warnings.filterwarnings antes de import requests (intencional)
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.5.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 5,
|
|
21
|
+
__version__ = version = '0.5.2'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 5, 2)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -30,7 +30,6 @@ from emby_cli.credentials import (
|
|
|
30
30
|
resolve_server,
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
|
|
34
33
|
_FORCE_HELP = "Re-download even if local file already matches"
|
|
35
34
|
|
|
36
35
|
|
|
@@ -340,10 +339,7 @@ def main() -> None:
|
|
|
340
339
|
|
|
341
340
|
err = _validate_command_args(args.command, args)
|
|
342
341
|
if err:
|
|
343
|
-
|
|
344
|
-
print(err, file=sys.stderr)
|
|
345
|
-
else:
|
|
346
|
-
print(err)
|
|
342
|
+
print(err, file=sys.stderr)
|
|
347
343
|
sys.exit(1)
|
|
348
344
|
|
|
349
345
|
client = _open_client(args)
|