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

Fix crash fetching cover art for unknown album #459

Merged
merged 1 commit into from
Jan 29, 2020
Merged

Fix crash fetching cover art for unknown album #459

merged 1 commit into from
Jan 29, 2020

Commits on Jan 29, 2020

  1. Fix crash fetching cover art for unknown album

    Ripping an unknown album when cover art fetching is enabled (e.g.
    `whipper cd rip --unknown --cover-art complete`) causes whipper to crash
    with an error similar to the following:
    
    ```python
    Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File ".../whipper/whipper/command/main.py", line 43, in main
        ret = cmd.do()
        File ".../whipper/whipper/command/basecommand.py", line 139, in do
        return self.cmd.do()
        File ".../whipper/whipper/command/basecommand.py", line 139, in do
        return self.cmd.do()
        File ".../whipper/whipper/command/cd.py", line 191, in do
        self.doCommand()
        File ".../whipper/whipper/command/cd.py", line 363, in doCommand
        self.program.metadata.mbid)
    AttributeError: 'NoneType' object has no attribute 'mbid'
    ```
    
    due to accessing `self.program.metadata.mbid` when
    `self.program.metadata` is `None`. To avoid this, only attempt to get
    cover art when `self.program.metadata` is available.
    
    Also print a warning when the cover art can't be fetched to inform the
    user that it isn't being downloaded.
    
    Signed-off-by: Kevin Locke <[email protected]>
    kevinoid authored and JoeLametta committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    3ec17db View commit details
    Browse the repository at this point in the history