Skip to content

Commit

Permalink
add tests for single rule executor
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Oct 31, 2023
1 parent 96ee387 commit c0e310d
Show file tree
Hide file tree
Showing 5 changed files with 278 additions and 97 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
dev-deps = with python.pkgs; [
mypy
pytest
pytest-timeout
pytest-cov
pytest-xdist
];
Expand Down
8 changes: 4 additions & 4 deletions rose/artiststr.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def _split_tag(t: str | None) -> list[str]:
producer=_deduplicate(li_producer),
djmixer=_deduplicate(li_dj),
)
logger.debug(
f"Parsed args {main=} {remixer=} {composer=} {conductor=} {producer=} {dj=} as {rval=}"
)
# logger.debug(
# f"Parsed args {main=} {remixer=} {composer=} {conductor=} {producer=} {dj=} as {rval=}"
# )
return rval


Expand All @@ -86,7 +86,7 @@ def format_artist_string(a: ArtistMapping) -> str:
r += " remixed by " + ";".join(a.remixer)
if a.producer:
r += " produced by " + ";".join(a.producer)
logger.debug(f"Formatted {a} as {r}")
# logger.debug(f"Formatted {a} as {r}")
return r


Expand Down
6 changes: 3 additions & 3 deletions rose/audiotags.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _write_tag_with_description(name: str, value: str | None) -> None:
_write_tag_with_description("TXXX:ROSEID", self.id)
_write_tag_with_description("TXXX:ROSERELEASEID", self.release_id)
_write_standard_tag("TIT2", self.title)
_write_standard_tag("TDRC", str(self.year))
_write_standard_tag("TDRC", str(self.year).zfill(4))
_write_standard_tag("TRCK", self.track_number)
_write_standard_tag("TPOS", self.disc_number)
_write_standard_tag("TALB", self.album)
Expand All @@ -258,7 +258,7 @@ def _write_tag_with_description(name: str, value: str | None) -> None:
m.tags["----:net.sunsetglow.rose:ID"] = (self.id or "").encode()
m.tags["----:net.sunsetglow.rose:RELEASEID"] = (self.release_id or "").encode()
m.tags["\xa9nam"] = self.title or ""
m.tags["\xa9day"] = str(self.year)
m.tags["\xa9day"] = str(self.year).zfill(4)
m.tags["\xa9alb"] = self.album or ""
m.tags["\xa9gen"] = ";".join(self.genre)
m.tags["----:com.apple.iTunes:LABEL"] = ";".join(self.label).encode()
Expand Down Expand Up @@ -312,7 +312,7 @@ def _write_tag_with_description(name: str, value: str | None) -> None:
m.tags["roseid"] = self.id or ""
m.tags["rosereleaseid"] = self.release_id or ""
m.tags["title"] = self.title or ""
m.tags["date"] = str(self.year)
m.tags["date"] = str(self.year).zfill(4)
m.tags["tracknumber"] = self.track_number or ""
m.tags["discnumber"] = self.disc_number or ""
m.tags["album"] = self.album or ""
Expand Down
Loading

0 comments on commit c0e310d

Please sign in to comment.