Accepting request 678953 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/678953 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-audioread?expand=0&rev=5
This commit is contained in:
commit
e0cebdfa6e
@ -0,0 +1,70 @@
|
|||||||
|
From 0abbf93a0b245ba28566bd0ca47da9dfa8d266d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sam Thursfield <sam@afuera.me.uk>
|
||||||
|
Date: Wed, 26 Dec 2018 00:28:04 +0000
|
||||||
|
Subject: [PATCH] maddec: Ensure that the audio blocks are of type bytes()
|
||||||
|
|
||||||
|
The audio blocks should be bytes() to be consistent with the other
|
||||||
|
decoders.
|
||||||
|
|
||||||
|
This is required for the pyacoustid and chromaprint libraries, and fixes
|
||||||
|
the following backtrace in Beets when using the 'chroma' plugin:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/usr/bin/beet", line 11, in <module>
|
||||||
|
load_entry_point('beets==1.4.6', 'console_scripts', 'beet')()
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1256, in main
|
||||||
|
_raw_main(args)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/ui/__init__.py", line 1243, in _raw_main
|
||||||
|
subcommand.func(lib, suboptions, subargs)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/ui/commands.py", line 937, in import_func
|
||||||
|
import_files(lib, paths, query)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/ui/commands.py", line 914, in import_files
|
||||||
|
session.run()
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/importer.py", line 327, in run
|
||||||
|
pl.run_parallel(QUEUE_SIZE)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/util/pipeline.py", line 445, in run_parallel
|
||||||
|
six.reraise(exc_info[0], exc_info[1], exc_info[2])
|
||||||
|
File "/usr/lib/python3.6/site-packages/six.py", line 693, in reraise
|
||||||
|
raise value
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/util/pipeline.py", line 312, in run
|
||||||
|
out = self.coro.send(msg)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/util/pipeline.py", line 194, in coro
|
||||||
|
func(*(args + (task,)))
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/importer.py", line 1339, in lookup_candidates
|
||||||
|
plugins.send('import_task_start', session=session, task=task)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 452, in send
|
||||||
|
result = handler(**arguments)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beets/plugins.py", line 124, in wrapper
|
||||||
|
return func(*args, **kwargs)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beetsplug/chroma.py", line 143, in fingerprint_task
|
||||||
|
return fingerprint_task(self._log, task, session)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beetsplug/chroma.py", line 212, in fingerprint_task
|
||||||
|
acoustid_match(log, item.path)
|
||||||
|
File "/usr/lib/python3.6/site-packages/beetsplug/chroma.py", line 65, in acoustid_match
|
||||||
|
duration, fp = acoustid.fingerprint_file(util.syspath(path))
|
||||||
|
File "/usr/lib/python3.6/site-packages/acoustid.py", line 321, in fingerprint_file
|
||||||
|
return _fingerprint_file_audioread(path, maxlength)
|
||||||
|
File "/usr/lib/python3.6/site-packages/acoustid.py", line 264, in _fingerprint_file_audioread
|
||||||
|
fp = fingerprint(f.samplerate, f.channels, iter(f), maxlength)
|
||||||
|
File "/usr/lib/python3.6/site-packages/acoustid.py", line 206, in fingerprint
|
||||||
|
fper.feed(block)
|
||||||
|
File "/usr/lib/python3.6/site-packages/chromaprint.py", line 126, in feed
|
||||||
|
self._ctx, data, len(data) // 2
|
||||||
|
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type
|
||||||
|
---
|
||||||
|
audioread/maddec.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/audioread/maddec.py b/audioread/maddec.py
|
||||||
|
index 8dd7aaa..3a2a694 100644
|
||||||
|
--- a/audioread/maddec.py
|
||||||
|
+++ b/audioread/maddec.py
|
||||||
|
@@ -43,7 +43,7 @@ def read_blocks(self, block_size=4096):
|
||||||
|
out = self.mf.read(block_size)
|
||||||
|
if not out:
|
||||||
|
break
|
||||||
|
- yield out
|
||||||
|
+ yield bytes(out)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def samplerate(self):
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 25 15:06:33 UTC 2019 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
- Add 0001-maddec-Ensure-that-the-audio-blocks-are-of-type-bytes.patch
|
||||||
|
to ensure audio blocks are always of type bytes (and not sometimes
|
||||||
|
bytearray when using maddec).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Dec 4 12:45:49 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
Tue Dec 4 12:45:49 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
@ -17,7 +24,7 @@ Sat Nov 3 03:23:46 UTC 2018 - Todd R <toddrme2178@gmail.com>
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 28 07:21:03 UTC 2017 - alarrosa@suse.com
|
Thu Sep 28 07:21:03 UTC 2017 - alarrosa@suse.com
|
||||||
|
|
||||||
- Update to 2.1.5
|
- Update to 2.1.5
|
||||||
* Properly clean up the file handle when a backend fails to decode a file.
|
* Properly clean up the file handle when a backend fails to decode a file.
|
||||||
* Fix parsing of "N.M" channel counts in the FFmpeg backend.
|
* Fix parsing of "N.M" channel counts in the FFmpeg backend.
|
||||||
* Avoid a crash in the raw backend when a file uses an unsupported
|
* Avoid a crash in the raw backend when a file uses an unsupported
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-audioread
|
# spec file for package python-audioread
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -26,6 +26,8 @@ Group: Development/Languages/Python
|
|||||||
Url: https://github.com/sampsyo/audioread
|
Url: https://github.com/sampsyo/audioread
|
||||||
Source0: https://files.pythonhosted.org/packages/source/a/audioread/audioread-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/a/audioread/audioread-%{version}.tar.gz
|
||||||
Source10: https://raw.githubusercontent.com/beetbox/audioread/master/LICENSE
|
Source10: https://raw.githubusercontent.com/beetbox/audioread/master/LICENSE
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch0: 0001-maddec-Ensure-that-the-audio-blocks-are-of-type-bytes.patch
|
||||||
BuildRequires: %{python_module base}
|
BuildRequires: %{python_module base}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@ -49,6 +51,7 @@ currently supports:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n audioread-%{version}
|
%setup -q -n audioread-%{version}
|
||||||
|
%patch0 -p1
|
||||||
cp %{SOURCE10} .
|
cp %{SOURCE10} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user