Skip to content

Commit

Permalink
use yt music for downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
xnetcat committed Oct 25, 2022
1 parent c6adde0 commit cf1f032
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spotdl/providers/audio/ytmusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def get_results(self, search_term: str, **kwargs) -> List[Dict[str, Any]]:
{
"name": result["title"],
"type": result["resultType"],
"link": f"https://youtube.com/watch?v={result['videoId']}",
"link": f"https://{'music' if result['resultType'] == 'song' else 'www'}.youtube.com/watch?v={result['videoId']}",
"album": result.get("album", {}).get("name")
if result.get("album")
else None,
Expand Down
4 changes: 2 additions & 2 deletions tests/providers/audio/test_ytmusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def test_ytm_search():
}
)
) in [
"https://youtube.com/watch?v=nfyk-V5CoIE",
"https://youtube.com/watch?v=bNXMlIogpXc",
"https://music.youtube.com/watch?v=nfyk-V5CoIE",
"https://music.youtube.com/watch?v=bNXMlIogpXc",
]


Expand Down

0 comments on commit cf1f032

Please sign in to comment.