Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge upstream #9

Open
wants to merge 242 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
242 commits
Select commit Hold shift + click to select a range
57528ff
Add fallback for parsing album audioPlaylistId (#219, closes #220)
Aug 18, 2021
05812a9
Update version to 0.19.1
Aug 18, 2021
9d9d747
Fix error in docs
danherd Aug 20, 2021
013a1bf
remove pkg_resources (closes #223, #224)
Aug 26, 2021
3aaeaa2
get_charts: fix issue with unavailable entries
Aug 26, 2021
0aa284e
get_charts: fix views, add video artists
Aug 26, 2021
945b021
Change Python requirement to 3.6 (closes #225)
Sep 8, 2021
fd9f577
Update version to 0.19.2
Sep 8, 2021
35ad412
fix parsing bug for default search (no filter, no scope) introduced i…
Sep 24, 2021
7a73d01
add get_library_subscriptions to docs (closes #226)
Sep 24, 2021
7ddfb3d
Update version to 0.19.3
Sep 24, 2021
c536720
add category property for search results (closes #229)
Oct 3, 2021
3bc3ca6
fix in docs
4ndu-7h4k Oct 1, 2021
1f8e34c
add default session timeout of 30s (closes #221)
Oct 3, 2021
72661fe
remove browse endpoint request keys that are no longer used
Oct 28, 2021
7a49cd7
remove get_album framework mutations code as rollout is now complete
Oct 28, 2021
7306069
explain limit parameter workings in docs (#190)
Oct 28, 2021
040532e
update version to 0.19.4
Oct 28, 2021
ef842d4
Flip re.search parameters when parsing playlist info.
Nov 28, 2021
71b6479
fix get_watch_playlist results if only videoid is provided
Nov 29, 2021
eb0293f
fix search error if result thumbnail is missing
Nov 29, 2021
55c795a
Update version to 0.19.5
Dec 1, 2021
afad9d2
Respect the authuser defined in headers_json when uploading a song
Dec 9, 2021
0cefc97
use CaseInsensitiveDict for headers
Dec 12, 2021
3b133a7
Fix issue #242
kenbier Dec 11, 2021
909d4d3
use session for get requests (closes #240)
Dec 12, 2021
71cc90f
add zh_CN language
BruceZhang1993 Dec 13, 2021
2aad723
also split on non-breaking spaces
Dec 20, 2021
878ae9a
get_watch_playlist: recognize audioPlaylistIds as playlists to not er…
Dec 20, 2021
3043116
get_history: raise exception if watch history is disabled
Dec 20, 2021
221cce9
fix isExplicit label for localized instances
Dec 23, 2021
3436f2d
add duration_seconds key to items with duration (closes #215)
Jan 1, 2022
64276bc
Update version to 0.20.0
Jan 1, 2022
7bc65ba
properly determine separator for artists runs on videos (closes #254)
Jan 30, 2022
2e8c09a
get_charts: fix unavailable song error in trending section
Jan 30, 2022
d046011
get_album: add album and artists to tracks (closes #257)
Feb 10, 2022
c1170b9
feature: get_home (closes #251)
Feb 27, 2022
c1313aa
Update version to 0.21.0
Feb 27, 2022
64a1f1d
get_home: small fixes to runs parsing (#251)
Feb 27, 2022
c219f67
feature/add ko locales
HHongSeungWoo Mar 4, 2022
e1c77f1
fix/number parse error
HHongSeungWoo Mar 4, 2022
7ebb57d
get_watch_playlist: parse and return counterpart for songs with vide…
Mar 10, 2022
2b6ced5
get videoType from video results
lsmacedo Mar 23, 2022
33232ae
search: add videoType to docs
Mar 23, 2022
56b266d
return video type on get watch playlist
lsmacedo Mar 24, 2022
81d3799
get_watch_playlist: add videoType to docs
Apr 7, 2022
d6f8d5d
get_artist: Don't fail on channels with only one category of content
jbruechert Apr 8, 2022
2b44cbe
get_watch_playlist: add related content browseId
Apr 14, 2022
1d30910
remove test invalidated by get_artist changes (#181, #267)
Apr 14, 2022
f4ff4ba
refactor helpers and utils, extract SearchMixin from BrowsingMixin
May 5, 2022
7c242ba
add consent cookie to avoid consent page trigger (could cause unauthe…
May 5, 2022
edb9637
feature: add get_song_related (closes #252)
May 10, 2022
7e56975
Update version to 0.22.0
May 10, 2022
1d5cfc3
update tests sample video to version with lyrics
Aug 2, 2022
b3e233e
add tunerSettingValue to get_watch_playlist request (#282)
Aug 2, 2022
fbb26dd
search: raise Exception when filter is set for uploads search (closes…
Aug 5, 2022
d66f20a
Addded favorite artists to taste
adrinu Aug 21, 2022
f7ef0d2
Covered more cases in unittest and documentation
adrinu Aug 24, 2022
c3ed850
tasteprofile: minor fixes to test (#289)
Aug 24, 2022
4512dac
set_tasteprofile: make internal get_tasteprofile request optional (#289)
Aug 24, 2022
b3c50c2
Update setup.rst
Sep 2, 2022
20b4631
setup docs: grammar fix
Sep 2, 2022
07cb6d0
Change version string to new format (#296)
Sep 20, 2022
889b29b
fix language exception error message
Sep 22, 2022
b7a3e75
use pyproject.toml for build
Sep 22, 2022
1b94985
retrieve all continuations when limit parameter is None (closes #300)
sigma67 Sep 26, 2022
c85fd8c
optimize tests for retrieving all library items (#275)
sigma67 Sep 26, 2022
ec771fc
get_playlist: support None limit (#275)
sigma67 Sep 26, 2022
98c4661
get_library_songs: add support for limit=None (closes #275)
sigma67 Sep 26, 2022
2866890
get_home: support watch_playlist content
sigma67 Sep 26, 2022
9b74957
tests: move some limits to test.cfg
sigma67 Sep 26, 2022
3ea2aa2
update coverage action
sigma67 Sep 26, 2022
d36a010
test_get_library_playlists: add limit to cfg
Sep 29, 2022
1cac82b
get_library_*: fix for next YouTube update (#301)
Sep 29, 2022
3ab1d91
get_home: fix watch playlist error
Sep 30, 2022
c2d5e46
remove get_playlist_suggestions - add suggestions and related to get_…
Sep 30, 2022
dd5d753
get_album: add other versions (closes #279)
Oct 1, 2022
207d7ad
add coverage for bad request exception
Oct 1, 2022
527fed6
get_watch_playlist: add shuffle and radio parameters (closes #282)
Oct 1, 2022
7de7ecf
Add check if absent
atlasrule Sep 23, 2022
8501f9f
move headers_auth.json.example to docs/source
Oct 1, 2022
03a534f
fix internal package version
Oct 1, 2022
92fd2c0
require Python 3.8
Oct 1, 2022
0e0a6d1
update README.rst
Oct 1, 2022
feac950
add .readthedocs.yml
Oct 1, 2022
0d25af1
Add playlistId key to the album dicts in parse_album
zarkdav Oct 3, 2022
56796e6
Fix typo in MENU_PLAYLIST_ID
zarkdav Oct 4, 2022
4815fc5
Amend get_library_albums docstring
zarkdav Oct 4, 2022
c37a2ec
Add playlistId key presence unittest
zarkdav Oct 4, 2022
081a64d
Add none_if_absent param to playlistId key in parse_albums
zarkdav Oct 4, 2022
a406dbc
Remove quotes from cookies
JohnHKoh Oct 13, 2022
4221cb9
return videoType on playlist items
lsmacedo Oct 18, 2022
2965004
Add localization for zh_TW
terry3041 Nov 3, 2022
d48951f
fix run parsing - artist mistaken as views (closes #313)
Nov 3, 2022
2344a17
Fix KeyError when playlist is empty
bretsky Nov 23, 2022
c91f47e
get_song: add playbackTracking key (OzymandiasTheGreat/mopidy-ytmusic…
sigma67 Nov 30, 2022
d2d66f8
tests: fix sample video
sigma67 Nov 30, 2022
02e3289
library: fix for new response structure and empty libraries (#320)
sigma67 Dec 7, 2022
d0ec2bb
feature: add_history_item (closes #295) (OzymandiasTheGreat/mopidy-yt…
sigma67 Dec 7, 2022
4594a74
improve test coverage
sigma67 Dec 12, 2022
08cc109
Russian language added
sheikhhaziq Jan 1, 2023
e6f182b
Hindi language added
sheikhhaziq Jan 1, 2023
14f9cfb
added portuguese support
sheikhhaziq Jan 1, 2023
6b428ca
remove old code for runs parsing (closes #334)
sigma67 Jan 1, 2023
1ed903c
Turkish language added
sheikhhaziq Jan 2, 2023
93ef8a7
Merge branch 'sigma67:master' into master
sheikhhaziq Jan 2, 2023
4153051
Chinese added
sheikhhaziq Jan 2, 2023
11c903a
Merge branch 'master' of https://github.com/sheikhhaziq/ytmusicapi
sheikhhaziq Jan 2, 2023
9415b26
Added Arabic and Urdu
sheikhhaziq Jan 2, 2023
3e37eb8
Revert "Chinese added"
sigma67 Jan 15, 2023
40894b4
Create dependabot.yml
sigma67 Mar 12, 2023
1ad3dc2
Update issue templates
sigma67 Mar 12, 2023
3be40b1
setup: ignore sec headers
sigma67 Mar 22, 2023
92d8e04
update .pre-commit-config.yaml
sigma67 Mar 22, 2023
5d7018b
move .style.yapf to pyproject.toml
sigma67 Mar 22, 2023
19ad424
refactor search parsing to work with new top result (closes #360)
sigma67 Mar 22, 2023
e14abac
get_playlist: add 'views' for owned playlists, fix trackCount (closes…
sigma67 Mar 25, 2023
3a03c63
improve search coverage
sigma67 Mar 25, 2023
fcdb2ae
search: fix bugs with top result (closes #367)
sigma67 Apr 2, 2023
6aa6c8d
fix tests
sigma67 Apr 2, 2023
28ae6b6
CI: run workflows on PRs
sigma67 Apr 4, 2023
b0faaf9
Implement get_search_suggestions method
omgupta15 Apr 4, 2023
39a10d6
Add unittest for get_search_suggestions
omgupta15 Apr 4, 2023
4fdad5b
Move get_search_suggestions from browsing to search.
omgupta15 Apr 5, 2023
7a4abd8
Add get_search_suggestions reference and update readme.
omgupta15 Apr 5, 2023
3d88e75
Fix documentation formatting for get_search_suggestions.
omgupta15 Apr 5, 2023
6414249
Revert ytmusicapi/mixins/browsing.py file
omgupta15 Apr 5, 2023
0ee3b7f
implement oauth authentication (#10)
sigma67 Apr 4, 2023
5526de0
CI: add OAUTH_JSON secret
sigma67 Apr 4, 2023
34ad3c4
Update coverage.yml
sigma67 Apr 5, 2023
308eda0
Update coverage.yml
sigma67 Apr 5, 2023
0cb1445
Update coverage.yml
sigma67 Apr 5, 2023
f56bef2
update pythonpublish.yml
sigma67 Apr 5, 2023
1a78e61
streamline oauth code and fix refresh_token bug
sigma67 Apr 5, 2023
d111be2
use oauth for more tests
sigma67 Apr 5, 2023
012a0fc
add cli
sigma67 Apr 5, 2023
461783f
update docs
sigma67 Apr 5, 2023
adc802d
search: fix filtering param (#374)
sigma67 Apr 5, 2023
a1e4662
update FAQ (closes #353)
sigma67 Apr 5, 2023
6ea74e3
fix search (#374)
sigma67 Apr 6, 2023
69a419f
oauth: add safeguard exception to upload_song
sigma67 Apr 6, 2023
4251896
fix test issue when running from US (episodes saved for later playlist)
sigma67 Apr 6, 2023
defb621
search: don't return empty dict if browseid is missing
sigma67 Apr 7, 2023
af1cc6e
oauth: move input() out of get_code (#378)
sigma67 Apr 15, 2023
e457402
streamline authentication (closes #376, closes #380)
sigma67 Apr 19, 2023
2825e73
update coverage.yml
sigma67 Apr 20, 2023
8aee438
oauth: fix string returned by setup_oauth to include expires_in
sigma67 Apr 20, 2023
9f2b5d6
oauth: fix dump_token path detection
sigma67 Apr 20, 2023
7769797
Added Dutch translation
Vistaus Apr 23, 2023
17414c0
add mo file
sigma67 May 1, 2023
4d5e4b7
update docsbuild.yml
sigma67 May 1, 2023
78353a0
update README.rst
sigma67 May 17, 2023
0fc5417
open browser on ytmusic oauth call (closes #384)
sigma67 May 17, 2023
9819ddb
get_playlist: fix issue with views, limit
sigma67 May 21, 2023
5a50c06
update coverage.yml
sigma67 May 21, 2023
d9f9fcc
Fixed unrecognized case sensitive headers during auth
czifumasa May 18, 2023
2c99445
add location support (closes #377)
sigma67 Jun 15, 2023
89c6a25
Add external OAuth case to browser check (#396)
MarvinSchenkel Jun 15, 2023
6b75939
fix test
sigma67 Jun 15, 2023
7c9455e
test location parameter
sigma67 Jun 15, 2023
e26335e
Fix 'secondSubtitle' KeyError for some playlists (#399)
MarvinSchenkel Jun 25, 2023
94f1513
fix empty liked songs crash caused by #399
sigma67 Jul 2, 2023
ef312d7
Oauth refresh on request (#403)
zeitmeister Jul 3, 2023
bff2b66
Removed redundant loop counter
nick42d Jul 19, 2023
3bf7b49
Fix for KeyError when searching community_playlists or featured_playl…
nick42d Aug 5, 2023
3770b45
fix test
sigma67 Aug 11, 2023
2be108e
search: support profiles (closes #425)
sigma67 Aug 20, 2023
0ef4656
update readme, docs (closes #315, #250)
sigma67 Aug 20, 2023
6660058
fix weird new chromium pasting bug - please use firefox! (closes #409)
sigma67 Aug 20, 2023
c5dca0a
search: fix profile edge case (closes #429)
sigma67 Aug 25, 2023
56d54a2
fix readthedocs
sigma67 Aug 27, 2023
f1141d3
fixed KeyError in get_charts
ankitby2 Sep 25, 2023
6c6f19d
Fix the currently present problem of `get_artist_albums` not working
fabi321 Sep 25, 2023
01f3887
Singles still use the grid renderer, while albums use the carousel now
fabi321 Sep 25, 2023
24024aa
cleaner alternative parsing
fabi321 Sep 25, 2023
0acef5d
edit_playlist: add addToTop function parameter (closes #444)
sigma67 Sep 27, 2023
6f7dfce
fix rtd requirements.txt
sigma67 Oct 3, 2023
369ac93
edit_playlist: change addToTop function parameter to Optional[bool] (…
sigma67 Oct 3, 2023
d4a088d
fix: add new cookie value to bypass consent screen
sigma67 Oct 3, 2023
9a87990
get_album: don't overwrite parsed artist (closes #446)
sigma67 Oct 3, 2023
40e5650
search: fix missing artists when albums filter is set
sigma67 Oct 3, 2023
05a5fb8
search: add browseId to album top results (closes #448)
sigma67 Oct 6, 2023
437844f
get_playlist, get_library_songs, get_history, get_liked_songs: fix fe…
sigma67 Oct 24, 2023
7382f62
fix requests_session documentation (closes #464)
sigma67 Oct 24, 2023
2d2ab99
don't fail on missing setVideoId/removedVideoId (closes #462, closes …
sigma67 Oct 24, 2023
07f690b
fix get_album_browse_id (closes #470)
sigma67 Nov 9, 2023
9b0d4de
fix get_charts fallback
sigma67 Nov 9, 2023
6f80e94
search: support podcasts and episodes
sigma67 Nov 11, 2023
f73f77b
search: add podcasts filter tests
sigma67 Nov 11, 2023
e8cb80f
add fr episodes translation
sigma67 Nov 11, 2023
38b4905
Revert "search: add podcasts filter tests"
sigma67 Nov 11, 2023
43d3c3b
.readthedocs.yml: enable all formats
vibpz Dec 14, 2023
e21492b
oauth: add support for alternate oauth client
jcbirdwell Dec 14, 2023
b9be59d
get_album_browse_id: fix depreciated escape sequence error && add per…
jcbirdwell Dec 16, 2023
b2c078d
get_charts: fix index errors on authorized song chart missing
jcbirdwell Dec 16, 2023
b60af9c
add: set_album_save as a convenience/alias/findable method for album …
jcbirdwell Dec 16, 2023
91949b5
fix: externalize library dependent or regional arguments to test.cfg
jcbirdwell Dec 16, 2023
6c94c80
add: integrate alt_oauth into YTMusic && add: token dict support for …
jcbirdwell Dec 16, 2023
742f584
unadd: set_album_save. unneeded duplicate to rate_playlist
jcbirdwell Dec 18, 2023
8f7970b
get_library_songs, get_library_upload_songs: fix empty result for lib…
sigma67 Dec 18, 2023
bd7a6b4
fix poop_songs_random_mix
sigma67 Dec 18, 2023
67d8b7c
fix broken test playlist id
sigma67 Dec 18, 2023
10241c7
fix: dataclass implementation of credentials
jcbirdwell Dec 18, 2023
9cb8c63
minor touch-up: rebuild the entire oauth system
jcbirdwell Dec 19, 2023
8dac2e5
fix: new token init
jcbirdwell Dec 19, 2023
5f1945a
remove: env support
jcbirdwell Dec 19, 2023
814ea99
get_album_browse_id: reverted and subtest added for edge case
jcbirdwell Dec 20, 2023
45df3af
oauth: file separation, classes restructured, fix refresh error, mode…
jcbirdwell Dec 20, 2023
11bf25f
Move pop_songs_random_mix to be after results check.
theyak Dec 26, 2023
b51603a
update get_artist docstring (closes #489)
sigma67 Dec 27, 2023
e85ce83
update get_artist docstring once more (closes #480)
sigma67 Dec 27, 2023
7b60e65
test_get_album_browse_id: hindsight test edit and bulletproof fix for…
jcbirdwell Dec 28, 2023
38685c9
explore.py: charts fix and docs edit
jcbirdwell Dec 29, 2023
fe85234
credentials.py: custom exceptions.py for pesky issues
jcbirdwell Dec 29, 2023
a589ead
ytmusic: oauth initialization changes to fix keyerrors, reduce code a…
jcbirdwell Dec 29, 2023
940b827
docs: docs, ~~docs~~, and docs with a splash of type hinting
jcbirdwell Dec 29, 2023
a6ae5ad
tests: further edits for clarity and oauth tests
jcbirdwell Dec 29, 2023
d05c011
fix: not here not now
jcbirdwell Dec 29, 2023
3abbbf8
fix review findings
sigma67 Dec 31, 2023
c848e50
refactor authtypes
sigma67 Dec 31, 2023
90af0c7
Merge remote-tracking branch 'origin/master' into jcbirdwell-alt_auth
sigma67 Dec 31, 2023
48e95ad
Merge pull request #488 from jcbirdwell/alt_auth
sigma67 Dec 31, 2023
ec02876
fix workflow
sigma67 Dec 31, 2023
1fd93dc
Ruff lint (#496)
sigma67 Dec 31, 2023
1971121
Search issue 494 (#495)
jcbirdwell Dec 31, 2023
f3e7471
get_album: return new "views" key for each track
sigma67 Dec 31, 2023
70a260b
add mypy
sigma67 Dec 31, 2023
e88792b
remove flaky assert
sigma67 Dec 31, 2023
5e5daa3
refactor oauth classes
sigma67 Jan 1, 2024
e0d73c0
fix tests
sigma67 Jan 1, 2024
fb48dcc
test_home: hotfix failing podcast entries on homepage
sigma67 Jan 1, 2024
102a732
simplify OAuth as_dict and is_oauth
sigma67 Jan 1, 2024
d70868c
update .pre-commit-config.yaml
sigma67 Jan 1, 2024
dcfc6c1
fix pyproject.toml for release
sigma67 Jan 1, 2024
dc5bce5
update pythonpublish.yml
sigma67 Jan 1, 2024
0cb0a16
fix some minor issues discovered by typing, enable composition
sigma67 Jan 2, 2024
d1ac87c
get_user_playlists: no longer errors on empty profile
sigma67 Jan 2, 2024
69dd4a9
test restructuring via pytest
sigma67 Jan 2, 2024
d4bea93
improve coverage
sigma67 Jan 2, 2024
9506bfd
fix #501 (#502)
sigma67 Jan 3, 2024
a7f2827
update LICENSE year to 2024
sigma67 Jan 3, 2024
294fb81
Fix OAUTH_CUSTOM_FULL mode (#527)
MarvinSchenkel Jan 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .flake8

This file was deleted.

23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

# Hello and thanks for using ytmusicapi! Please fill out the issue template below. Issues not following this template will be closed without comment. If you have a question only, please use GitHub discussions or gitter (linked in README).
~~~~~~~~~~~~~
**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Additional context**
Add any other context about the problem here, such as a code sample.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

# Hello and thanks for using ytmusicapi! Please fill out the issue template below. Issues not following this template will be closed without comment. If you have a question only, please use GitHub discussions or gitter (linked in README).
~~~~~~~~~~~~~
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
34 changes: 22 additions & 12 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name: Code coverage
on:
push:
branches:
- master
- master
pull_request:
branches:
- master

jobs:
build:
Expand All @@ -13,23 +16,30 @@ jobs:
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.7
python-version: 3.x
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
- name: create-json
uses: jsdaniell/[email protected]
with:
name: "oauth.json"
dir: "tests/"
json: ${{ secrets.OAUTH_JSON }}
- name: Install dependencies
run: pdm install
- name: Generate coverage report
env:
HEADERS_AUTH: ${{ secrets.HEADERS_AUTH }}
TEST_CFG: ${{ secrets.TEST_CFG }}
run: |
pip install -e .
pip install coverage
cd tests
curl -o test.mp3 https://www.kozco.com/tech/piano2-CoolEdit.mp3
cat <<< "$HEADERS_AUTH" > headers_auth.json
cat <<< "$TEST_CFG" > test.cfg
coverage run --source=../ytmusicapi -m unittest test.py
coverage xml
curl -o tests/test.mp3 https://www.kozco.com/tech/piano2-CoolEdit.mp3
cat <<< "$HEADERS_AUTH" > tests/browser.json
cat <<< "$TEST_CFG" > tests/test.cfg
pdm run pytest
pdm run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: tests/coverage.xml
file: coverage.xml
flags: unittests
fail_ci_if_error: true
10 changes: 4 additions & 6 deletions .github/workflows/docsbuild.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
name: Build Documentation

on:
push:
branches:
- master
push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ytmusicapi sphinx sphinx-rtd-theme
pip install . sphinx sphinx-rtd-theme
- name: Build documentation
run: |
cd docs
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: lint

on:
pull_request:
branches:
- master

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
- uses: chartboost/ruff-action@v1
with:
args: format --check
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.11"
- run: pip install mypy==1.8.0
- run: mypy --install-types --non-interactive
37 changes: 20 additions & 17 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@ name: Upload Python Package

on:
release:
types: [created]
types: [published]

permissions:
id-token: write # trusted publishing
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build
run: |
python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_PASSWORD }}
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
.idea
.vscode
headers_auth.json
**.json
docs/build
**.cfg
**.mp3
.coverage
**/__pycache__/
venv*/
*.egg-info/
*.egg-info/
build
dist
.pdm-python
.venv
*.log
*.xml
18 changes: 11 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
repos:
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.30.0
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.9
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: yapf
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.0
hooks:
- id: flake8
- id: mypy
17 changes: 17 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.10"

python:
install:
- requirements: docs/source/requirements.txt
- method: pip
path: .

sphinx:
configuration: docs/source/conf.py

formats: all
5 changes: 0 additions & 5 deletions .style.yapf

This file was deleted.

4 changes: 3 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ Before making changes to the code, install the development requirements using

.. code-block::

pip install -e .[dev]
pip install pipx
pipx install pdm pre-commit
pdm install

Before committing, stage your files and run style and linter checks:

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 sigma67
Copyright (c) 2024 sigma67

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

31 changes: 22 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ It emulates YouTube Music web client requests using the user's cookie data for a

Features
--------

| **Browsing**:

* search (including all filters)
* search (including all filters) and suggestions
* get artist information and releases (songs, videos, albums, singles, related artists)
* get user information (videos, playlists)
* get albums
* get song metadata
* get watch playlists (playlist that appears when you press play in YouTube Music)
* get watch playlists (next songs when you press play/radio/shuffle in YouTube Music)
* get song lyrics

| **Exploring music**:
Expand All @@ -48,17 +49,29 @@ Features

* get library contents: playlists, songs, artists, albums and subscriptions
* add/remove library content: rate songs, albums and playlists, subscribe/unsubscribe artists
* get and modify play history

| **Playlists**:

* create and delete playlists
* modify playlists: edit metadata, add/move/remove tracks
* get playlist contents
* get playlist suggestions

| **Uploads**:

* Upload songs and remove them again
* List uploaded songs, artists and albums
* upload songs and remove them again
* list uploaded songs, artists and albums

| **Localization**:

* all regions are supported (see `locations FAQ <https://ytmusicapi.readthedocs.io/en/stable/faq.html#which-values-can-i-use-for-locations>`__
* 16 languages are supported (see `languages FAQ <https://ytmusicapi.readthedocs.io/en/stable/faq.html#which-values-can-i-use-for-languages>`__


If you find something missing or broken,
check the `FAQ <https://ytmusicapi.readthedocs.io/en/stable/faq.html>`__ or
feel free to create an `issue <https://github.com/sigma67/ytmusicapi/issues/new/choose>`__.


Usage
Expand All @@ -67,10 +80,10 @@ Usage

from ytmusicapi import YTMusic

ytmusic = YTMusic('headers_auth.json')
playlistId = ytmusic.create_playlist('test', 'test description')
search_results = ytmusic.search('Oasis Wonderwall')
ytmusic.add_playlist_items(playlistId, [search_results[0]['videoId']])
yt = YTMusic('oauth.json')
playlistId = yt.create_playlist('test', 'test description')
search_results = yt.search('Oasis Wonderwall')
yt.add_playlist_items(playlistId, [search_results[0]['videoId']])

The `tests <https://github.com/sigma67/ytmusicapi/blob/master/tests/test.py>`_ are also a great source of usage examples.

Expand All @@ -79,7 +92,7 @@ The `tests <https://github.com/sigma67/ytmusicapi/blob/master/tests/test.py>`_ a
Requirements
==============

- Python 3.5 or higher - https://www.python.org
- Python 3.8 or higher - https://www.python.org

Setup and Usage
===============
Expand Down
Loading