sdm-pycli 2.1.0__tar.gz → 2.1.1__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.
@@ -1,250 +1,250 @@
1
- Metadata-Version: 2.4
2
- Name: sdm-pycli
3
- Version: 2.1.0
4
- Summary: A fast, zero-config CLI tool to download and sync playlists from Spotify, Apple Music, Tidal, YouTube, and SoundCloud.
5
- Author: Antares699
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/Antares699/sdm
8
- Project-URL: Bug Tracker, https://github.com/Antares699/sdm/issues
9
- Keywords: spotify,apple-music,tidal,youtube,soundcloud,download,sync,music,cli
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: License :: OSI Approved :: MIT License
12
- Classifier: Operating System :: OS Independent
13
- Classifier: Environment :: Console
14
- Requires-Python: >=3.8
15
- Description-Content-Type: text/markdown
16
- License-File: LICENSE
17
- Requires-Dist: yt-dlp>=2024.03.10
18
- Requires-Dist: mutagen>=1.47.0
19
- Requires-Dist: requests>=2.31.0
20
- Requires-Dist: rich>=13.7.1
21
- Requires-Dist: typer>=0.12.0
22
- Requires-Dist: imageio-ffmpeg>=0.4.9
23
- Requires-Dist: ytmusicapi>=1.5.0
24
- Requires-Dist: spotapi>=1.2.0
25
- Requires-Dist: Pillow>=9.0.0
26
- Dynamic: license-file
27
-
28
- # SDM - SDM Downloads Music
29
-
30
- `sdm` is a fast, lightweight, and zero-config CLI tool to download and sync Playlists, Albums, and Tracks from **Spotify, Apple Music, Tidal, YouTube, and SoundCloud**.
31
-
32
- ## Why sdm?
33
-
34
- Recently, Spotify restricted their Web API, requiring developers to have a Premium subscription, which broke popular open-source tools with `403 Forbidden` errors.
35
-
36
- `sdm` was built to completely bypass these restrictions. It uses native web scraping to extract flawless metadata directly from streaming services, pairs it with `yt-dlp` to fetch the highest-quality audio, and embeds the tags natively. No API keys required.
37
-
38
- ## Features
39
-
40
- - **Universal Support:** Spotify, Apple Music, Tidal, YouTube, and SoundCloud.
41
- - **Smart Syncing:** Two-way mirroring. Run `sdm sync` to fetch new tracks and clean up removed ones.
42
- - **Multi-Format:** Download in M4A (default), MP3, FLAC, or OPUS with native tags.
43
- - **Perfect Metadata:** Embeds Track, Artist, Album, Cover Art, Track/Disc Numbers, Genre, Release Year, and automatically generates `.m3u8` playlists.
44
- - **Advanced Processing:** Synced lyrics via LRCLIB, custom 2-pass EBU R128 (-14 LUFS) audio normalization algorithm for perfectly balanced studio-grade levels without dynamic range compression artifacts, and SponsorBlock trimming.
45
-
46
- ## Installation
47
-
48
- You must have [Python 3.8+](https://www.python.org/downloads/) installed on your system.
49
- *(Windows users: Make sure to check the "Add Python to PATH" box during installation!)*
50
-
51
- Install directly from PyPI:
52
-
53
- ```bash
54
- pip install sdm-pycli
55
- ```
56
-
57
- ## Usage
58
-
59
- Open a terminal in the folder where you want your music saved, then run the commands below.
60
-
61
- ### Playlist
62
-
63
- To download a playlist, run
64
-
65
- ```bash
66
- sdm download [playlistUrl]
67
- ```
68
-
69
- Example:
70
-
71
- ```bash
72
- sdm download https://open.spotify.com/playlist/37i9dQZF1E8NjgPSXnmGkI?si=O0kgUaFcQnatcvlZzS9yJw
73
- ```
74
-
75
- ### Album
76
-
77
- To download an album, run
78
-
79
- ```bash
80
- sdm download [albumUrl]
81
- ```
82
-
83
- Example:
84
-
85
- ```bash
86
- sdm download https://open.spotify.com/album/6eUW0wxWtzkFdaEFsTJto6?si=nYD6g_tZQvuFsMzyKG2sRA
87
- ```
88
-
89
- ### Track
90
-
91
- To download a single track, run
92
-
93
- ```bash
94
- sdm download [trackUrl]
95
- ```
96
-
97
- Example:
98
-
99
- ```bash
100
- sdm download https://open.spotify.com/track/4PTG3Z6ehGkBFwjybzWkR8?si=1d83934b63464e9e
101
- ```
102
-
103
- ### Apple Music
104
-
105
- Apple Music albums, playlists, and songs are also supported.
106
-
107
- ```bash
108
- sdm download https://music.apple.com/us/album/starboy/1440871397
109
- ```
110
-
111
- ### Sync
112
-
113
- `sdm` remembers the source URL for each folder. To update a previously downloaded folder with any changes from the remote playlist, run
114
-
115
- ```bash
116
- sdm sync [directory]
117
- ```
118
-
119
- Example:
120
-
121
- ```bash
122
- sdm sync "C:\Users\You\Music\My Playlist"
123
- ```
124
-
125
- ### Inject
126
-
127
- To import a local audio file into your playlist with official metadata and protect it from future sync deletions, run
128
-
129
- ```bash
130
- sdm inject [filePath] [trackUrl (Optional)]
131
- ```
132
-
133
- If the `trackUrl` is omitted, `sdm` will launch an interactive search menu to help you find and apply metadata (including Last.fm enrichment and high-resolution cover art).
134
-
135
- Example:
136
-
137
- ```bash
138
- sdm inject "C:\Users\You\Downloads\song.mp3"
139
- ```
140
-
141
- ### Config
142
-
143
- You can set persistent default options (like format, workers, or API keys) so you never have to type them again:
144
-
145
- ```bash
146
- sdm config --format flac --workers 5 --lastfm-key "YOUR_API_KEY"
147
- ```
148
-
149
- ### Tag
150
-
151
- To recursively scan an existing local directory and enrich the audio files with extensive Last.fm metadata (Genres, Track Bios, and MusicBrainz IDs) without redownloading them, run:
152
-
153
- ```bash
154
- sdm tag [directory]
155
- ```
156
-
157
- Example:
158
-
159
- ```bash
160
- sdm tag "C:\Users\You\Music\My Playlist"
161
- ```
162
-
163
- ### Search
164
-
165
- To search and download a single track directly from YouTube Music, run
166
-
167
- ```bash
168
- sdm search [query]
169
- ```
170
-
171
- Example:
172
-
173
- ```bash
174
- sdm search "Never Gonna Give You Up - Rick Astley"
175
- ```
176
-
177
- ### Stats
178
-
179
- To show comprehensive statistics for your local library (such as track count, total size, format distribution, Top Genres, Top Artists, and Decades), run
180
-
181
- ```bash
182
- sdm stats [directory]
183
- ```
184
-
185
- This command also runs a Health Check, warning you if any files are missing cover art or have a bitrate below 128kbps. Add the `-v` or `--verbose` flag to print a detailed list of problematic files.
186
-
187
- Example:
188
-
189
- ```bash
190
- sdm stats "C:\Users\You\Music" -v
191
- ```
192
-
193
- ### Migrate
194
-
195
- To bulk convert a downloaded library to a different audio format (multithreaded for significantly faster processing), run
196
-
197
- ```bash
198
- sdm migrate --dir [directory] [target_format] -w [workers]
199
- ```
200
-
201
- Example:
202
-
203
- ```bash
204
- sdm migrate --dir "C:\Users\You\Music\FLAC Library" opus -w 5
205
- ```
206
-
207
- ## Options & Flags
208
-
209
- | Flag | Description |
210
- |---|---|
211
- | `-o, --output` | Save to a specific directory |
212
- | `-f, --format` | Audio format: `m4a`, `mp3`, `flac`, `opus` (default: `m4a`) |
213
- | `-w, --workers` | Number of concurrent downloads or migrations (default: `3`) |
214
- | `-v, --verbose` | Show detailed list of tracks with warnings during `stats` |
215
- | `--cleanup` | Run sync cleanup logic on a standard download to remove orphaned files |
216
- | `--index` | Manually override the track index number when injecting a file |
217
- | `--dir` | Target directory for the migrate and stats commands |
218
- | `--lyrics` | Fetch and embed synced lyrics from LRCLIB |
219
- | `--resize-covers` | Resize high-res cover art to 600x600px to save storage space |
220
- | `--normalize` | Apply custom 2-pass EBU R128 (-14 LUFS) volume normalization |
221
- | `--sponsor-block` | Trim non-music sections from YouTube sources |
222
- | `--dry-run` | Simulate a sync/download without making changes |
223
- | `--no-delete` | Download new tracks but never delete local files |
224
- | `--refresh-metadata` | Re-tag existing files with the latest metadata (alias: `--refresh`) |
225
- | `--cookies` | Pass browser cookies for age-restricted content |
226
- | `--lastfm-key` | Enable extensive track-level genres and wiki summaries via Last.fm API |
227
- | `--version` | Show the version and exit |
228
-
229
- Example with flags:
230
-
231
- ```bash
232
- sdm download https://open.spotify.com/playlist/37i9dQZF1E8UXBoz02kGID -f flac --lyrics --normalize
233
- ```
234
-
235
- ## Music Sourcing & Audio Quality
236
-
237
- `sdm` fetches flawless metadata (tags, cover art, tracklists) directly from Spotify, Apple Music, and Tidal, but sources the actual audio streams from YouTube.
238
-
239
- Unlike other tools that require your Premium credentials and risk permanent account bans by ripping directly from encrypted servers, `sdm` acts as a safe, unauthenticated metadata matcher. It reliably delivers DRM-free audio (up to 256kbps AAC or Opus) perfectly packaged to match the original release.
240
-
241
-
242
- ## Legal Disclaimer
243
-
244
- *Users are responsible for their actions. We do not support unauthorized downloading of copyrighted material. `sdm` is open-source (MIT License) for educational and personal use only.*
245
-
246
- ---
247
-
248
- **Important Notes:**
249
- - **Spotify Playlists** must be set to **Public**. Private playlists and personalized mixes will not work.
250
- - **Explicit Content:** If YouTube blocks downloads, pass browser cookies with `--cookies firefox`. Firefox is recommended.
1
+ Metadata-Version: 2.4
2
+ Name: sdm-pycli
3
+ Version: 2.1.1
4
+ Summary: A fast, zero-config CLI tool to download and sync playlists from Spotify, Apple Music, Tidal, YouTube, and SoundCloud.
5
+ Author: Antares699
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Antares699/sdm
8
+ Project-URL: Bug Tracker, https://github.com/Antares699/sdm/issues
9
+ Keywords: spotify,apple-music,tidal,youtube,soundcloud,download,sync,music,cli
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Environment :: Console
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: yt-dlp>=2024.03.10
18
+ Requires-Dist: mutagen>=1.47.0
19
+ Requires-Dist: requests>=2.31.0
20
+ Requires-Dist: rich>=13.7.1
21
+ Requires-Dist: typer>=0.12.0
22
+ Requires-Dist: imageio-ffmpeg>=0.4.9
23
+ Requires-Dist: ytmusicapi>=1.5.0
24
+ Requires-Dist: spotapi>=1.2.0
25
+ Requires-Dist: Pillow>=9.0.0
26
+ Dynamic: license-file
27
+
28
+ # SDM - SDM Downloads Music
29
+
30
+ `sdm` is a fast, lightweight, and zero-config CLI tool to download and sync Playlists, Albums, and Tracks from **Spotify, Apple Music, Tidal, YouTube, and SoundCloud**.
31
+
32
+ ## Why sdm?
33
+
34
+ Recently, Spotify restricted their Web API, requiring developers to have a Premium subscription, which broke popular open-source tools with `403 Forbidden` errors.
35
+
36
+ `sdm` was built to completely bypass these restrictions. It uses native web scraping to extract flawless metadata directly from streaming services, pairs it with `yt-dlp` to fetch the highest-quality audio, and embeds the tags natively. No API keys required.
37
+
38
+ ## Features
39
+
40
+ - **Universal Support:** Spotify, Apple Music, Tidal, YouTube, and SoundCloud.
41
+ - **Smart Syncing:** Two-way mirroring. Run `sdm sync` to fetch new tracks and clean up removed ones.
42
+ - **Multi-Format:** Download in M4A (default), MP3, FLAC, or OPUS with native tags.
43
+ - **Perfect Metadata:** Embeds Track, Artist, Album, Cover Art, Track/Disc Numbers, Genre, Release Year, and automatically generates `.m3u8` playlists.
44
+ - **Advanced Processing:** Synced lyrics via LRCLIB, custom 2-pass EBU R128 (-14 LUFS) audio normalization algorithm for perfectly balanced studio-grade levels without dynamic range compression artifacts, and SponsorBlock trimming.
45
+
46
+ ## Installation
47
+
48
+ You must have [Python 3.8+](https://www.python.org/downloads/) installed on your system.
49
+ *(Windows users: Make sure to check the "Add Python to PATH" box during installation!)*
50
+
51
+ Install directly from PyPI:
52
+
53
+ ```bash
54
+ pip install sdm-pycli
55
+ ```
56
+
57
+ ## Usage
58
+
59
+ Open a terminal in the folder where you want your music saved, then run the commands below.
60
+
61
+ ### Playlist
62
+
63
+ To download a playlist, run
64
+
65
+ ```bash
66
+ sdm download [playlistUrl]
67
+ ```
68
+
69
+ Example:
70
+
71
+ ```bash
72
+ sdm download https://open.spotify.com/playlist/37i9dQZF1E8NjgPSXnmGkI?si=O0kgUaFcQnatcvlZzS9yJw
73
+ ```
74
+
75
+ ### Album
76
+
77
+ To download an album, run
78
+
79
+ ```bash
80
+ sdm download [albumUrl]
81
+ ```
82
+
83
+ Example:
84
+
85
+ ```bash
86
+ sdm download https://open.spotify.com/album/6eUW0wxWtzkFdaEFsTJto6?si=nYD6g_tZQvuFsMzyKG2sRA
87
+ ```
88
+
89
+ ### Track
90
+
91
+ To download a single track, run
92
+
93
+ ```bash
94
+ sdm download [trackUrl]
95
+ ```
96
+
97
+ Example:
98
+
99
+ ```bash
100
+ sdm download https://open.spotify.com/track/4PTG3Z6ehGkBFwjybzWkR8?si=1d83934b63464e9e
101
+ ```
102
+
103
+ ### Apple Music
104
+
105
+ Apple Music albums, playlists, and songs are also supported.
106
+
107
+ ```bash
108
+ sdm download https://music.apple.com/us/album/starboy/1440871397
109
+ ```
110
+
111
+ ### Sync
112
+
113
+ `sdm` remembers the source URL for each folder. To update a previously downloaded folder with any changes from the remote playlist, run
114
+
115
+ ```bash
116
+ sdm sync [directory]
117
+ ```
118
+
119
+ Example:
120
+
121
+ ```bash
122
+ sdm sync "C:\Users\You\Music\My Playlist"
123
+ ```
124
+
125
+ ### Inject
126
+
127
+ To import a local audio file into your playlist with official metadata and protect it from future sync deletions, run
128
+
129
+ ```bash
130
+ sdm inject [filePath] [trackUrl (Optional)]
131
+ ```
132
+
133
+ If the `trackUrl` is omitted, `sdm` will launch an interactive search menu to help you find and apply metadata (including Last.fm enrichment and high-resolution cover art).
134
+
135
+ Example:
136
+
137
+ ```bash
138
+ sdm inject "C:\Users\You\Downloads\song.mp3"
139
+ ```
140
+
141
+ ### Config
142
+
143
+ You can set persistent default options (like format, workers, or API keys) so you never have to type them again:
144
+
145
+ ```bash
146
+ sdm config --format flac --workers 5 --lastfm-key "YOUR_API_KEY"
147
+ ```
148
+
149
+ ### Tag
150
+
151
+ To recursively scan an existing local directory and enrich the audio files with extensive Last.fm metadata (Genres, Track Bios, and MusicBrainz IDs) without redownloading them, run:
152
+
153
+ ```bash
154
+ sdm tag [directory]
155
+ ```
156
+
157
+ Example:
158
+
159
+ ```bash
160
+ sdm tag "C:\Users\You\Music\My Playlist"
161
+ ```
162
+
163
+ ### Search
164
+
165
+ To search and download a single track directly from YouTube Music, run
166
+
167
+ ```bash
168
+ sdm search [query]
169
+ ```
170
+
171
+ Example:
172
+
173
+ ```bash
174
+ sdm search "Never Gonna Give You Up - Rick Astley"
175
+ ```
176
+
177
+ ### Stats
178
+
179
+ To show comprehensive statistics for your local library (such as track count, total size, format distribution, Top Genres, Top Artists, and Decades), run
180
+
181
+ ```bash
182
+ sdm stats [directory]
183
+ ```
184
+
185
+ This command also runs a Health Check, warning you if any files are missing cover art or have a bitrate below 128kbps. Add the `-v` or `--verbose` flag to print a detailed list of problematic files.
186
+
187
+ Example:
188
+
189
+ ```bash
190
+ sdm stats "C:\Users\You\Music" -v
191
+ ```
192
+
193
+ ### Migrate
194
+
195
+ To bulk convert a downloaded library to a different audio format (multithreaded for significantly faster processing), run
196
+
197
+ ```bash
198
+ sdm migrate --dir [directory] [target_format] -w [workers]
199
+ ```
200
+
201
+ Example:
202
+
203
+ ```bash
204
+ sdm migrate --dir "C:\Users\You\Music\FLAC Library" opus -w 5
205
+ ```
206
+
207
+ ## Options & Flags
208
+
209
+ | Flag | Description |
210
+ |---|---|
211
+ | `-o, --output` | Save to a specific directory |
212
+ | `-f, --format` | Audio format: `m4a`, `mp3`, `flac`, `opus` (default: `m4a`) |
213
+ | `-w, --workers` | Number of concurrent downloads or migrations (default: `3`) |
214
+ | `-v, --verbose` | Show detailed list of tracks with warnings during `stats` |
215
+ | `--cleanup` | Run sync cleanup logic on a standard download to remove orphaned files |
216
+ | `--index` | Manually override the track index number when injecting a file |
217
+ | `--dir` | Target directory for the migrate and stats commands |
218
+ | `--lyrics` | Fetch and embed synced lyrics from LRCLIB |
219
+ | `--resize-covers` | Resize high-res cover art to 600x600px to save storage space |
220
+ | `--normalize` | Apply custom 2-pass EBU R128 (-14 LUFS) volume normalization |
221
+ | `--sponsor-block` | Trim non-music sections from YouTube sources |
222
+ | `--dry-run` | Simulate a sync/download without making changes |
223
+ | `--no-delete` | Download new tracks but never delete local files |
224
+ | `--refresh-metadata` | Re-tag existing files with the latest metadata (alias: `--refresh`) |
225
+ | `--cookies` | Pass browser cookies for age-restricted content |
226
+ | `--lastfm-key` | Enable extensive track-level genres and wiki summaries via Last.fm API |
227
+ | `--version` | Show the version and exit |
228
+
229
+ Example with flags:
230
+
231
+ ```bash
232
+ sdm download https://open.spotify.com/playlist/37i9dQZF1E8UXBoz02kGID -f flac --lyrics --normalize
233
+ ```
234
+
235
+ ## Music Sourcing & Audio Quality
236
+
237
+ `sdm` fetches flawless metadata (tags, cover art, tracklists) directly from Spotify, Apple Music, and Tidal, but sources the actual audio streams from YouTube.
238
+
239
+ Unlike other tools that require your Premium credentials and risk permanent account bans by ripping directly from encrypted servers, `sdm` acts as a safe, unauthenticated metadata matcher. It reliably delivers DRM-free audio (up to 256kbps AAC or Opus) perfectly packaged to match the original release.
240
+
241
+
242
+ ## Legal Disclaimer
243
+
244
+ *Users are responsible for their actions. We do not support unauthorized downloading of copyrighted material. `sdm` is open-source (MIT License) for educational and personal use only.*
245
+
246
+ ---
247
+
248
+ **Important Notes:**
249
+ - **Spotify Playlists** must be set to **Public**. Private playlists and personalized mixes will not work.
250
+ - **Explicit Content:** If YouTube blocks downloads, pass browser cookies with `--cookies firefox`. Firefox is recommended.