* morituri/common/encode.py:

* morituri/rip/image.py:
	  Provide status on the retagging.
This commit is contained in:
Thomas Vander Stichele
2010-04-14 22:01:45 +00:00
parent 710a9ebb35
commit c68848026a
3 changed files with 15 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2010-04-15 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/common/encode.py:
* morituri/rip/image.py:
Provide status on the retagging.
2010-04-15 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Peter Oliver

View File

@@ -492,6 +492,7 @@ class SafeRetagTask(task.MultiSeparateTask):
shutil.copymode(self._path, self._tmppath)
self.debug('moving temporary file to %r' % self._path)
os.rename(self._tmppath, self._path)
self.changed = True
else:
# FIXME: don't raise TypeError
e = TypeError("Checksums failed")

View File

@@ -125,7 +125,14 @@ class Retag(logcommand.LogCommand):
taglist = prog.getTagList(track.number)
self.debug('possibly retagging %r with taglist %r',
path, taglist)
runner.run(encode.SafeRetagTask(path, taglist))
t = encode.SafeRetagTask(path, taglist)
runner.run(t)
path = os.path.basename(path)
if t.changed:
print 'Retagged %s' % path
else:
print '%s already tagged correctly' % path
print
class Verify(logcommand.LogCommand):
summary = "verify image"