Skip to content

Commit

Permalink
fix: Genre id->name mapping for non-standard genres and custom maps.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicfit committed Mar 28, 2020
1 parent 0c7f3d0 commit 75a9a37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eyed3/id3/__init__.py
Expand Up @@ -160,10 +160,10 @@ def id(self, val):
return

val = int(val)
if val not in genres.keys() or not genres[val]:
if val not in self._genre_map.keys() or not self._genre_map[val]:
raise ValueError(f"Unknown genre ID: {val}")

name = genres[val]
name = self._genre_map[val]
self._id = val
self._name = name

Expand Down

0 comments on commit 75a9a37

Please sign in to comment.