Compare commits
No commits in common. "df5fc374196f5b23a14104580bb9e511a8a4a7eb" and "e4f7172f8860e014812eea4512cf92fb0751e3cd" have entirely different histories.
df5fc37419
...
e4f7172f88
@ -15,10 +15,6 @@ class MoveInstruction(Instruction):
|
|||||||
new_path: Path
|
new_path: Path
|
||||||
|
|
||||||
def __call__(self) -> None:
|
def __call__(self) -> None:
|
||||||
if self.old_path == self.new_path:
|
|
||||||
# No-op
|
|
||||||
return
|
|
||||||
|
|
||||||
if self.new_path.exists():
|
if self.new_path.exists():
|
||||||
raise FileExistsError("New path already exists, not moving anything")
|
raise FileExistsError("New path already exists, not moving anything")
|
||||||
|
|
||||||
|
@ -62,12 +62,6 @@ def move(songs: Sequence[Song], base_dir: Path) -> Sequence[MoveInstruction]:
|
|||||||
variant += 1
|
variant += 1
|
||||||
|
|
||||||
song_dir_strs_lower.add(str(canonical_song_dir).lower())
|
song_dir_strs_lower.add(str(canonical_song_dir).lower())
|
||||||
|
|
||||||
if song_dir == canonical_song_dir:
|
|
||||||
# After finding a free variant index, we arrived at the index we already had previously, this means
|
|
||||||
# we do not need to generate a move instruction
|
|
||||||
continue
|
|
||||||
|
|
||||||
move_instructions.append(
|
move_instructions.append(
|
||||||
MoveInstruction(absolute_song_dir, base_dir / canonical_song_dir)
|
MoveInstruction(absolute_song_dir, base_dir / canonical_song_dir)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user