From c68848026a7594ef1ff6c41c8f91d9ccd69b5d20 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 14 Apr 2010 22:01:45 +0000 Subject: [PATCH] * morituri/common/encode.py: * morituri/rip/image.py: Provide status on the retagging. --- ChangeLog | 6 ++++++ morituri/common/encode.py | 1 + morituri/rip/image.py | 9 ++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9f7bd46..db074e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-15 Thomas Vander Stichele + + * morituri/common/encode.py: + * morituri/rip/image.py: + Provide status on the retagging. + 2010-04-15 Thomas Vander Stichele patch by: Peter Oliver diff --git a/morituri/common/encode.py b/morituri/common/encode.py index 15a492e..05d9146 100644 --- a/morituri/common/encode.py +++ b/morituri/common/encode.py @@ -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") diff --git a/morituri/rip/image.py b/morituri/rip/image.py index f5eed78..0584c6c 100644 --- a/morituri/rip/image.py +++ b/morituri/rip/image.py @@ -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"