From 8bd288a2ff174a6dd637ce3ded164bc5db1ba352 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Mon, 5 Nov 2018 20:11:40 +0000 Subject: [PATCH 1/2] Fix: calculation of coverimage #72 --- src/mpd_client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mpd_client.c b/src/mpd_client.c index cddad9e..a3160a7 100644 --- a/src/mpd_client.c +++ b/src/mpd_client.c @@ -1490,7 +1490,8 @@ int replacechar(char *str, char orig, char rep) { } int mympd_get_cover(const char *uri, char *cover, int cover_len) { - char *path = strdup(uri); + char *orgpath = strdup(uri); + char *path = orgpath; int len; if (!config.coverimage) { @@ -1523,7 +1524,7 @@ int mympd_get_cover(const char *uri, char *cover, int cover_len) { } else len = snprintf(cover, cover_len, "/assets/coverimage-notavailable.png"); } - free(path); + free(orgpath); return len; } From 9b5e0b111d3e451a7712de63dcecba5e4413476b Mon Sep 17 00:00:00 2001 From: jcorporation Date: Mon, 5 Nov 2018 20:14:58 +0000 Subject: [PATCH 2/2] Fix: bump version to 4.5.1 --- CMakeLists.txt | 2 +- PKGBUILD | 2 +- contrib/myMPD.spec | 2 +- dist/htdocs/sw.min.js | 2 +- htdocs/sw.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb827d1..81e968a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project (mympd C) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/") set(CPACK_PACKAGE_VERSION_MAJOR "4") set(CPACK_PACKAGE_VERSION_MINOR "5") -set(CPACK_PACKAGE_VERSION_PATCH "0") +set(CPACK_PACKAGE_VERSION_PATCH "1") if(CMAKE_BUILD_TYPE MATCHES RELEASE) set(ASSETS_PATH "/usr/share/${PROJECT_NAME}/htdocs") diff --git a/PKGBUILD b/PKGBUILD index 9aaa71b..044a4ea 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,7 +4,7 @@ pkgname=mympd _pkgname=myMPD -pkgver=4.5.0 +pkgver=4.5.1 pkgrel=1 pkgdesc="myMPD is a standalone and mobile friendly web mpdclient." arch=('x86_64' 'armv7h' 'aarch64') diff --git a/contrib/myMPD.spec b/contrib/myMPD.spec index db0df34..e62816a 100644 --- a/contrib/myMPD.spec +++ b/contrib/myMPD.spec @@ -4,7 +4,7 @@ # (c) 2018 Juergen Mang Name: myMPD -Version: 4.5.0 +Version: 4.5.1 Release: 0 License: GPL-2.0 Group: Productivity/Multimedia/Sound/Players diff --git a/dist/htdocs/sw.min.js b/dist/htdocs/sw.min.js index 9251b74..2405fa6 100644 --- a/dist/htdocs/sw.min.js +++ b/dist/htdocs/sw.min.js @@ -10,5 +10,5 @@ function(){function a(a){return function(d){c||(c=!0,a.call(b,d))}}var b=this,c= void 0;try{d=a.then}catch(h){this.reject_(h);return}"function"==typeof d?this.settleSameAsThenable_(d,a):this.fulfill_(a)};c.prototype.reject_=function(a){this.settle_(2,a)};c.prototype.fulfill_=function(a){this.settle_(1,a)};c.prototype.settle_=function(a,b){if(0!=this.state_)throw Error("Cannot settle("+a+", "+b+"): Promise already settled in state"+this.state_);this.state_=a;this.result_=b;this.executeOnSettledCallbacks_()};c.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var a= 0;a