forked from pool/picard
- Update 2.12.3:
* PICARD-2958 - Hovering over unmatched files shows a tooltip with the PO translation file header for the active locale * PICARD-2960 - Replacement for directory separators can itself be set to a directory separator - Update to 2.12.2: * PICARD-2953 - Windows: Incorrect sort order in list views and search result - Update to 2.12.1: * PICARD-2914 - macOS: Crash when opening options with Spanish UI * PICARD-2939 - Crash when loading release with genre filters resulting in empty genre list * PICARD-2940 - Possible bug with locking in Metadata.__iter__ * PICARD-2946 - Fix display length value in AppStream metadata - Drop 0001-Fix-exception-when-genre-filtering-results-in.patch OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/picard?expand=0&rev=145
This commit is contained in:
commit
e3ccc682a4
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
44
0001-Fix-exception-when-genre-filtering-results-in.patch
Normal file
44
0001-Fix-exception-when-genre-filtering-results-in.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From b1a8b2c85c0615c2018de3c054d59f2a0b5315bd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Philipp Wolfer <ph.wolfer@gmail.com>
|
||||||
|
Date: Sat, 13 Jul 2024 11:05:31 +0200
|
||||||
|
Subject: [PATCH] PICARD-2939: Fix exception when genre filtering results in
|
||||||
|
empty genre list
|
||||||
|
|
||||||
|
---
|
||||||
|
picard/track.py | 2 ++
|
||||||
|
test/test_taggenrefilter.py | 12 ++++++++++++
|
||||||
|
2 files changed, 14 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/picard/track.py b/picard/track.py
|
||||||
|
index 3da608de7f..025ebb8b55 100644
|
||||||
|
--- a/picard/track.py
|
||||||
|
+++ b/picard/track.py
|
||||||
|
@@ -115,6 +115,8 @@ def filter(self, counter: Counter, minusage=0) -> Counter:
|
||||||
|
for name, count in counter.items():
|
||||||
|
if not self.skip(name):
|
||||||
|
result[name] = count
|
||||||
|
+ if not result:
|
||||||
|
+ return result
|
||||||
|
topcount = result.most_common(1)[0][1]
|
||||||
|
for name, count in counter.items():
|
||||||
|
percent = 100 * count // topcount
|
||||||
|
diff --git a/test/test_taggenrefilter.py b/test/test_taggenrefilter.py
|
||||||
|
index 01a54c383d..46cb5a5a52 100644
|
||||||
|
--- a/test/test_taggenrefilter.py
|
||||||
|
+++ b/test/test_taggenrefilter.py
|
||||||
|
@@ -178,3 +178,15 @@ def test_filter_method_minusage(self):
|
||||||
|
genres = Counter(ax=4, bx=5, ay=20, by=10, bz=4)
|
||||||
|
result = tag_filter.filter(genres, minusage=50)
|
||||||
|
self.assertEqual([('bx', 5), ('by', 10)], list(result.items()))
|
||||||
|
+
|
||||||
|
+ def test_filter_method_empty_input(self):
|
||||||
|
+ tag_filter = TagGenreFilter("")
|
||||||
|
+ genres = Counter()
|
||||||
|
+ result = tag_filter.filter(genres)
|
||||||
|
+ self.assertEqual([], list(result.items()))
|
||||||
|
+
|
||||||
|
+ def test_filter_method_empty_result(self):
|
||||||
|
+ tag_filter = TagGenreFilter("-*")
|
||||||
|
+ genres = Counter(ax=1, bx=2, ay=3, by=4)
|
||||||
|
+ result = tag_filter.filter(genres)
|
||||||
|
+ self.assertEqual([], list(result.items()))
|
3
picard-2.12.3.tar.gz
Normal file
3
picard-2.12.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1c39ab22cff39a7eede94510f6d035ea2d4600811b62f8f4a58399ede3d8e6a4
|
||||||
|
size 6841838
|
3
picard-2.12.tar.gz
Normal file
3
picard-2.12.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9e292f6ab693525fd799641cad3859b89c2404a93819042aa564f285113a82d1
|
||||||
|
size 6822579
|
24
picard-requirements.patch
Normal file
24
picard-requirements.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
Index: picard-release-2.10/requirements.txt
|
||||||
|
===================================================================
|
||||||
|
--- picard-release-2.10.orig/requirements.txt
|
||||||
|
+++ picard-release-2.10/requirements.txt
|
||||||
|
@@ -1,12 +1,8 @@
|
||||||
|
-discid~=1.0
|
||||||
|
-fasteners~=0.14
|
||||||
|
-Markdown~=3.2
|
||||||
|
-mutagen~=1.37
|
||||||
|
-PyJWT~=2.0
|
||||||
|
-pyobjc-core>=6.2, <10; sys_platform == 'darwin'
|
||||||
|
-pyobjc-framework-Cocoa>=6.2, <10; sys_platform == 'darwin'
|
||||||
|
-PyQt5-sip<=12.9.1; python_version < '3.7'
|
||||||
|
-PyQt5~=5.11
|
||||||
|
-python-dateutil~=2.7
|
||||||
|
-pywin32; sys_platform == 'win32'
|
||||||
|
+discid>=1.0
|
||||||
|
+fasteners>=0.14
|
||||||
|
+Markdown>=3.2
|
||||||
|
+mutagen>=1.37
|
||||||
|
+PyJWT>=2.0
|
||||||
|
+PyQt5>=5.11
|
||||||
|
+python-dateutil>=2.7
|
||||||
|
PyYAML>=5.1, <7
|
2188
picard.changes
Normal file
2188
picard.changes
Normal file
File diff suppressed because it is too large
Load Diff
106
picard.spec
Normal file
106
picard.spec
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
#
|
||||||
|
# spec file for package picard
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: picard
|
||||||
|
Version: 2.12.3
|
||||||
|
Release: 0
|
||||||
|
Summary: The Next Generation MusicBrainz Tagger
|
||||||
|
License: GPL-2.0-or-later
|
||||||
|
Group: Productivity/Multimedia/Sound/Utilities
|
||||||
|
URL: https://picard.musicbrainz.org
|
||||||
|
Source0: https://codeload.github.com/metabrainz/picard/tar.gz/release-%{version}#/%{name}-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-SUSE picard-requirements.patch, code@bnavigator.de -- clean python requirements metadata
|
||||||
|
Patch0: picard-requirements.patch
|
||||||
|
BuildRequires: desktop-file-utils
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: hicolor-icon-theme
|
||||||
|
BuildRequires: libofa-devel
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-pip
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-wheel
|
||||||
|
BuildRequires: update-desktop-files
|
||||||
|
Requires: python3-Markdown >= 3.2
|
||||||
|
Requires: python3-PyJWT >= 2.0
|
||||||
|
Requires: python3-PyQt5 >= 5.11
|
||||||
|
Requires: python3-PyYAML >= 5.1
|
||||||
|
Requires: python3-discid >= 1.0
|
||||||
|
Requires: python3-fasteners >= 0.14
|
||||||
|
Requires: python3-mutagen >= 1.37
|
||||||
|
Requires: python3-python-dateutil >= 2.7
|
||||||
|
Recommends: chromaprint-fpcalc
|
||||||
|
# SECTION test
|
||||||
|
BuildRequires: python3-Markdown >= 3.2
|
||||||
|
BuildRequires: python3-PyJWT >= 2.0
|
||||||
|
BuildRequires: python3-PyQt5 >= 5.11
|
||||||
|
BuildRequires: python3-PyYAML >= 5.1
|
||||||
|
BuildRequires: python3-discid >= 1.0
|
||||||
|
BuildRequires: python3-fasteners >= 0.14
|
||||||
|
BuildRequires: python3-mutagen >= 1.37
|
||||||
|
BuildRequires: python3-pytest
|
||||||
|
BuildRequires: python3-pytest-xvfb
|
||||||
|
BuildRequires: python3-python-dateutil >= 2.7
|
||||||
|
# /SECTION
|
||||||
|
|
||||||
|
%description
|
||||||
|
MusicBrainz Picard is a MusicBrainz tag editor written in Python.
|
||||||
|
Picard Tagger focuses on album-oriented tagging as opposed to
|
||||||
|
track-based tagging.
|
||||||
|
|
||||||
|
%lang_package
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n %{name}-release-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
%python3_pyproject_wheel
|
||||||
|
|
||||||
|
%install
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
%python3_pyproject_install
|
||||||
|
|
||||||
|
%suse_update_desktop_file -G "Music Tagger" -N "picard" org.musicbrainz.Picard
|
||||||
|
|
||||||
|
rm -rfv %{buildroot}%{_datadir}/locale/sco
|
||||||
|
|
||||||
|
%find_lang %{name} %{name}.lang
|
||||||
|
%find_lang %{name}-countries %{name}.lang
|
||||||
|
%find_lang %{name}-attributes %{name}.lang
|
||||||
|
%fdupes %{buildroot}%{python3_sitearch}
|
||||||
|
|
||||||
|
%check
|
||||||
|
pytest -v
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc AUTHORS.txt NEWS.md
|
||||||
|
%license COPYING.txt
|
||||||
|
%{_bindir}/picard
|
||||||
|
%{_datadir}/applications/org.musicbrainz.Picard.desktop
|
||||||
|
%{python3_sitearch}/picard
|
||||||
|
%{python3_sitearch}/picard-%{version}.dist-info
|
||||||
|
%{_datadir}/icons/hicolor/*/apps/org.musicbrainz.Picard.png
|
||||||
|
%{_datadir}/icons/hicolor/*/apps/org.musicbrainz.Picard.svg
|
||||||
|
%{_datadir}/metainfo/org.musicbrainz.Picard.appdata.xml
|
||||||
|
|
||||||
|
%files lang -f %{name}.lang
|
||||||
|
%{_datadir}/locale/*/LC_MESSAGES/picard-constants.mo
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user