dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit 279cda4b241081d0c9237738f1087808fabd5b61
parent 8a3965f81d3fd2c194da7426361f156f9c99e40b
Author: rsiddharth <s@ricketyspace.net>
Date:   Tue, 12 Dec 2017 04:14:52 +0000

.bin/tagmp3album: Fix tag_track.

.bin/tagmp3album (tag_track): Add arg num_of_tracks.

Diffstat:
.bin/tagmp3album | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/.bin/tagmp3album b/.bin/tagmp3album @@ -91,17 +91,21 @@ def track_path(dir_path, title): return False -def tag_track(path, artist, album, title, track_num): +def tag_track(path, artist, album, title, track_num, num_of_tracks): """Tag track. """ + print('Tagging - {} - {} - {} - {} - {}'.format(path, track_num, + artist, album, + title)) + track = eyed3.load(path) track.initTag() track.tag.artist = artist track.tag.album = album track.tag.title = title - track.tag.track_num = track_num + track.tag.track_num = (track_num, num_of_tracks) track.tag.save() @@ -127,7 +131,8 @@ def tag_album(album_info_file): not_found.append(track_title) continue - tag_track(t_path, artist, album, track_title, track_num) + tag_track(t_path, artist, album, track_title, track_num, + len(album_info['tracks'])) if not_found: print_tracks_not_found(not_found)