Skip to content

Commit

Permalink
new: dev: release prep
Browse files Browse the repository at this point in the history
  • Loading branch information
nicfit committed Mar 29, 2020
1 parent 36b3301 commit c6e3e41
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
9 changes: 9 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ Release History

.. :changelog:
v0.9.5 (2020-03-28) : I Knew Her, She Knew Me
----------------------------------------------

Fix
~~~
- `eyeD3 --genre ""` to clear genre frame restored.
- Genre id->name mapping for non-standard genres and custom maps.


v0.9.4 (2020-03-21) : The Devil Made Me Do It
-----------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions eyed3/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def __parse_version(v): # pragma: nocover
return ver, rel, ver_info


__version__ = "0.9.5a0"
__release_name__ = ""
__version__ = "0.9.5"
__release_name__ = "I Knew Her, She Knew Me"
__years__ = "2002-2020"

_, __release__, __version_info__ = __parse_version(__version__)
Expand Down
2 changes: 1 addition & 1 deletion eyed3/id3/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def _setGenre(self, g, id3_std=True):
A Genre object, an acceptable (see Genre.parse) genre string,
or an integer genre ID all will set the value. A value of None will
remove the genre."""
if not g:
if g in ("", None):
if self.frame_set[frames.GENRE_FID]:
del self.frame_set[frames.GENRE_FID]
return
Expand Down
3 changes: 3 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def image(tmpdir):

@pytest.fixture(scope="session")
def eyeD3():
"""A fixture for running `eyeD3` default plugin.
`eyeD3(audiofile, args, expected_retval=0, reload_version=None)`
"""
from eyed3 import main

def func(audiofile, args, expected_retval=0, reload_version=None):
Expand Down
6 changes: 6 additions & 0 deletions test/test_classic_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,3 +867,9 @@ def test_removeTagWithBoth_v1_withConvert(audiofile, eyeD3):
v2_tag = eyeD3(audiofile, ["-2"], reload_version=id3.ID3_V2).tag
assert v2_tag is not None and v2_tag.artist == "Poison Idea"


def test_clearGenre(audiofile, eyeD3):
audiofile = eyeD3(audiofile, ["--genre=Rock"])
assert audiofile.tag.genre.name, audiofile.tag.genre.name == ("Rock", 17)
audiofile = eyeD3(audiofile, ["--genre", ""])
assert audiofile.tag.genre is None

0 comments on commit c6e3e41

Please sign in to comment.