Merge pull request #9 from icodex/master

APE format support
This commit is contained in:
coolsnowwolf 2019-10-12 19:26:35 +09:00 committed by GitHub
commit 1ba48abd33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 2 deletions

View File

@ -0,0 +1,47 @@
diff -uNr a/metadata.c b/metadata.c
--- a/metadata.c
+++ b/metadata.c
@@ -330,6 +330,11 @@
strcpy(type, "flc");
m.mime = strdup("audio/x-flac");
}
+ else if( ends_with(path, ".ape") )
+ {
+ strcpy(type, "ape");
+ m.mime = strdup("audio/x-ape");
+ }
else if( ends_with(path, ".wav") )
{
strcpy(type, "wav");
diff -uNr a/upnpglobalvars.h b/upnpglobalvars.h
--- a/upnpglobalvars.h
+++ b/upnpglobalvars.h
@@ -165,6 +165,7 @@
"http-get:*:audio/mp4:*," \
"http-get:*:audio/x-wav:*," \
"http-get:*:audio/x-flac:*," \
+ "http-get:*:audio/x-ape:*," \
"http-get:*:application/ogg:*"
#define DLNA_FLAG_DLNA_V1_5 0x00100000
diff -uNr a/utils.c b/utils.c
--- a/utils.c
+++ b/utils.c
@@ -339,6 +339,8 @@
return "flac";
else if( strcmp(mime+6, "flac") == 0 )
return "flac";
+ else if( strcmp(mime+6, "ape") == 0 )
+ return "ape";
else if( strcmp(mime+6, "x-wav") == 0 )
return "wav";
else if( strncmp(mime+6, "L16", 3) == 0 )
@@ -410,7 +412,7 @@
{
return (ends_with(file, ".mp3") || ends_with(file, ".flac") ||
ends_with(file, ".wma") || ends_with(file, ".asf") ||
- ends_with(file, ".fla") || ends_with(file, ".flc") ||
+ ends_with(file, ".fla") || ends_with(file, ".flc") || ends_with(file, ".ape") ||
ends_with(file, ".m4a") || ends_with(file, ".aac") ||
ends_with(file, ".mp4") || ends_with(file, ".m4p") ||
ends_with(file, ".wav") || ends_with(file, ".ogg") ||

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=ser2net PKG_NAME:=ser2net
PKG_VERSION:=3.5 PKG_VERSION:=3.5.1
PKG_RELEASE:=3 PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/ser2net PKG_SOURCE_URL:=@SF/ser2net
PKG_HASH:=ba9e1d60a89fd7ed075553b4a2074352902203f7fbd9b65b15048c05f0e3f3be PKG_HASH:=02f5dd0abbef5a17b80836b0de1ef0588e257106fb5e269b86822bfd001dc862
PKG_LICENSE:=GPL-2.0+ PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING