Verified Commit df5fc374 authored by Jakob Moser's avatar Jakob Moser
Browse files

Don't generate no-ops

parent b5649a34
Loading
Loading
Loading
Loading
+6 −0
Changes for karaokatalog/organize/move.py: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -62,6 +62,12 @@ def move(songs: Sequence[Song], base_dir: Path) -> Sequence[MoveInstruction]:
                variant += 1

            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(
                MoveInstruction(absolute_song_dir, base_dir / canonical_song_dir)
            )