Browse Source

minidlna: fix issues

Removed cover resizing patch. It doesn't work right.

Removed SIGHUP reload. While minidlna handles it, it needs work to
function properly.

Removed service_triggers. They don't work for similar reasons as above.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 5 years ago
parent
commit
733aae9584
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
3 changed files with 3 additions and 92 deletions
  1. +1
    -1
      multimedia/minidlna/Makefile
  2. +2
    -11
      multimedia/minidlna/files/minidlna.init
  3. +0
    -80
      multimedia/minidlna/patches/050-no-cover-resizing.patch

+ 1
- 1
multimedia/minidlna/Makefile View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=minidlna
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.code.sf.net/p/minidlna/git


+ 2
- 11
multimedia/minidlna/files/minidlna.init View File

@ -45,7 +45,6 @@ minidlna_create_config() {
{ [ -z "$interface" ] || [ -t "$port" ]; } && return 1
mkdir -p /var/etc
{
echo "# this file is generated automatically, don't edit"
echo "port=$port"
@ -68,10 +67,10 @@ minidlna_create_config() {
minidlna_cfg_addstr "$cfg" root_container '.'
minidlna_cfg_addstr "$cfg" uuid '019f9a56-ff60-44c0-9edc-eae88d09fa05'
config_list_foreach "$cfg" "media_dir" minidlna_cfg_add_media_dir
} > "$MINIDLNA_CONFIG_FILE"
}
return 0
}
} > "$MINIDLNA_CONFIG_FILE"
start_service() {
local enabled
@ -105,11 +104,3 @@ start_service() {
procd_set_param respawn
procd_close_instance
}
reload_service() {
procd_send_signal "$PROG"
}
service_triggers() {
procd_add_reload_trigger "minidlna"
}

+ 0
- 80
multimedia/minidlna/patches/050-no-cover-resizing.patch View File

@ -1,80 +0,0 @@
From aae49f0f80e73d1b52f23b89b0d314e9b9f89425 Mon Sep 17 00:00:00 2001
From: Daniel Kamil Kozar <dkk089@gmail.com>
Date: Sat, 15 Dec 2018 22:55:44 +0100
Subject: [PATCH] Add an option to disable cover art resizing
Imported from
https://sourceforge.net/p/minidlna/patches/_discuss/thread/9825a1a0/4c28/attachment/minidlna-1.1.2-no-cover-resize.patch
---
albumart.c | 3 +++
minidlna.c | 4 ++++
options.c | 1 +
options.h | 1 +
upnpglobalvars.h | 1 +
5 files changed, 10 insertions(+)
diff --git a/albumart.c b/albumart.c
index de026ec..04fa8f2 100644
--- a/albumart.c
+++ b/albumart.c
@@ -67,6 +67,9 @@ save_resized_album_art(image_s *imsrc, const char *path)
strncpyt(cache_dir, cache_file, sizeof(cache_dir));
make_dir(dirname(cache_dir), S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
+ if( GETFLAG(NO_COVER_RESIZE_MASK) )
+ return image_save_to_jpeg_file(imsrc, cache_file);
+
if( imsrc->width > imsrc->height )
{
dstw = 160;
diff --git a/minidlna.c b/minidlna.c
index 7cce301..a1dd08b 100644
--- a/minidlna.c
+++ b/minidlna.c
@@ -735,6 +735,10 @@ init(int argc, char **argv)
if (strtobool(ary_options[i].value))
SETFLAG(DLNA_STRICT_MASK);
break;
+ case RESIZE_COVER_ART:
+ if((strcmp(ary_options[i].value, "no") == 0) || !atoi(ary_options[i].value))
+ SETFLAG(NO_COVER_RESIZE_MASK);
+ break;
case ROOT_CONTAINER:
switch (ary_options[i].value[0]) {
case '.':
diff --git a/options.c b/options.c
index cee3dff..cacbdfb 100644
--- a/options.c
+++ b/options.c
@@ -68,6 +68,7 @@ static const struct {
{ WIDE_LINKS, "wide_links" },
{ TIVO_DISCOVERY, "tivo_discovery" },
{ ENABLE_SUBTITLES, "enable_subtitles" },
+ { RESIZE_COVER_ART, "resize_covers" },
};
int
diff --git a/options.h b/options.h
index 1ff5b22..ec5ea68 100644
--- a/options.h
+++ b/options.h
@@ -61,6 +61,7 @@ enum upnpconfigoptions {
WIDE_LINKS, /* allow following symlinks outside the defined media_dirs */
TIVO_DISCOVERY, /* TiVo discovery protocol: bonjour or beacon. Defaults to bonjour if supported */
ENABLE_SUBTITLES, /* Enable generic subtitle support for all clients by default */
+ RESIZE_COVER_ART, /* resize cover art to comply with DLNA spec */
};
/* readoptionsfile()
diff --git a/upnpglobalvars.h b/upnpglobalvars.h
index 1a2fb5e..7e3a1ba 100644
--- a/upnpglobalvars.h
+++ b/upnpglobalvars.h
@@ -205,6 +205,7 @@ extern uint32_t runtime_flags;
#define RESCAN_MASK 0x0200
#define SUBTITLES_MASK 0x0400
#define FORCE_ALPHASORT_MASK 0x0800
+#define NO_COVER_RESIZE_MASK 0x1000
#define SETFLAG(mask) runtime_flags |= mask
#define GETFLAG(mask) (runtime_flags & mask)

Loading…
Cancel
Save