Skip to content

Add album method should not ignore artist when passed as argument #195

Description

@tonarec

Describe the bug
As an album belongs to an artist, when adding a new album to the database we should also check if the artist (when given in arguments) matches the album.

To Reproduce
Steps to reproduce the behavior:

# The first time
db.add_album("FooBar", 123456)

# The others times
db.add_album("FooBar") # Error because of album name
db.add_album("FooBar", 654321) # Still error even if different ArtistID

The resulting error is:

ValueError("Album 'FooBar' already exists in database")

Expected behavior
Don't trigger the ValueError if the album name exists, but not for the current ArtistID

Environment

  • Pyrekordbox version: 0.4.4
  • Rekordbox version: 6.8.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions