Skip to content

Commit

Permalink
added artist id to song object
Browse files Browse the repository at this point in the history
  • Loading branch information
xnetcat committed Mar 28, 2024
1 parent 1e59b56 commit d5416ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spotdl/types/song.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class Song:
list_url: Optional[str] = None
list_position: Optional[int] = None
list_length: Optional[int] = None
artist_id: Optional[str] = None

@classmethod
def from_url(cls, url: str) -> "Song":
Expand Down Expand Up @@ -103,6 +104,7 @@ def from_url(cls, url: str) -> "Song":
name=raw_track_meta["name"],
artists=[artist["name"] for artist in raw_track_meta["artists"]],
artist=raw_track_meta["artists"][0]["name"],
artist_id=primary_artist_id,
album_id=album_id,

This comment has been minimized.

album_name=raw_album_meta["name"],
album_artist=raw_album_meta["artists"][0]["name"],
Expand Down

1 comment on commit d5416ab

@yslvna
Copy link

@yslvna yslvna commented on d5416ab Jun 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

74669431   --


Please sign in to comment.