Commit graph

718 commits

Author SHA1 Message Date
FireTime
e718643294
Update oauth.rst (#756)
missing parentheses
2025-03-30 19:53:05 +02:00
Stefano Borsatto
55b362e4dc
fix #751: parse_video returns always a video ID or None (#752) 2025-03-24 18:52:37 +01:00
sigma67
5e3bc62620
fix #743: get_album() now returns None for 'audioPlaylistId' (#744)
* fix #743: get_album() now returns None for 'audioPlaylistId'

* backwards compatibility
2025-03-05 21:48:06 +01:00
sigma67
c60950a2f4 simplified solution 2025-02-04 22:04:07 +01:00
Antonio Rojas
dfbcbcda7c Fix docs build
Make needs tabs, not spaces
2025-02-03 15:26:10 +01:00
sigma67
334798f68a
fix get_playlist continuations (#736)
* fix get_playlist continuations

* fix impl
2025-02-02 16:19:00 +01:00
sigma67
535f153f36
improve OAuthCredentials import ease of use (#732)
* improve OAuthCredentials import ease of use

* improve OAuthCredentials import ease of use
2025-01-31 16:14:06 +01:00
sigma67
a004bed436
refactor YTMusicBase, improve oauth doc (#727)
* refactor YTMusicBase, improve oauth doc

* fix recursion issue

* fix bugs, fix coverage, add session test
2025-01-19 14:37:31 +01:00
sigma67
af04fa4ac0
Fix 720 (#726)
* update dev-dependencies

* fix INP001

* rework docs (closes #720)

* update .readthedocs.yml
2025-01-17 20:17:04 +01:00
sigma67
e41e1a37d7
Fix 721 (#725)
* update dev-dependencies

* fix INP001

* fix #721

* add test

* format
2025-01-17 18:56:07 +01:00
sigma67
862f507e82 cli: add setup type, require version action 2025-01-17 08:56:14 +01:00
sigma67
452b5cdf6e
fix #713: get_artist radioId and shuffleId missing (#714)
* fix #713: get_artist radioId and shuffleId missing

* format
2025-01-08 08:48:07 +01:00
Solomon Victorino
3bd3da1bac get_playlist: support audio playlists 2024-12-28 23:09:26 +01:00
sigma67
e1ca551342
fix #703 (#704) 2024-12-27 20:02:16 +01:00
Solomon Victorino
338d63c9d7 search: exclude "Single"/"EP" text from album artist list
```diff
 next(r for r in yt.search("Eminem Houdini", filter="albums") if r["title"] == "Houdini")["artists"]

 [
-    {'name': 'Single', 'id': None},
     {'name': 'Eminem', 'id': 'UCedvOgsKFzcK3hA5taf3KoQ'}
 ]
```
2024-12-27 18:26:13 +01:00
Alex Pastel
4081404b56
fix(setup): Use resolve() before invoking as_uri() (#700)
If a relative file path is provided, `as_uri()` throws a ValueError.
Resolve the path to be absolute before converting to URI.
2024-12-27 18:15:58 +01:00
sigma67
0042e7d108 always upload coverage 2024-12-19 17:10:16 +01:00
sigma67
f7574237be add test analytics 2024-12-19 16:56:10 +01:00
sigma67
cdd4e38a57
update oauth docs and request interactive input instead of aborting (#694)
* update oauth docs and request interactive input instead of aborting

* move input inside oauth path, improve filename output

* update oauth.rst
2024-12-17 22:35:28 +01:00
sigma67
df1c3bdd5b feat: #670 get_podcast get_episode thumbnails 2024-12-17 22:23:29 +01:00
sigma67
b86654fbaf
Added Lyrics w. Timestamps #662 (#693)
* Added Lyrics w. Timestamps

Added `get_lyrics_with_timestamps` to get lyrics with timestamps.
The Method doesn't try to parse the response as normal lyrics, if no lyrics with timestamps are returned. (could be changed to do so tho, the format is the same)

* Update browsing.py

* Combined both get_lyrics methods into one and fixed some typechecking errors

* Fixed a missing hasTimestamps and added the doccomments to the overloads, because vscode didn't show them otherwise

* Removed the old get_lyrics_with_timestamps method

because idk where it came from...

* fixed remaining issues

* Update uploads.py

reverted some changes that I moved to an extra PR

* removed variable `context` from the Mixin, as it's use was replaced by `yt.as_mobile()`

* fix some formatting complaints by ruff and mypy

* please the linter

* fix union syntax

* improve typing in ytmusic.py

* improve typing

* replace docsbuild.yml with RTD

---------

Co-authored-by: Hendrik Horstmann <65970327+heinrich26@users.noreply.github.com>
Co-authored-by: henrich26 <hendrik-horstmann@o2mail.de>
2024-12-17 22:12:06 +01:00
Hendrik Horstmann
bb4bf4d3e1
Docstring cleanup (#665)
* Cleaned up docstrings

* cleaned up more

---------

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-12-17 21:35:44 +01:00
Solomon
74411149d4
get_playlist: join multiple title runs (#667)
* Return complete titles when split on time-like strings:

```diff
>>> yt.get_playlist("PLaZPMsuQNCsWn0iVMtGbaUXO6z-EdZaZm")["title"]
-03 Jan
+03 Jan 12:09
```

* `test_get_playlist`: assert more props have the expected value/shape

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-12-17 21:20:33 +01:00
Corentin Marquet
1f14332eb4
search: adds functionality to remove search suggestion (#678)
* search: adds functionality to remove search history suggestion

* Minor improvements for remove search suggestions

* fix lint

* some improvements: remove_search_suggestions

* make indices optional

---------

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-12-17 20:01:11 +01:00
sigma67
db732f29b9 fix #675 2024-12-17 18:28:14 +01:00
fischcode
fe95f5974e
Add optional parameters for OAuth client ID and secret to setup (#688)
* Add optional parameters for OAuth client ID and secret to setup

Use your own Google API client ID and client secret in setup by calling
ytmusicapi oauth --client_id <your Google API client ID> --client_secret <your Google API client secret> to avoid HTTP 400: Bad Request errors

* Improve setup parameter parsing and help texts

- Add subparsers for parameters for oauth and browser tokens
- Add help options
- Add a check for presence of both client_id and client_secret if oauth is chosen.

* ruff autofix

* wip: remove default oauth_client_id & secret, turn into mandatory params

* fix yt_oauth fixture

* fix format/lint

* fix cli args and oauth test

* remove skip

---------

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-12-17 13:15:33 +01:00
sigma67
7ef703c213
Fix get_history (#691)
* fix get_history feedbackToken parsing

* remove broken playlist test

* skip broken tests for now
2024-12-17 12:21:04 +01:00
github-actions[bot]
160d2664c8
chore: Update pdm.lock (#636)
* chore: Update pdm.lock

* bump lock and actions

---------

Co-authored-by: sigma67 <16363825+sigma67@users.noreply.github.com>
Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-12-16 22:38:03 +01:00
Luis Ignacio
0d39603ba5 refactor: simplify songlist parsing in LibraryMixin 2024-12-14 10:29:45 +01:00
sigma67
9ce284a7ea
Update README.rst 2024-10-22 08:20:40 +02:00
Abhishek M J
8f479b1b5b
Fix duration parsing for very long videos (#661)
* Fix duration parsing for very long videos sigma67#660

* parse duration only when digits are present

* explicit return None

* Add test for track dur > 1k hrs
2024-10-15 16:58:31 +02:00
fritz stelluto
2b5d19abb1
fix #656: attempt to find runs in subtitle if not in title (#657)
* fix #656: attempt to find runs in subtitle if not in title

* refactor

* remove fix by gotofritz

---------

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-10-08 12:17:14 +02:00
sigma67
2c6c6b6504
search: fix missing playlistId for album results while authenticated (#659)
* search: fix missing playlistId for album results while authenticated

* deduplicate test
2024-10-07 20:28:56 +02:00
sigma67
e995ae56ce
search: fix missing artists when filtering songs/videos (#655)
* search: fix missing artists when filtering songs/videos

* search: fix missing artists when filtering songs/videos
2024-10-05 13:30:18 +02:00
sigma67
77e40b7f7d
refactor: use pathlib (#654)
* refactor: use pathlib

* fix size mock
2024-10-05 12:39:21 +02:00
sigma67
7d8a756638
upload_song: add error when file exceeds limit of 300MB (#653)
* upload_song: add error when file exceeds limit of 300MB (closes #647)

* fix import
2024-10-05 11:40:51 +02:00
sigma67
09ca398719
fix #642: create_playlist: raise error when invalid characters are pa… (#652)
* fix #642: create_playlist: raise error when invalid characters are part of playlist title

* add test

* fix CI helper

* fix CI helper

* adjust workflow
2024-10-05 11:31:11 +02:00
sigma67
e433b22231
fix #650: playlists without track count in metadata now return trackCount=None 2024-10-05 10:44:11 +02:00
RealCalumPlays
5478951ba3
fix(playlists): handle missing regex group in trackCount (#651)
* fix(playlists): get_playlist trackCount incorrect for playlists with more than 1k tracks

This ensures that the regex doesnt just return the first group in 1000+ long playlists.

* feat+fix(playlist_tests): Update playlist ID and add new track count test

* fix tests

---------

Co-authored-by: RealCalumPlays <calumplays666+github@gmail.com>
Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-10-05 10:33:20 +02:00
sigma67
7b96ac2c5e
Update pdm.yml cron 2024-09-16 08:42:34 +02:00
indierodo
621584be3c
Very small additions to documentation (#637)
While I was reading the docs to append video items, I got confused by the setVideoId parameter. I added the missing field to the get_playlists_id example and copied the definition to the edit playlist documentation.

I hope this is ok, it's a very small change, but I think it might help others. I really appreciate the time you take by looking at this.
2024-08-24 20:48:27 +02:00
sigma67
d6b6004b39 fix podcast episode header parsing broken due to server-side update 2024-08-24 20:48:02 +02:00
sigma67
ac7cd6be68 fix #640 2024-08-24 20:48:02 +02:00
sigma67
7d062c29cb search: fix playlistId on album results 2024-07-28 22:25:57 +02:00
sigma67
a15d90c4f3
add get_user_videos (#632)
* add get_user_videos

* add to docs
2024-07-24 19:37:33 +02:00
sigma67
858995e016
fix search filters test 2024-07-23 21:57:12 +02:00
sigma67
0f00260f57
fix search queries test 2024-07-23 21:51:19 +02:00
sigma67
6e0fd5e1db get_podcast: fix edge case when first subtitle is missing 2024-07-23 21:40:00 +02:00
sigma67
8d6dd117eb fix test broken by added podcasts on oasis page 2024-07-23 21:40:00 +02:00
sigma67
a606b70f94 library uploads: fix broken index after downloads rollout 2024-07-23 21:40:00 +02:00