Commit graph

668 commits

Author SHA1 Message Date
czifumasa
895ebb0898 tests for tracks in collaborative playlists 2024-07-23 21:40:00 +02:00
czifumasa
40ff2b42a7 get_playlist: fix artists for unnoficial videos (#627) 2024-07-23 21:40:00 +02:00
github-actions[bot]
14417db312
chore: Update pdm.lock (#614)
Co-authored-by: sigma67 <16363825+sigma67@users.noreply.github.com>
2024-07-22 07:32:12 +02:00
sigma67
2a0a45a1d1
re-add thumbnails to get_playlist (#626) 2024-07-15 20:04:52 +02:00
czifumasa
c39bb328a3
get_playlist: fix title for podcast episodes (#622) (#623) 2024-07-15 17:41:27 +02:00
sigma67
12cc15eaf4
introduce exception classes (#620) 2024-07-13 21:25:45 +02:00
sigma67
14ae7852ea
coverage: remove code for old playlist format (#619)
* coverage: remove temporary code for new playlist format

* fix flaky search test

* improve rate_song coverage

* test invalid order raise

* fix workflow
2024-07-13 21:18:19 +02:00
sigma67
828b1b9810
drop 3.8, add pytest-retry (#592)
* drop 3.8, add pytest-retry

* fix mypy

* fix missing import
2024-07-13 20:40:50 +02:00
JohnHKoh
08d9f3049c
Extract song count from text (#609)
* Extract song count from text

* Add fix in parsers

* add test

---------

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-07-13 20:28:00 +02:00
czifumasa
8cc72e3863 get_album: fix invalid track list artists (#617) 2024-07-11 13:17:29 +02:00
Cory Marshall
cd502aa517
Return blank album author ID when it doesn't exist. (#615)
* Return blank album author ID when it doesn't exist.

* Revert "Return blank album author ID when it doesn't exist."

This reverts commit ccc5cf93ab4e28fc688db93a0066104b1c4e9e3e.

* Return blank album author ID when it doesn't exist.
2024-07-11 05:59:03 +02:00
github-actions[bot]
d5653b76e1
chore: Update pdm.lock (#579)
* chore: Update pdm.lock

* update precommit config

---------

Co-authored-by: sigma67 <16363825+sigma67@users.noreply.github.com>
Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-07-03 22:29:00 +02:00
Adwait Thattey
ab2aa28992
fix sum_total_duration failing if duration_seconds is not an int (#598)
* fix sum_total_duration failing if duration_seconds is not an int

Signed-off-by: Adwait Thattey <coderdude1999@gmail.com>

* format

---------

Signed-off-by: Adwait Thattey <coderdude1999@gmail.com>
Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-07-03 22:23:03 +02:00
czifumasa
d2cbe538de
get_playlist: title, artists and album are correctly resolved in collaborative playlists (#603) (#612)
Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-07-03 22:17:26 +02:00
sigma67
05cb3caf4a
fix some more tests 2024-07-03 22:05:50 +02:00
sigma67
c97a13e3bd
fix search test 2024-07-03 21:50:32 +02:00
sigma67
e71bfa2516
fix get_episodes_playlist 2024-07-03 21:50:25 +02:00
sigma67
f4f9e7cd12
fix get_album other_versions attribute 2024-07-03 21:48:57 +02:00
Ricardo Mendonça Ferreira
11823d6387
edit_playlist(): Allow moving title to bottom of playlist (#602)
* Allow moving title to bottom of playlist

* test_edit_playlist fixed & extended

* add labeled coverage workflow run for external PRs

* add labeled coverage workflow run for external PRs

* add labeled coverage workflow run for external PRs

* add another pr target workflow

---------

Co-authored-by: Ricardo <ric.ce.br@gmail.com>
Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-06-17 18:24:39 +02:00
sigma67
33098ba69e
get_home: remove "year" attribute from album results, parse podcasts … (#591)
* get_home: remove "year" attribute from album results, parse podcasts and episodes

* search: make itemCount int cast error proof

* fix None case for parse_album year

* fix lint
2024-05-27 21:16:39 +02:00
sigma67
fdc259461c make parse_menu_playlists more error proof 2024-05-27 18:20:53 +02:00
ryanopily
bd512384d9
playlist search result "itemCount" field cast to int (#589)
* playlist search result "itemCount" field cast to int

* use to_int

---------

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-05-25 10:16:01 +02:00
Jonathan Bell
1f4332a8a9
parse_seach_result: add playlist id to album search (#586)
* parse_seach_result: add playlist id to album search

* fix docs

* add to top result

---------

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-05-25 10:15:26 +02:00
sigma67
0cf0883723
fix #582 (#583)
* fix #582

* fix result type heuristics
2024-05-20 21:45:02 +02:00
Alex Pastel
ae966bb96a
Gracefully retrieve uploaded songs with a blank duration (#578) (#580)
* add unit test that attempts to retrieve a song after its been uploaded

* prevent parsing errors when an uploaded song lacks a duration

* update unit test to delete/re-upload song if it already is uploaded

* format

* fix test

* add another sleep to end2end playlist

---------

Co-authored-by: sigma67 <ytmusicapi@gmail.com>
2024-05-11 18:23:11 +02:00
sigma67
614999c77d
search: fix #569 (#581)
* search: fix #569

* fix an issue with localized instances

* add test for localized search
2024-05-09 21:23:19 +02:00
sigma67
94c67a88d1
Update README.rst 2024-05-04 13:34:42 +02:00
sigma67
f53074e5f2
fix #562 (#573)
* fix #562

* fix test

* use correct public test data

* fix up for new format

* fix lint
2024-05-04 13:19:53 +02:00
github-actions[bot]
0ba103e6ef
chore: Update pdm.lock (#558)
* chore: Update pdm.lock

* update deps

---------

Co-authored-by: sigma67 <16363825+sigma67@users.noreply.github.com>
Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-05-04 09:52:42 +02:00
Alex Pastel
0425429e4d channelHandle is absent if user has not created a YouTube channel 2024-05-04 08:24:46 +02:00
sigma67
1660d376c7
Update README.rst 2024-04-15 18:55:31 +02:00
sigma67
2217f3d92d
fix #544 (#560)
* fix #544

* fix ignores
2024-04-05 20:53:32 +02:00
Allemand Instable
d63eb07779
adding Optional type hinting for limits ( fix #565 ) (#567)
* adding Optional type hinting for limits

adding Optional typing for limit in methods whose documentation explicitly allows the use of None type for no limit

* format

---------

Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-03-20 12:53:41 +01:00
sigma67
0d996030f4 get_artist: shows support 2024-03-13 20:53:08 +01:00
fischcode
29eaa7a593
Add "type" attribute to library channels (#563)
* Add "type" attribute to library channels

YTMusic Library Channels list not only channels in the narrow sense but also artists publishing podcasts and episodes (e.g. The Offspring). To distinguish the two types of items, the json code contains a page_type attribute. This PR adds code to read the page_type attribute and, if present, add a "tyoe" item with a value of "channel" or "artist" to the artist dictionary object.
2024-03-13 19:39:25 +01:00
sigma67
f6932c2bf1
get_episodes_playlist (#561)
* get_episodes_playlist

* fix minor issues
2024-03-08 21:32:09 +01:00
sigma67
90d172b1d3
podcasts features ✨ (#559) 2024-03-06 23:02:19 +01:00
Alex Pastel
c412d7ce34
Implement get_account_info() to get authenticated user's account info (#556) (#557)
* implement get_account_info to provide information about the authenticated user's account (#556)

* Apply suggestions from code review to tests/README.rst

Co-authored-by: sigma67 <16363825+sigma67@users.noreply.github.com>

* simplify get_account_info by moving code out of parsers.py and navigation.py

* test with non-auth account

* format

* update .pre-commit-config.yaml

---------

Co-authored-by: sigma67 <16363825+sigma67@users.noreply.github.com>
Co-authored-by: sigma67 <sigma67.github@gmail.com>
2024-03-03 19:55:06 +01:00
Sean Reifschneider
13701c40b7
nav() now displays some debugging information on KeyError (#540) 2024-03-01 20:54:55 +01:00
sigma67
6365e23422 fix pdm dependencies action actions/checkout version 2024-03-01 20:49:11 +01:00
sigma67
4962ed6c33 ruff 0.3.0 format 2024-03-01 20:49:11 +01:00
sigma67
0734595395 get_episode: support progress percentage 2024-03-01 20:49:11 +01:00
fischcode
d143480ae4
Fix parsing of album and views in parse_playlist_items (#552)
* Fix parsing of album and views in parse_playlist_items

Parse album and views columns as a function of flex column count and is_album property to cater for varying layouts with three and four flex columns

* Add "own_playlist" attribute to playlists

To allow for an easy distinction between owned / editable and community / non-editable playlists,in applications incorporating ytmusicapi, a boolean "own_playlist" dictionary entry is added to playlists based on existing code already identifying this property.

* Add thumbnails to episodes

Add thumbnails to episodes for visual rendering in Kodi etc.

* Add unit test for playlist "own_playlist" attribut

Add unit test for playlist "own_playlist" attribut

* Improvements as requested

- rename attribute for own playlists to playlist("owned")
- filter out episode thumbnails with an non-functional URL

* Fix linter in test_playlists.py

Fix test for playlist["owned"]

* Auto-Formatting on playlists.py

* format parsers/podcasts.py

* Remove filtering of podcast thumbnails

No idea why I had seen useless images for those thumbnails before - maybe Google fixed something to make them work?
2024-02-27 09:23:09 +01:00
sigma67
7ffe990c93 add token to coverage.yml 2024-02-22 20:47:15 +01:00
sigma67
f237d50ab7 fix tests 2024-02-22 20:47:15 +01:00
sigma67
e1bcb88c92 Revert "get_charts: removed trending category (no longer available on YTM)"
This reverts commit da492e49f6.
2024-02-22 20:47:15 +01:00
sigma67
86b9e05c90 Revert "get_playlist: fix albums on tracks"
This reverts commit b2113db0e1.
2024-02-22 20:47:15 +01:00
sigma67
98e0bc749c
update actions 2024-02-04 19:16:03 +01:00
sigma67
f98274f0ec improve coverage 2024-02-04 17:03:59 +01:00
sigma67
da492e49f6 get_charts: removed trending category (no longer available on YTM) 2024-02-04 17:03:59 +01:00