Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rip out all code that uses gstreamer #130

Merged
merged 5 commits into from
Apr 23, 2017

Conversation

MerlijnWajer
Copy link
Collaborator

We can now rip CDs without gstreamer.

This is not the most clean attempt, but I have tried to remove most of the
code that depends on gstreamer. I hope there is not a lot of code left that
depends on code that I have removed - I can at least rip a CD fully.

Please review and make notes and check what we are removing. Then please figure out what we want to keep, what we need to re-implement, and so on.

We can now rip CDs without gstreamer.

This is not the most clean attempt, but I have tried to remove most of the
code that depends on gstreamer. I hope there is not a lot of code left that
depends on code that I have removed - I can at least rip a CD fully.
Copy link
Member

@Freso Freso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, from a pure read-over, I don't really have any functional comments, just code style ones. Basically a bunch of comments about blank lines.

The old code wasn't PEP 8, but this cleanup might be a good chance to move a slight bit closer to it?

@@ -59,8 +60,6 @@ def add_arguments(self):
)

def do(self):
# here to avoid import gst eating our options
from morituri.common import encode

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also remove this empty line?

@@ -209,8 +210,6 @@ def _arcs(self, runner, table, track, offset):
track, offset)
runner.run(t)

# here to avoid import gst eating our options
from morituri.common import checksum

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also remove this empty line?

@@ -135,47 +135,6 @@ def formatTime(seconds, fractional=3):

return " ".join(chunks)


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next line is a class so this empty line should be kept. :)

@@ -491,8 +490,6 @@ def getHTOA(self):
return (start, stop)

def verifyTrack(self, runner, trackResult):
# here to avoid import gst eating our options
from morituri.common import checksum

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to remove this line too.

@@ -135,8 +137,6 @@ def __init__(self, image):

path = image.getRealPath(index.path)

# here to avoid import gst eating our options
from morituri.common import checksum

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to remove this empty line.

cue = image.cue
self._tasks = []
self.lengths = {}

def add(index):
# here to avoid import gst eating our options
from morituri.common import encode

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this line? Let it go!

Copy link
Collaborator

@JoeLametta JoeLametta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll repeat what I've written on IRC.

Human inspection

Overall the PR looks good, the only thing left to be done is updating the Travis CI YML file to remove GStreamer's dependencies.

Static/Dynamic inspection

Please note that some issues are probably not relevant to this PR:

morituri/command/cd.py

  • Unused import statement (at line 34)
  • Expected type 'str', got 'unicode' instead (at line 513)

morituri/command/debug.py

  • Cannot find reference 'ALL_PROFILES' in 'encode.py' (at line 162)
  • Cannot find reference 'ALL_PROFILES' in 'encode.py' (at line 171)
  • Unresolved attribute reference 'peak' for class 'FlacEncodeTask' (at line 194)
  • Cannot find reference 'TagReadTask' in 'encode.py' (at line 217)
  • Expected type 'str', got 'unicode' instead (at line 245)
  • Signature of method 'RCCue.do()' does not match signature of base method in class 'BaseCommand' (at line 37)
  • Signature of method 'RCList.do()' does not match signature of base method in class 'BaseCommand' (at line 61)
  • Signature of method 'RCLog.do()' does not match signature of base method in class 'BaseCommand' (at line 96)

morituri/command/image.py

  • Unresolved attribute reference 'checksum' for class 'Task' (at line 148)
  • Cannot find reference 'EncodeTaskFlac' in 'encode.py' (at line 240)

morituri/command/offset.py

  • No module named BeautifulSoup (at line 9)
  • Local variable 'prog' is assigned to but never used (at line 84)

morituri/common/checksum.py

  • Unused import statement (at line 25)
  • Unused import statement (at line 24)
  • Unused import statement (at line 30)
  • Unused import statement (at line 23)

morituri/common/encode.py

  • Unused import statement (at line 30)
  • Unused import statement (at line 24)
  • Unused import statement (at line 31)
  • Unused import statement (at line 23)
  • Unused import statement (at line 25)
  • Unused import statement (at line 26)

morituri/common/program.py

  • Function 'ripTrack' does not have a parameter 'number' (at line 518)
  • Function 'ripTrack' does not have a parameter 'number' (at line 519)
  • Cannot find reference 'ImageRetagTask' in 'image.py' (at line 564)

morituri/image/image.py

  • Cannot find reference 'SafeRetagTask' in 'encode.py' (at line 99)

@Freso
Copy link
Member

Freso commented Feb 13, 2017

I checked out remove-gstreamer and ran a series of commands with some dutty rock in the drive:

freso@din ~/D/whipper> virtualenv2 ~/tmp/testenv                                                                                                                                                     New python executable in /home/freso/tmp/testenv/bin/python2
Also creating executable in /home/freso/tmp/testenv/bin/python
Installing setuptools, pip, wheel...done.
freso@din ~/D/whipper> ln -s /usr/lib/python2.7/site-packages/gobject ~/tmp/testenv/lib/python2.7/site-packages/
freso@din ~/D/whipper> . ~/tmp/testenv/bin/activate.fish
(testenv) freso@din ~/D/whipper> pip install git+https://github.com/alastair/python-musicbrainzngs.git pycdio git+https://github.com/Freso/cddb-py.git setuptools
Collecting git+https://github.com/alastair/python-musicbrainzngs.git
  Cloning https://github.com/alastair/python-musicbrainzngs.git to /tmp/pip-DLphr0-build
Collecting git+https://github.com/Freso/cddb-py.git
  Cloning https://github.com/Freso/cddb-py.git to /tmp/pip-ciMunO-build
Collecting pycdio                                                                                                                                                                                    Requirement already satisfied: setuptools in /tmp/freso-tmp/testenv/lib/python2.7/site-packages
Requirement already satisfied: appdirs>=1.4.0 in /tmp/freso-tmp/testenv/lib/python2.7/site-packages (from setuptools)
Requirement already satisfied: packaging>=16.8 in /tmp/freso-tmp/testenv/lib/python2.7/site-packages (from setuptools)
Requirement already satisfied: six>=1.6.0 in /tmp/freso-tmp/testenv/lib/python2.7/site-packages (from setuptools)                                                                                    Requirement already satisfied: pyparsing in /tmp/freso-tmp/testenv/lib/python2.7/site-packages (from packaging>=16.8->setuptools)
Installing collected packages: pycdio, musicbrainzngs, CDDB
  Running setup.py install for musicbrainzngs ... done
  Running setup.py install for CDDB ... done
Successfully installed CDDB-1.4 musicbrainzngs-0.7.dev0 pycdio-0.20
(testenv) freso@din ~/D/whipper> whipper drive analyze
cdparanoia can defeat the audio cache on this drive.
Adding drive cache behaviour to configuration file.
(testenv) freso@din ~/D/whipper> whipper offset find
Checking device /dev/sr0
Trying read offset 6 ...
ImportError: No module named pygtk 100 %
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
Offset of device is likely 6, confirming ... 
                                             
Read offset of device is: 6.
Adding read offset to configuration file.
(testenv) freso@din ~/D/whipper> whipper cd rip --working-directory="~/tmp/rip" --output-directory="~/tmp/rip"
Using configured read offset 6
Checking device /dev/sr0
CDDB disc id: 65124817
MusicBrainz disc id svUs0n_oBCOD3DNpAu28omj.WFQ-
MusicBrainz lookup URL https://musicbrainz.org/cdtoc/attach?toc=1+23+351215+150+11020+27822+44807+62387+78295+96650+105357+119992+137617+158097+175302+190657+206770+223300+232482+238852+253910+270972+288535+305577+321975+338240&tracks=23&id=svUs0n_oBCOD3DNpAu28omj.WFQ-
Disc duration: 01:18:00.866, 23 audio tracks

Matching releases:                                                                                                                                                                                    
Artist  : Sean Paul
Title   : Dutty Rock
Duration: 01:17:58.553                                                                                                                                                                               URL     : https://musicbrainz.org/release/8c10b3ec-a0ff-4819-a6e9-9287c48e5a85
Release : 8c10b3ec-a0ff-4819-a6e9-9287c48e5a85
Type    : Album
Barcode : 075679316721
Cat no  : 7567-93167-2

** Message: pygobject_register_sinkfunc is deprecated (GstObject)
Creating output directory /home/freso/tmp/rip/album/Sean Paul - Dutty Rock
Ripping track 1 of 23: 01. Sean Paul - Dutty Rock Intro.flac
Checksums match for track 1               
Peak level: 87.86%
Rip quality: 100.00%
Ripping track 2 of 23: 02. Sean Paul - Shout (Street Respect).flac
Checksums match for track 2               
Peak level: 87.83%
Rip quality: 100.00%
Ripping track 3 of 23: 03. Sean Paul - Gimme the Light.flac
Checksums match for track 3               
Peak level: 88.47%
Rip quality: 100.00%
Ripping track 4 of 23: 04. Sean Paul - Like Glue.flac
Checksums match for track 4               
Peak level: 93.30%
Rip quality: 100.00%
Ripping track 5 of 23: 05. Sean Paul - Get Busy.flac
Checksums match for track 5               
Peak level: 98.17%
Rip quality: 100.00%
Ripping track 6 of 23: 06. Sean Paul feat. Rahzel - Top of the Game.flac
Checksums match for track 6               
Peak level: 96.47%
Rip quality: 100.00%
Ripping track 7 of 23: 07. Sean Paul - Police Skit.flac
Checksums match for track 7               
Peak level: 94.24%
Rip quality: 100.00%
Ripping track 8 of 23: 08. Sean Paul feat. Chico - Ganja Breed.flac
Checksums match for track 8               
Peak level: 95.75%
Rip quality: 100.00%
Ripping track 9 of 23: 09. Sean Paul - Concrete.flac
Checksums match for track 9               
Peak level: 99.52%
Rip quality: 100.00%
Ripping track 10 of 23: 10. Sean Paul feat. Sasha - I'm Still in Love With You.flac
Checksums match for track 10               
Peak level: 98.48%
Rip quality: 100.00%
Ripping track 11 of 23: 11. Sean Paul feat. Debbie Nova - International Affair.flac
Checksums match for track 11               
Peak level: 93.47%
Rip quality: 100.00%
Ripping track 12 of 23: 12. Sean Paul feat. Ce'Cile - Can You Do the Work.flac
Checksums match for track 12               
Peak level: 95.54%
Rip quality: 100.00%
Ripping track 13 of 23: 13. Sean Paul - Punkie.flac
Checksums match for track 13               
Peak level: 97.81%
Rip quality: 100.00%
Ripping track 14 of 23: 14. Sean Paul - My Name.flac
Checksums match for track 14               
Peak level: 96.78%
Rip quality: 100.00%
Ripping track 15 of 23: 15. Sean Paul - Jukin' Punny.flac
Checksums match for track 15               
Peak level: 99.97%
Rip quality: 100.00%
Ripping track 16 of 23: 16. Sean Paul - Uptown Haters Skit.flac
Checksums match for track 16               
Peak level: 99.97%
Rip quality: 100.00%
Ripping track 17 of 23: 17. Sean Paul feat. Busta Rhymes - Gimme the Light (Pass the Dro‐Voisier remix).flac
Checksums match for track 17               
Peak level: 98.29%
Rip quality: 100.00%
Ripping track 18 of 23: 18. Sean Paul feat. Fahrenheit - Bubble.flac
Checksums match for track 18               
Peak level: 93.26%
Rip quality: 100.00%
Ripping track 19 of 23: 19. Sean Paul - Shake That Thing.flac
Checksums match for track 19               
Peak level: 94.61%
Rip quality: 100.00%
Ripping track 20 of 23: 20. Sean Paul feat. Tony Touch & R.O.B.B. - Esa loca.flac
Checksums match for track 20               
Peak level: 96.16%
Rip quality: 100.00%
Ripping track 21 of 23: 21. Sean Paul - It's On.flac
Checksums match for track 21               
Peak level: 93.71%
Rip quality: 100.00%
Ripping track 22 of 23: 22. Sean Paul - Punkie (español).flac
Checksums match for track 22               
Peak level: 96.88%
Rip quality: 100.00%
Ripping track 23 of 23: 23. Sean Paul - Samfy I.flac
Checksums match for track 23               
Peak level: 100.00%
Rip quality: 100.00%
AccurateRip URL http://www.accuraterip.com/accuraterip/d/5/4/dBAR-023-0040a45d-0434611d-65124817.bin
2 AccurateRip reponses found
Track  1: rip accurate     (confidence  21 of  33) [ca3e6a1f], DB [ca3e6a1f]
Track  2: rip accurate     (confidence  21 of  33) [031057b2], DB [031057b2]
Track  3: rip accurate     (confidence  20 of  33) [049e18a0], DB [049e18a0]
Track  4: rip accurate     (confidence  21 of  32) [29a5c6f6], DB [29a5c6f6]
Track  5: rip accurate     (confidence  21 of  33) [c8d6aea1], DB [c8d6aea1]
Track  6: rip accurate     (confidence  21 of  33) [72879a54], DB [72879a54]
Track  7: rip accurate     (confidence  21 of  33) [d21ea8c1], DB [d21ea8c1]
Track  8: rip accurate     (confidence  21 of  33) [a854bbf7], DB [a854bbf7]
Track  9: rip accurate     (confidence  21 of  33) [66dea6b3], DB [66dea6b3]
Track 10: rip accurate     (confidence  21 of  33) [c50e58a9], DB [c50e58a9]
Track 11: rip accurate     (confidence  21 of  33) [aebd8584], DB [aebd8584]
Track 12: rip accurate     (confidence  21 of  33) [bd0b8046], DB [bd0b8046]
Track 13: rip accurate     (confidence  21 of  32) [6e83fff4], DB [6e83fff4]
Track 14: rip accurate     (confidence  21 of  33) [16b15111], DB [16b15111]
Track 15: rip accurate     (confidence  20 of  33) [154af561], DB [154af561]
Track 16: rip accurate     (confidence  20 of  33) [73b979ec], DB [73b979ec]
Track 17: rip accurate     (confidence  20 of  33) [4c3566d0], DB [4c3566d0]
Track 18: rip accurate     (confidence  20 of  33) [48cb9a74], DB [48cb9a74]
Track 19: rip accurate     (confidence  21 of  33) [2dec7a26], DB [2dec7a26]
Track 20: rip accurate     (confidence  20 of  32) [4766b1af], DB [4766b1af]
Track 21: rip accurate     (confidence  20 of  32) [0526ef7a], DB [0526ef7a]
Track 22: rip accurate     (confidence  19 of  31) [fc595044], DB [fc595044]
Track 23: rip accurate     (confidence  19 of  30) [9f7f31c9], DB [9f7f31c9]

Everything went smoothly, AFAICT. 👍

Copy link
Member

@Freso Freso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md still says that GStreamer is a requirement. This should be removed together with the actual requirement/dependency.

@ArchangeGabriel
Copy link

@Freso Did you look at “ImportError: No module named pygtk 100 %”? It’s not related to this issue but appears in your log, so…

@Freso
Copy link
Member

Freso commented Feb 13, 2017

@ArchangeGabriel Yes. But pygtk is not used by whipper, so I didn't install it in the virtualenv. (Note that the virtualenv is not using system packages, as I wanted to make sure that there was no gstreamer available for whipper to begin with.)

@RecursiveForest
Copy link
Contributor

I have been extremely busy IRL, but will have time this weekend to review this.

@JoeLametta
Copy link
Collaborator

JoeLametta commented Mar 5, 2017

Partial fix

Here's a patch which fixes all the previously reported warnings affecting the following files:

  • morituri/command/cd.py
  • morituri/command/offset.py
  • morituri/common/checksum.py
  • morituri/common/encode.py

And two very low importance ones:

morituri/common/program.py

  • Function 'ripTrack' does not have a parameter 'number' (at line 518)
  • Function 'ripTrack' does not have a parameter 'number' (at line 519)
diff --git a/morituri/command/cd.py b/morituri/command/cd.py
index 0e70abc..38e03e0 100644
--- a/morituri/command/cd.py
+++ b/morituri/command/cd.py
@@ -31,7 +31,6 @@ import gobject
 gobject.threads_init()
 
 from morituri.command.basecommand import BaseCommand
-from morituri.common import encode
 from morituri.common import (
     accurip, common, config, drive, program, task
 )
@@ -510,7 +509,8 @@ Log files will log the path to tracks relative to this directory.
         logger.debug('writing m3u file for %r', discName)
         m3uPath = u'%s.m3u' % discName
         handle = open(m3uPath, 'w')
-        handle.write(u'#EXTM3U\n')
+        u = u'#EXTM3U\n'
+        handle.write(u.encode('utf-8'))
 
         def writeFile(handle, path, length):
             targetPath = common.getRelativePath(path, m3uPath)
diff --git a/morituri/command/offset.py b/morituri/command/offset.py
index ff5d0dd..065f2ea 100644
--- a/morituri/command/offset.py
+++ b/morituri/command/offset.py
@@ -81,7 +81,6 @@ CD in the AccurateRip database."""
         logger.debug('Trying with offsets %r', self._offsets)
 
     def do(self):
-        prog = program.Program(config.Config())
         runner = ctask.SyncRunner()
 
         device = self.options.device
diff --git a/morituri/common/checksum.py b/morituri/common/checksum.py
index a63a702..9ed12a8 100644
--- a/morituri/common/checksum.py
+++ b/morituri/common/checksum.py
@@ -20,14 +20,10 @@
 # You should have received a copy of the GNU General Public License
 # along with morituri.  If not, see <http://www.gnu.org/licenses/>.
 
-import os
-import struct
-import zlib
 import binascii
 import wave
 
 
-from morituri.common import common, task
 from morituri.extern.task import task as etask
 
 from morituri.program.arc import accuraterip_checksum
diff --git a/morituri/common/encode.py b/morituri/common/encode.py
index 83352a5..4d3b69a 100644
--- a/morituri/common/encode.py
+++ b/morituri/common/encode.py
@@ -20,15 +20,9 @@
 # You should have received a copy of the GNU General Public License
 # along with morituri.  If not, see <http://www.gnu.org/licenses/>.
 
-import math
-import os
-import shutil
-import tempfile
 
 from mutagen.flac import FLAC
 
-from morituri.common import common
-from morituri.common import task as ctask
 from morituri.extern.task import task
 
 from morituri.program import sox
diff --git a/morituri/common/program.py b/morituri/common/program.py
index 1dab168..d1285aa 100644
--- a/morituri/common/program.py
+++ b/morituri/common/program.py
@@ -515,8 +515,6 @@ class Program:
 
         @param trackResult: the object to store information in.
         @type  trackResult: L{result.TrackResult}
-        @param number:      track number (1-based)
-        @type  number:      int
         """
         if trackResult.number == 0:
             start, stop = self.getHTOA()

Errata:

  • No module named BeautifulSoup (at line 9) is not relevant (I've included the wrong path: it's in misc so it can be discarded)
  • Issues reported for morituri/command/image.py affect morituri/image/image.py instead
  • Issues reported for morituri/image/image.py affect morituri/command/image.py instead

As we still need to think about "image mode" destiny, I propose to temporarily ignore the issues affecting it.

Updated status:

morituri/common/program.py

  • Cannot find reference 'ImageRetagTask' in 'image.py' (at line 564)

morituri/command/debug.py

  • Cannot find reference 'ALL_PROFILES' in 'encode.py' (at line 162)
  • Cannot find reference 'ALL_PROFILES' in 'encode.py' (at line 171)
  • Unresolved attribute reference 'peak' for class 'FlacEncodeTask' (at line 194)
  • Cannot find reference 'TagReadTask' in 'encode.py' (at line 217)
  • Expected type 'str', got 'unicode' instead (at line 245) [UNCONFIRMED]
  • Signature of method 'RCCue.do()' does not match signature of base method in class 'BaseCommand' (at line 37)
  • Signature of method 'RCList.do()' does not match signature of base method in class 'BaseCommand' (at line 61)
  • Signature of method 'RCLog.do()' does not match signature of base method in class 'BaseCommand' (at line 96)

image.py related:

morituri/image/image.py

  • Unresolved attribute reference 'checksum' for class 'Task' (at line 148)
  • Cannot find reference 'EncodeTaskFlac' in 'encode.py' (at line 240)

morituri/command/image.py

  • Cannot find reference 'SafeRetagTask' in 'encode.py' (at line 99)

@Holzhaus
Copy link

Merge?

@MerlijnWajer
Copy link
Collaborator Author

Almost. :)

@JoeLametta
Copy link
Collaborator

JoeLametta commented Apr 3, 2017

Partial fix

Fixed (including the changes addressed by previous patch):

morituri/command/debug.py

  • Cannot find reference 'ALL_PROFILES' in 'encode.py' (at line 162)
  • Cannot find reference 'ALL_PROFILES' in 'encode.py' (at line 171)
diff --git a/morituri/command/cd.py b/morituri/command/cd.py
index 0e70abc..38e03e0 100644
--- a/morituri/command/cd.py
+++ b/morituri/command/cd.py
@@ -31,7 +31,6 @@ import gobject
 gobject.threads_init()
 
 from morituri.command.basecommand import BaseCommand
-from morituri.common import encode
 from morituri.common import (
     accurip, common, config, drive, program, task
 )
@@ -510,7 +509,8 @@ Log files will log the path to tracks relative to this directory.
         logger.debug('writing m3u file for %r', discName)
         m3uPath = u'%s.m3u' % discName
         handle = open(m3uPath, 'w')
-        handle.write(u'#EXTM3U\n')
+        u = u'#EXTM3U\n'
+        handle.write(u.encode('utf-8'))
 
         def writeFile(handle, path, length):
             targetPath = common.getRelativePath(path, m3uPath)
diff --git a/morituri/command/debug.py b/morituri/command/debug.py
index ee3b664..d286266 100644
--- a/morituri/command/debug.py
+++ b/morituri/command/debug.py
@@ -153,14 +153,6 @@ class Encode(BaseCommand):
         # here to avoid import gst eating our options
         from morituri.common import encode
 
-        default = 'flac'
-        # slated for deletion as flac will be the only encoder
-        self.parser.add_argument('--profile',
-            action="store",
-            dest="profile",
-            help="profile for encoding (default '%s', choices '%s')" % (
-                default, "', '".join(encode.ALL_PROFILES.keys())),
-            default=default)
         self.parser.add_argument('input', action='store',
                                  help="audio file to encode")
         self.parser.add_argument('output', nargs='?', action='store',
@@ -168,7 +160,6 @@ class Encode(BaseCommand):
 
     def do(self):
         from morituri.common import encode
-        profile = encode.ALL_PROFILES[self.options.profile]()
 
         try:
             fromPath = unicode(self.options.input)
@@ -180,7 +171,7 @@ class Encode(BaseCommand):
         try:
             toPath = unicode(self.options.output)
         except IndexError:
-            toPath = fromPath + '.' + profile.extension
+            toPath = fromPath + '.flac'
 
         runner = task.SyncRunner()
 
diff --git a/morituri/command/offset.py b/morituri/command/offset.py
index ff5d0dd..065f2ea 100644
--- a/morituri/command/offset.py
+++ b/morituri/command/offset.py
@@ -81,7 +81,6 @@ CD in the AccurateRip database."""
         logger.debug('Trying with offsets %r', self._offsets)
 
     def do(self):
-        prog = program.Program(config.Config())
         runner = ctask.SyncRunner()
 
         device = self.options.device
diff --git a/morituri/common/checksum.py b/morituri/common/checksum.py
index a63a702..9ed12a8 100644
--- a/morituri/common/checksum.py
+++ b/morituri/common/checksum.py
@@ -20,14 +20,10 @@
 # You should have received a copy of the GNU General Public License
 # along with morituri.  If not, see <http://www.gnu.org/licenses/>.
 
-import os
-import struct
-import zlib
 import binascii
 import wave
 
 
-from morituri.common import common, task
 from morituri.extern.task import task as etask
 
 from morituri.program.arc import accuraterip_checksum
diff --git a/morituri/common/encode.py b/morituri/common/encode.py
index 83352a5..4d3b69a 100644
--- a/morituri/common/encode.py
+++ b/morituri/common/encode.py
@@ -20,15 +20,9 @@
 # You should have received a copy of the GNU General Public License
 # along with morituri.  If not, see <http://www.gnu.org/licenses/>.
 
-import math
-import os
-import shutil
-import tempfile
 
 from mutagen.flac import FLAC
 
-from morituri.common import common
-from morituri.common import task as ctask
 from morituri.extern.task import task
 
 from morituri.program import sox
diff --git a/morituri/common/program.py b/morituri/common/program.py
index 1dab168..d1285aa 100644
--- a/morituri/common/program.py
+++ b/morituri/common/program.py
@@ -515,8 +515,6 @@ class Program:
 
         @param trackResult: the object to store information in.
         @type  trackResult: L{result.TrackResult}
-        @param number:      track number (1-based)
-        @type  number:      int
         """
         if trackResult.number == 0:
             start, stop = self.getHTOA()

Updated status

Issues which need to be fixed

morituri/command/debug.py

  • Unresolved attribute reference 'peak' for class 'FlacEncodeTask' (at line 194) // SoxPeakTask needed?
  • Cannot find reference 'TagReadTask' in 'encode.py' (at line 217) // whipper hasn't a 'TagReadTask' anymore (only a 'TaggingTask' for writing tags)

image.py related:

morituri/image/image.py

  • Unresolved attribute reference 'checksum' for class 'Task' (at line 148)
  • Cannot find reference 'EncodeTaskFlac' in 'encode.py' (at line 240)

morituri/command/image.py

  • Cannot find reference 'SafeRetagTask' in 'encode.py' (at line 99)

morituri/common/program.py

  • Cannot find reference 'ImageRetagTask' in 'image.py' (at line 564)

Ignored:

morituri/command/debug.py

  • Expected type 'str', got 'unicode' instead (at line 245) // Unconfirmed
  • Signature of method 'RCCue.do()' does not match signature of base method in class 'BaseCommand' (at line 37) // unrelated to this PR (probably caused by d1ed80d)
  • Signature of method 'RCList.do()' does not match signature of base method in class 'BaseCommand' (at line 61) // unrelated to this PR (probably caused by d1ed80d)
  • Signature of method 'RCLog.do()' does not match signature of base method in class 'BaseCommand' (at line 96) // unrelated to this PR (probably caused by d1ed80d)

@MerlijnWajer
Copy link
Collaborator Author

@JoeLametta: Awesome work, sorry to drop this for a few weeks like this. I suggest that I look at the EncodeTaskFlac and checksum attribute reference issues (the ones in image.py), and the issues in debug.py; then we can merge the PR. As I stated before, we do not support retagging at this point, I think.

Are you using pylint for this static analysis? If so, do you think we can add that to travis? That'd be awesome.

I will fix the last outstanding issues on the 21st of April (today), after sleep. Then we can merge it and move forward!

@MerlijnWajer
Copy link
Collaborator Author

I've pushed JoeLametta's patch to the remove-gstreamer branch. Going through other issues now.

@JoeLametta
Copy link
Collaborator

Ready to be merged.
Please note the image retag feature is currently broken.

Regarding the issues (excluding unrelated/unconfirmed ones):

Ignored:

morituri/command/image.py

  • Cannot find reference 'SafeRetagTask' in 'encode.py' (at line 99)

morituri/common/program.py

  • Cannot find reference 'ImageRetagTask' in 'image.py' (at line 564)

Will (probably) be addressed later:

morituri/command/debug.py

  • Cannot find reference 'TagReadTask' in 'encode.py' (at line 217) // whipper hasn't a 'TagReadTask' anymore (only a 'TaggingTask' for writing tags)

@JoeLametta JoeLametta merged commit 223142f into whipper-team:master Apr 23, 2017
JoeLametta added a commit that referenced this pull request Apr 24, 2017
Updated README.md, CHANGELOG.md, .travis.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants