[SCM] morituri/master: rename our musicbrainzngs.py to mbngs.py

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:10:03 UTC 2014


The following commit has been merged in the master branch:
commit ee99d833a7e8d11d634d9ea1f9193c8be340a88c
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun Feb 17 18:30:32 2013 +0100

    rename our musicbrainzngs.py to mbngs.py
    
    Helps Debian package which prefers to strip out our copy of
    musicbrainzngs

diff --git a/morituri/common/Makefile.am b/morituri/common/Makefile.am
index ce1e3a0..bbda7f6 100644
--- a/morituri/common/Makefile.am
+++ b/morituri/common/Makefile.am
@@ -16,7 +16,7 @@ morituri_PYTHON = \
 	gstreamer.py \
 	log.py \
 	logcommand.py \
-	musicbrainzngs.py \
+	mbngs.py \
 	program.py \
 	renamer.py \
 	task.py
diff --git a/morituri/common/musicbrainzngs.py b/morituri/common/mbngs.py
similarity index 95%
rename from morituri/common/musicbrainzngs.py
rename to morituri/common/mbngs.py
index 9a0ecfa..055899c 100644
--- a/morituri/common/musicbrainzngs.py
+++ b/morituri/common/mbngs.py
@@ -1,4 +1,4 @@
-# -*- Mode: Python; test-case-name: morituri.test.test_common_musicbrainzngs -*-
+# -*- Mode: Python; test-case-name: morituri.test.test_common_mbngs -*-
 # vi:si:et:sw=4:sts=4:ts=4
 
 # Morituri - for those about to RIP
@@ -90,7 +90,7 @@ def _record(record, which, name, what):
         handle = open(filename, 'w')
         handle.write(json.dumps(what))
         handle.close()
-        log.info('musicbrainzngs', 'Wrote %s %s to %s', which, name, filename)
+        log.info('mbngs', 'Wrote %s %s to %s', which, name, filename)
 
 
 def _getMetadata(releaseShort, release, discid):
@@ -117,7 +117,7 @@ def _getMetadata(releaseShort, release, discid):
     artist = credit[0]['artist']
 
     if len(credit) > 1:
-        log.debug('musicbrainzngs', 'artist-credit more than 1: %r', credit)
+        log.debug('mbngs', 'artist-credit more than 1: %r', credit)
 
     for i, c in enumerate(credit):
         if isinstance(c, dict):
@@ -136,7 +136,7 @@ def _getMetadata(releaseShort, release, discid):
     metadata.sortName = artist['sort-name']
     # FIXME: is format str ?
     if not 'date' in release:
-        log.warning('musicbrainzngs', 'Release %r does not have date', release)
+        log.warning('mbngs', 'Release %r does not have date', release)
     else:
         metadata.release = release['date']
 
@@ -170,7 +170,7 @@ def _getMetadata(releaseShort, release, discid):
                     track = TrackMetadata()
                     credit = t['recording']['artist-credit']
                     if len(credit) > 1:
-                        log.debug('musicbrainzngs',
+                        log.debug('mbngs',
                             'artist-credit more than 1: %r', credit)
                         # credit is of the form [dict, str, dict, ... ]
                     for i, c in enumerate(credit):
diff --git a/morituri/common/program.py b/morituri/common/program.py
index 5c49d86..73385b9 100644
--- a/morituri/common/program.py
+++ b/morituri/common/program.py
@@ -28,7 +28,7 @@ import os
 import sys
 import time
 
-from morituri.common import common, log, musicbrainzngs, cache
+from morituri.common import common, log, mbngs, cache
 from morituri.program import cdrdao, cdparanoia
 from morituri.image import image
 
@@ -301,11 +301,11 @@ class Program(log.Loggable):
 
         for _ in range(0, 4):
             try:
-                metadatas = musicbrainzngs.musicbrainz(mbdiscid,
+                metadatas = mbngs.musicbrainz(mbdiscid,
                     record=self._record)
-            except musicbrainzngs.NotFoundException, e:
+            except mbngs.NotFoundException, e:
                 break
-            except musicbrainzngs.MusicBrainzException, e:
+            except mbngs.MusicBrainzException, e:
                 self._stdout.write("Warning: %r\n" % (e, ))
                 time.sleep(5)
                 continue
diff --git a/morituri/rip/debug.py b/morituri/rip/debug.py
index e7f09d0..d8d27d6 100644
--- a/morituri/rip/debug.py
+++ b/morituri/rip/debug.py
@@ -196,8 +196,8 @@ Example disc id: KnpGsLhvH.lPrNc1PBL21lb9Bg4-"""
             self.stdout.write('Please specify a MusicBrainz disc id.\n')
             return 3
 
-        from morituri.common import musicbrainzngs
-        metadatas = musicbrainzngs.musicbrainz(discId)
+        from morituri.common import mbngs
+        metadatas = mbngs.musicbrainz(discId)
 
         self.stdout.write('%d releases\n' % len(metadatas))
         for i, md in enumerate(metadatas):
diff --git a/morituri/test/Makefile.am b/morituri/test/Makefile.am
index 8ac84e7..b32aed1 100644
--- a/morituri/test/Makefile.am
+++ b/morituri/test/Makefile.am
@@ -11,7 +11,7 @@ EXTRA_DIST = \
 	test_common_drive.py \
 	test_common_encode.py \
 	test_common_gstreamer.py \
-	test_common_musicbrainzngs.py \
+	test_common_mbngs.py \
 	test_common_program.py \
 	test_common_renamer.py \
 	test_image_cue.py \
diff --git a/morituri/test/test_common_musicbrainzngs.py b/morituri/test/test_common_mbngs.py
similarity index 69%
rename from morituri/test/test_common_musicbrainzngs.py
rename to morituri/test/test_common_mbngs.py
index ffe9c1b..ba5f30b 100644
--- a/morituri/test/test_common_musicbrainzngs.py
+++ b/morituri/test/test_common_mbngs.py
@@ -1,4 +1,4 @@
-# -*- Mode: Python; test-case-name: morituri.test.test_common_musicbrainzngs -*-
+# -*- Mode: Python; test-case-name: morituri.test.test_common_mbngs -*-
 # vi:si:et:sw=4:sts=4:ts=4
 
 import os
@@ -6,7 +6,7 @@ import json
 
 import unittest
 
-from morituri.common import musicbrainzngs
+from morituri.common import mbngs
 
 
 class MetadataTestCase(unittest.TestCase):
@@ -19,6 +19,6 @@ class MetadataTestCase(unittest.TestCase):
         handle.close()
         discid = "wbjbST2jUHRZaB1inCyxxsL7Eqc-"
 
-        metadata = musicbrainzngs._getMetadata({}, response['release'], discid)
+        metadata = mbngs._getMetadata({}, response['release'], discid)
 
         self.failIf(metadata.release)
diff --git a/morituri/test/test_common_program.py b/morituri/test/test_common_program.py
index 102540b..21a8926 100644
--- a/morituri/test/test_common_program.py
+++ b/morituri/test/test_common_program.py
@@ -7,7 +7,7 @@ import pickle
 import unittest
 
 from morituri.result import result
-from morituri.common import program, accurip, musicbrainzngs
+from morituri.common import program, accurip, mbngs
 from morituri.rip import common as rcommon
 
 
@@ -95,7 +95,7 @@ class PathTestCase(unittest.TestCase):
 
     def testStandardTemplateFilled(self):
         prog = program.Program()
-        md = musicbrainzngs.DiscMetadata()
+        md = mbngs.DiscMetadata()
         md.artist = md.sortName = 'Jeff Buckley'
         md.title = 'Grace'
         prog.metadata = md
@@ -107,7 +107,7 @@ class PathTestCase(unittest.TestCase):
 
     def testIssue66TemplateFilled(self):
         prog = program.Program()
-        md = musicbrainzngs.DiscMetadata()
+        md = mbngs.DiscMetadata()
         md.artist = md.sortName = 'Jeff Buckley'
         md.title = 'Grace'
         prog.metadata = md

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list