Fix several issues in the gstreamer removal PR
Patch by JoeLametta
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user