[SCM] morituri/master: * morituri/rip/cd.py: Create variables for default templates.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:30 UTC 2014


The following commit has been merged in the master branch:
commit 263260f82004c439ecf5052701ff16b99ab49637
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Mon May 30 18:04:24 2011 +0000

    	* morituri/rip/cd.py:
    	  Create variables for default templates.

diff --git a/ChangeLog b/ChangeLog
index 3611b4d..c4a1fa9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-05-30  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/rip/cd.py:
+	  Create variables for default templates.
+
+2011-05-30  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* morituri/test/test_common_program.py:
 	  Add tests for naming of disc output location.
 
diff --git a/morituri/rip/cd.py b/morituri/rip/cd.py
index 39b0e7f..3295152 100644
--- a/morituri/rip/cd.py
+++ b/morituri/rip/cd.py
@@ -31,6 +31,8 @@ from morituri.common import drive, program
 from morituri.result import result
 from morituri.program import cdrdao
 
+DEFAULT_TRACK_TEMPLATE = u'%A - %d/%t. %a - %n'
+DEFAULT_DISC_TEMPLATE = u'%A - %d/%A - %d'
 
 class Rip(logcommand.LogCommand):
     summary = "rip CD"
@@ -66,16 +68,16 @@ Discs are named according to the disc template:
             help="pickle to use for reading and writing the TOC",
             default=default)
         # FIXME: get from config
-        default = '%A - %d/%t. %a - %n'
         self.parser.add_option('', '--track-template',
             action="store", dest="track_template",
-            help="template for track file naming (default %s)" % default,
-            default=default)
-        default = '%A - %d/%A - %d'
+            help="template for track file naming (default %s)" %
+                DEFAULT_TRACK_TEMPLATE,
+            default=DEFAULT_DISC_TEMPLATE)
         self.parser.add_option('', '--disc-template',
             action="store", dest="disc_template",
-            help="template for disc file naming (default %s)" % default,
-            default=default)
+            help="template for disc file naming (default %s)" %
+                DEFAULT_DISC_TEMPLATE,
+            default=DEFAULT_DISC_TEMPLATE)
         default = 'flac'
 
         # here to avoid import gst eating our options

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list