예제 #1
0
파일: reorganize.py 프로젝트: r3/r3tagger
    def rename_track(track, pattern):
        supported_fields = track.supported_fields()
        fields = {field: getattr(track, field) for field in supported_fields}
        name = pattern.format(**fields) + extension(track.path)

        destination = os.path.join(parent(track.path), name)
        shutil.move(track.path, destination)
        track.path = destination
예제 #2
0
파일: test_Library.py 프로젝트: r3/r3tagger
def test_extension():
    assert library.extension(path_file) == '.ext'