diff --git a/0002-Don-t-update-volume-from-DBus-if-the-change-is-micro.patch b/0002-Don-t-update-volume-from-DBus-if-the-change-is-micro.patch new file mode 100644 index 0000000..554bb08 --- /dev/null +++ b/0002-Don-t-update-volume-from-DBus-if-the-change-is-micro.patch @@ -0,0 +1,46 @@ +From 3ad38ca68cd3f066d057519c3f134dccf7987590 Mon Sep 17 00:00:00 2001 +From: Michael Pyne +Date: Sun, 24 Apr 2016 19:15:54 -0400 +Subject: [PATCH 2/7] Don't update volume from DBus if the change is + microscopic. + +Floating point fun! Seems some DBus-based media player managers see a +volume change, sends the new volume to Juk, Juk updates and sends back +over DBus, repeat loop. Not very efficient for CPU... +--- + playermanager.cpp | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/playermanager.cpp b/playermanager.cpp +index 33005d7..6ca08e0 100644 +--- a/playermanager.cpp ++++ b/playermanager.cpp +@@ -570,8 +570,11 @@ void PlayerManager::slotMutedChanged(bool muted) + if(!output) + return; + +- if(output != m_output[m_curOutputPath]) ++ if(output != m_output[m_curOutputPath] || ++ m_output[m_curOutputPath]->isMuted() == muted) ++ { + return; ++ } + + emit mutedChanged(muted); + } +@@ -583,8 +586,11 @@ void PlayerManager::slotVolumeChanged(qreal volume) + if(!output) + return; + +- if(output != m_output[m_curOutputPath]) ++ if(output != m_output[m_curOutputPath] || ++ qFuzzyCompare(m_output[m_curOutputPath]->volume(), volume)) ++ { + return; ++ } + + emit volumeChanged(volume); + } +-- +2.7.4 + diff --git a/0003-Allow-default-playlists-to-have-duplicate-entries.patch b/0003-Allow-default-playlists-to-have-duplicate-entries.patch new file mode 100644 index 0000000..ce5de72 --- /dev/null +++ b/0003-Allow-default-playlists-to-have-duplicate-entries.patch @@ -0,0 +1,99 @@ +From cb42ead663a3f15e4b43cb48f6ea6a3a050b0633 Mon Sep 17 00:00:00 2001 +From: Michael Pyne +Date: Sun, 24 Apr 2016 19:28:59 -0400 +Subject: [PATCH 3/7] Allow 'default playlists' to have duplicate entries. + +This is still disabled in search playlists, folder-based playlists, and +the collection list (where the concept doesn't make sense), but at +least you can add items over and over to the normal playlists. + +FIXED-IN:16.08 +--- + collectionlist.cpp | 3 +++ + dynamicplaylist.cpp | 1 + + folderplaylist.cpp | 1 + + main.cpp | 4 ++-- + playlist.cpp | 8 ++++---- + 5 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/collectionlist.cpp b/collectionlist.cpp +index a5d95d6..c9086af 100644 +--- a/collectionlist.cpp ++++ b/collectionlist.cpp +@@ -350,6 +350,9 @@ CollectionList::CollectionList(PlaylistCollection *collection) : + m_columnTags[PlaylistItem::ArtistColumn] = new TagCountDict; + m_columnTags[PlaylistItem::AlbumColumn] = new TagCountDict; + m_columnTags[PlaylistItem::GenreColumn] = new TagCountDict; ++ ++ // Even set to true it wouldn't work with this class due to other checks ++ setAllowDuplicates(false); + } + + CollectionList::~CollectionList() +diff --git a/dynamicplaylist.cpp b/dynamicplaylist.cpp +index 0138144..4205a8d 100644 +--- a/dynamicplaylist.cpp ++++ b/dynamicplaylist.cpp +@@ -55,6 +55,7 @@ DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists, + if(setupPlaylist) + collection->setupPlaylist(this, iconName); + setName(name); ++ setAllowDuplicates(false); + + setSorting(columns() + 1); + +diff --git a/folderplaylist.cpp b/folderplaylist.cpp +index 9ed785a..0a4598d 100644 +--- a/folderplaylist.cpp ++++ b/folderplaylist.cpp +@@ -29,6 +29,7 @@ FolderPlaylist::FolderPlaylist(PlaylistCollection *collection, const QString &fo + Playlist(collection, name, "folder"), + m_folder(folder) + { ++ setAllowDuplicates(false); + QTimer::singleShot(0, this, SLOT(slotReload())); + } + +diff --git a/playlist.cpp b/playlist.cpp +index 858c415..fe37e6f 100644 +--- a/playlist.cpp ++++ b/playlist.cpp +@@ -331,7 +331,7 @@ Playlist::Playlist(PlaylistCollection *collection, const QString &name, + m_collection(collection), + m_fetcher(new WebImageFetcher(this)), + m_selectedCount(0), +- m_allowDuplicates(false), ++ m_allowDuplicates(true), + m_applySharedSettings(true), + m_columnWidthModeChanged(false), + m_disableColumnWidthUpdates(true), +@@ -354,7 +354,7 @@ Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items + m_collection(collection), + m_fetcher(new WebImageFetcher(this)), + m_selectedCount(0), +- m_allowDuplicates(false), ++ m_allowDuplicates(true), + m_applySharedSettings(true), + m_columnWidthModeChanged(false), + m_disableColumnWidthUpdates(true), +@@ -378,7 +378,7 @@ Playlist::Playlist(PlaylistCollection *collection, const QFileInfo &playlistFile + m_collection(collection), + m_fetcher(new WebImageFetcher(this)), + m_selectedCount(0), +- m_allowDuplicates(false), ++ m_allowDuplicates(true), + m_applySharedSettings(true), + m_columnWidthModeChanged(false), + m_disableColumnWidthUpdates(true), +@@ -401,7 +401,7 @@ Playlist::Playlist(PlaylistCollection *collection, bool delaySetup, int extraCol + m_collection(collection), + m_fetcher(new WebImageFetcher(this)), + m_selectedCount(0), +- m_allowDuplicates(false), ++ m_allowDuplicates(true), + m_applySharedSettings(true), + m_columnWidthModeChanged(false), + m_disableColumnWidthUpdates(true), +-- +2.7.4 + diff --git a/0007-Correct-desktop-entry-name-in-MPRIS.-Fixes-Plasma-to.patch b/0007-Correct-desktop-entry-name-in-MPRIS.-Fixes-Plasma-to.patch new file mode 100644 index 0000000..6b7c0b9 --- /dev/null +++ b/0007-Correct-desktop-entry-name-in-MPRIS.-Fixes-Plasma-to.patch @@ -0,0 +1,34 @@ +From f3930e6d7d782d67ce16eac34acbc71e6360731e Mon Sep 17 00:00:00 2001 +From: Antonio Rojas +Date: Mon, 11 Jul 2016 18:10:48 -0400 +Subject: [PATCH 7/7] Correct desktop entry name in MPRIS. Fixes Plasma + tooltips. + +Patch from Antonio Rojas, version bump from Michael Pyne + +REVIEW:128419 +--- + main.cpp | 2 +- + mpris2/mediaplayer2.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/main.cpp b/main.cpp +index 3d8952d..5af2b02 100644 +--- a/main.cpp ++++ b/main.cpp +diff --git a/mpris2/mediaplayer2.cpp b/mpris2/mediaplayer2.cpp +index 2514ac0..34f7ac7 100644 +--- a/mpris2/mediaplayer2.cpp ++++ b/mpris2/mediaplayer2.cpp +@@ -82,7 +82,7 @@ QString MediaPlayer2::Identity() const + + QString MediaPlayer2::DesktopEntry() const + { +- return QLatin1String("kde4-juk"); ++ return QLatin1String("juk"); + } + + QStringList MediaPlayer2::SupportedUriSchemes() const +-- +2.7.4 + diff --git a/juk.spec b/juk.spec index 77a1b23..50835ed 100644 --- a/juk.spec +++ b/juk.spec @@ -2,7 +2,7 @@ Name: juk Summary: Music player Version: 16.04.3 -Release: 1%{?dist} +Release: 2%{?dist} # code: KDE e.V. may determine that future GPL versions are accepted # handbook doc: GFDL @@ -17,6 +17,11 @@ URL: https://quickgit.kde.org/?p=%{name}.git %endif Source0: http://download.kde.org/%{stable}/applications/%{version}/src/%{name}-%{version}.tar.xz +## upstream patches +Patch2: 0002-Don-t-update-volume-from-DBus-if-the-change-is-micro.patch +Patch3: 0003-Allow-default-playlists-to-have-duplicate-entries.patch +Patch7: 0007-Correct-desktop-entry-name-in-MPRIS.-Fixes-Plasma-to.patch + BuildRequires: desktop-file-utils BuildRequires: kdelibs4-devel >= 4.14 BuildRequires: kf5-rpm-macros @@ -42,7 +47,7 @@ Juk is a jukebox, tagger and music collection manager. %prep -%setup -q +%autosetup -p1 %build @@ -97,6 +102,9 @@ fi %changelog +* Sat Jul 23 2016 Rex Dieter - 16.04.3-2 +- backport improved/compliant MPRIS support + * Sat Jul 09 2016 Rex Dieter - 16.04.3-1 - 16.04.3