minidlna: add patches from Debian/Ubuntu
authorSyrone Wong <wong.syrone@gmail.com>
Fri, 25 Mar 2016 13:13:07 +0000 (21:13 +0800)
committerSyrone Wong <wong.syrone@gmail.com>
Fri, 25 Mar 2016 13:13:07 +0000 (21:13 +0800)
multimedia/minidlna/Makefile
multimedia/minidlna/patches/999-03-make-sure-the-database-is-closed-after-scanning.patch [new file with mode: 0644]
multimedia/minidlna/patches/999-04-fix-multi-artist-album-handling.patch [new file with mode: 0644]

index 20cc340c707202808e1f5cf2cd6f83ef517fcc3f..3d0764ace097133d3bcd3d4509abd74727374b97 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=minidlna
 PKG_VERSION:=1.1.5
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/minidlna
diff --git a/multimedia/minidlna/patches/999-03-make-sure-the-database-is-closed-after-scanning.patch b/multimedia/minidlna/patches/999-03-make-sure-the-database-is-closed-after-scanning.patch
new file mode 100644 (file)
index 0000000..fe2b89a
--- /dev/null
@@ -0,0 +1,22 @@
+Author: BenoĆ®t Knecht <benoit.knecht@fsfe.org>
+Description: Make sure the database is closed after scanning
+Updated: 2015-03-01
+
+--- a/minidlna.c
++++ b/minidlna.c
+@@ -376,6 +376,7 @@
+               open_db(&db);
+               if (*scanner_pid == 0) /* child (scanner) process */
+               {
++                      open_db(&db);
+                       start_scanner();
+                       sqlite3_close(db);
+                       log_close();
+@@ -389,6 +390,7 @@
+               }
+ #else
+               start_scanner();
++              sqlite3_close(db);
+ #endif
+       }
+ }
diff --git a/multimedia/minidlna/patches/999-04-fix-multi-artist-album-handling.patch b/multimedia/minidlna/patches/999-04-fix-multi-artist-album-handling.patch
new file mode 100644 (file)
index 0000000..5b5d958
--- /dev/null
@@ -0,0 +1,37 @@
+Author: Florian Will <florian.will@gmail.com>
+Forwarded: http://sourceforge.net/p/minidlna/bugs/246/
+Bug-Debian: https://bugs.debian.org/734383
+Last-Update: 2015-03-09
+Subject: [PATCH] Ignore artist when looking up existing container
+
+This prevents creation of multiple album containers for compilation
+albums (i.e. one separate album for each artist) when adding files via
+inotify, which causes the scanner cache to be invalidated all the time.
+
+OTOH, different albums with identical names ("Greatest Hits", "Love
+Songs") are now listed as just a single album in the "Album" container.
+This might be solved using some heuristic based on music file location
+(same directory / different directories).
+
+The new behaviour is usually the same as encountered when doing a full
+rescan, because there's a scanner cache that is used during full rescans
+and that cache ignores artist names as well.
+---
+ scanner.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+Index: minidlna/scanner.c
+===================================================================
+--- minidlna.orig/scanner.c    2015-03-09 13:16:34.510503405 +0300
++++ minidlna/scanner.c 2015-03-09 13:16:34.506503413 +0300
+@@ -97,9 +97,8 @@
+                                       "left join DETAILS d on (o.DETAIL_ID = d.ID)"
+                                       " where o.PARENT_ID = '%s'"
+                                       " and o.NAME like '%q'"
+-                                      " and d.ARTIST %s %Q"
+                                       " and o.CLASS = 'container.%s' limit 1",
+-                                      rootParent, item, artist?"like":"is", artist, class);
++                                      rootParent, item, class);
+       if( result )
+       {
+               base = strrchr(result, '$');