Skip to content

Commit

Permalink
Fix checking the existence of Genres... I'm sorry for that, @darrel-k!
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelherger committed Dec 15, 2024
1 parent de3153b commit c860f34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Slim/Schema/Genre.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ sub isMyClassicalGenre {

loadMyClassicalGenreMap() if !$myClassicalGenreMap;

return grep {
return (grep {
$myClassicalGenreMap->{uc($_)}
} Slim::Music::Info::splitTag($genres, $sep) ? 1 : 0;
} Slim::Music::Info::splitTag($genres, $sep)) ? 1 : 0;
}

sub myClassicalGenreIds {
Expand Down

2 comments on commit c860f34

@darrell-k
Copy link
Contributor

Choose a reason for hiding this comment

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

I still can't see that other commit page properly, unless I'm signed out of Github. Something very odd going on. I managed to post the comment from Chromium rather than Firefox, and then Chromium crashed!

Oh well.

As far as %$myClassicalGenreMap{uc($_)} goes, I thought I was just dereferencing $myClassicalGenreMap because the compiler insisted on it.

What am I getting wrong here?

@michaelherger
Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't found the documentation for that syntax yet. From what I see from experimentation it seems to return the value and the key. In order to de-reference a hash ref you'd use the arrow notation.

Please sign in to comment.