From b2957139a3089b5d5e86728e93562cdecd7c1cfe Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Sat, 8 Apr 2017 10:34:01 -0600 Subject: [PATCH 01/13] Cache script, dwr, icons and coverArt Signed-off-by: Andrew DeMaria --- .../src/main/java/org/libresonic/player/boot/Application.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java b/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java index b68b93bc..3f7a67d8 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java +++ b/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java @@ -129,7 +129,7 @@ public class Application extends SpringBootServletInitializer implements Embedde public FilterRegistrationBean cacheFilterRegistration() { FilterRegistrationBean registration = new FilterRegistrationBean(); registration.setFilter(cacheFilter()); - registration.addUrlPatterns("/icons/*", "/style/*"); + registration.addUrlPatterns("/icons/*", "/style/*", "/script/*", "/dwr/*", "/icons/*", "/coverArt.view"); registration.addInitParameter("Cache-Control", "max-age=36000"); registration.setName("CacheFilter"); registration.setOrder(5); From 589909b906c5c6fa13c9f87970cee0ecdafa5608 Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Sat, 8 Apr 2017 10:40:19 -0600 Subject: [PATCH 02/13] Cache avatar view Signed-off-by: Andrew DeMaria --- .../src/main/java/org/libresonic/player/boot/Application.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java b/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java index 3f7a67d8..4e82c11a 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java +++ b/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java @@ -129,7 +129,7 @@ public class Application extends SpringBootServletInitializer implements Embedde public FilterRegistrationBean cacheFilterRegistration() { FilterRegistrationBean registration = new FilterRegistrationBean(); registration.setFilter(cacheFilter()); - registration.addUrlPatterns("/icons/*", "/style/*", "/script/*", "/dwr/*", "/icons/*", "/coverArt.view"); + registration.addUrlPatterns("/icons/*", "/style/*", "/script/*", "/dwr/*", "/icons/*", "/coverArt.view", "/avatar.view"); registration.addInitParameter("Cache-Control", "max-age=36000"); registration.setName("CacheFilter"); registration.setOrder(5); From e3d2dc292fd7eb044c69ac3ccaf9d436e69a498f Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Sat, 15 Apr 2017 16:38:33 -0600 Subject: [PATCH 03/13] Fix csrf token with multipart upload Signed-off-by: Andrew DeMaria --- .../org/libresonic/player/boot/Application.java | 2 ++ .../controller/AvatarUploadController.java | 7 +++---- .../controller/ImportPlaylistController.java | 17 ++++++++++++----- .../player/controller/UploadController.java | 2 +- .../main/webapp/WEB-INF/jsp/importPlaylist.jsp | 3 +-- .../src/main/webapp/WEB-INF/jsp/more.jsp | 3 +-- .../webapp/WEB-INF/jsp/personalSettings.jsp | 3 +-- 7 files changed, 21 insertions(+), 16 deletions(-) diff --git a/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java b/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java index 4e82c11a..274c3595 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java +++ b/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java @@ -11,6 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerA import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration; import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration; import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration; +import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer; import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer; @@ -32,6 +33,7 @@ import java.lang.reflect.Method; JdbcTemplateAutoConfiguration.class, DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, + MultipartAutoConfiguration.class, // TODO: update to use spring boot builtin multipart support LiquibaseAutoConfiguration.class}) @Configuration @ImportResource(value = {"classpath:/applicationContext-service.xml", diff --git a/libresonic-main/src/main/java/org/libresonic/player/controller/AvatarUploadController.java b/libresonic-main/src/main/java/org/libresonic/player/controller/AvatarUploadController.java index 1ab390c6..d33a2bb5 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/controller/AvatarUploadController.java +++ b/libresonic-main/src/main/java/org/libresonic/player/controller/AvatarUploadController.java @@ -24,7 +24,7 @@ import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.io.FilenameUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.libresonic.player.Logger; import org.libresonic.player.domain.Avatar; import org.libresonic.player.service.SecurityService; @@ -38,7 +38,6 @@ import org.springframework.web.servlet.ModelAndView; import javax.imageio.ImageIO; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; @@ -66,8 +65,8 @@ public class AvatarUploadController { @Autowired private SecurityService securityService; - @RequestMapping(method = RequestMethod.GET) - protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { + @RequestMapping(method = RequestMethod.POST) + protected ModelAndView handleRequestInternal(HttpServletRequest request) throws Exception { String username = securityService.getCurrentUsername(request); diff --git a/libresonic-main/src/main/java/org/libresonic/player/controller/ImportPlaylistController.java b/libresonic-main/src/main/java/org/libresonic/player/controller/ImportPlaylistController.java index 95b7480b..29b8903b 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/controller/ImportPlaylistController.java +++ b/libresonic-main/src/main/java/org/libresonic/player/controller/ImportPlaylistController.java @@ -32,10 +32,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import java.util.HashMap; import java.util.List; @@ -55,8 +54,10 @@ public class ImportPlaylistController { @Autowired private PlaylistService playlistService; - @RequestMapping(method = RequestMethod.GET) - protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { + @RequestMapping(method = RequestMethod.POST) + protected String handlePost(RedirectAttributes redirectAttributes, + HttpServletRequest request + ) throws Exception { Map map = new HashMap(); try { @@ -85,7 +86,13 @@ public class ImportPlaylistController { map.put("error", e.getMessage()); } - return new ModelAndView("importPlaylist","model",map); + redirectAttributes.addFlashAttribute("model", map); + return "redirect:importPlaylist"; + } + + @RequestMapping(method = RequestMethod.GET) + public String handleGet() { + return "importPlaylist"; } diff --git a/libresonic-main/src/main/java/org/libresonic/player/controller/UploadController.java b/libresonic-main/src/main/java/org/libresonic/player/controller/UploadController.java index 924c7ad9..597e2abe 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/controller/UploadController.java +++ b/libresonic-main/src/main/java/org/libresonic/player/controller/UploadController.java @@ -70,7 +70,7 @@ public class UploadController { private SettingsService settingsService; public static final String UPLOAD_STATUS = "uploadStatus"; - @RequestMapping(method = RequestMethod.GET) + @RequestMapping(method = { RequestMethod.POST }) protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { Map map = new HashMap<>(); diff --git a/libresonic-main/src/main/webapp/WEB-INF/jsp/importPlaylist.jsp b/libresonic-main/src/main/webapp/WEB-INF/jsp/importPlaylist.jsp index 419f8bbe..ece723d8 100644 --- a/libresonic-main/src/main/webapp/WEB-INF/jsp/importPlaylist.jsp +++ b/libresonic-main/src/main/webapp/WEB-INF/jsp/importPlaylist.jsp @@ -29,8 +29,7 @@
-
- + "/> diff --git a/libresonic-main/src/main/webapp/WEB-INF/jsp/more.jsp b/libresonic-main/src/main/webapp/WEB-INF/jsp/more.jsp index 69e614e5..93a9b7d9 100644 --- a/libresonic-main/src/main/webapp/WEB-INF/jsp/more.jsp +++ b/libresonic-main/src/main/webapp/WEB-INF/jsp/more.jsp @@ -300,8 +300,7 @@ -
- + diff --git a/libresonic-main/src/main/webapp/WEB-INF/jsp/personalSettings.jsp b/libresonic-main/src/main/webapp/WEB-INF/jsp/personalSettings.jsp index 75b2d4bc..e6c6ddde 100644 --- a/libresonic-main/src/main/webapp/WEB-INF/jsp/personalSettings.jsp +++ b/libresonic-main/src/main/webapp/WEB-INF/jsp/personalSettings.jsp @@ -242,8 +242,7 @@

- - +
From 856733d639967c1597d40141a50838cb1123f89d Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Sat, 15 Apr 2017 17:18:29 -0600 Subject: [PATCH 04/13] Fix recover and access denied security Signed-off-by: Andrew DeMaria --- .../org/libresonic/player/security/GlobalSecurityConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libresonic-main/src/main/java/org/libresonic/player/security/GlobalSecurityConfig.java b/libresonic-main/src/main/java/org/libresonic/player/security/GlobalSecurityConfig.java index 9920f1c3..3fd5db15 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/security/GlobalSecurityConfig.java +++ b/libresonic-main/src/main/java/org/libresonic/player/security/GlobalSecurityConfig.java @@ -125,7 +125,7 @@ public class GlobalSecurityConfig extends GlobalAuthenticationConfigurerAdapter .frameOptions() .sameOrigin() .and().authorizeRequests() - .antMatchers("recover.view", "accessDenied.view", + .antMatchers("/recover.view", "/accessDenied.view", "/style/**", "/icons/**", "/flash/**", "/script/**", "/sonos/**", "/crossdomain.xml", "/login", "/error") .permitAll() From 6f3ede33d9b4faa882b7ef8a76eaa6cb24ed70c0 Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Mon, 17 Apr 2017 20:06:05 -0600 Subject: [PATCH 05/13] Bump jaudio tagger version Signed-off-by: Andrew DeMaria --- libresonic-main/pom.xml | 15 +++++++++++++-- .../org/libresonic/player/dao/MediaFileDao.java | 3 +++ .../service/metadata/JaudiotaggerParser.java | 2 +- .../java/org/libresonic/player/util/Util.java | 16 +++++++++++++++- pom.xml | 4 ++++ 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/libresonic-main/pom.xml b/libresonic-main/pom.xml index 42fd38aa..41cd5c8b 100644 --- a/libresonic-main/pom.xml +++ b/libresonic-main/pom.xml @@ -194,9 +194,9 @@ - org + net.jthink jaudiotagger - 2.0.3 + 2.2.3 @@ -398,6 +398,17 @@ slf4j-api 1.7.24 + + + com.fasterxml.jackson.core + jackson-core + 2.8.7 + + + com.fasterxml.jackson.core + jackson-databind + 2.8.7 + diff --git a/libresonic-main/src/main/java/org/libresonic/player/dao/MediaFileDao.java b/libresonic-main/src/main/java/org/libresonic/player/dao/MediaFileDao.java index 94c4045b..8759d007 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/dao/MediaFileDao.java +++ b/libresonic-main/src/main/java/org/libresonic/player/dao/MediaFileDao.java @@ -24,6 +24,7 @@ import org.libresonic.player.domain.Genre; import org.libresonic.player.domain.MediaFile; import org.libresonic.player.domain.MusicFolder; import org.libresonic.player.domain.RandomSearchCriteria; +import org.libresonic.player.util.Util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.jdbc.core.RowMapper; @@ -165,6 +166,8 @@ public class MediaFileDao extends AbstractDao { "version=? " + "where path=?"; + logger.trace("Updating media file {}", Util.debugObject(file)); + int n = update(sql, file.getFolder(), file.getMediaType().name(), file.getFormat(), file.getTitle(), file.getAlbumName(), file.getArtist(), file.getAlbumArtist(), file.getDiscNumber(), file.getTrackNumber(), file.getYear(), file.getGenre(), file.getBitRate(), diff --git a/libresonic-main/src/main/java/org/libresonic/player/service/metadata/JaudiotaggerParser.java b/libresonic-main/src/main/java/org/libresonic/player/service/metadata/JaudiotaggerParser.java index 903e42d9..59f475fb 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/service/metadata/JaudiotaggerParser.java +++ b/libresonic-main/src/main/java/org/libresonic/player/service/metadata/JaudiotaggerParser.java @@ -26,7 +26,7 @@ import org.jaudiotagger.audio.AudioFileIO; import org.jaudiotagger.audio.AudioHeader; import org.jaudiotagger.tag.FieldKey; import org.jaudiotagger.tag.Tag; -import org.jaudiotagger.tag.datatype.Artwork; +import org.jaudiotagger.tag.images.Artwork; import org.jaudiotagger.tag.reference.GenreTypes; import org.libresonic.player.Logger; import org.libresonic.player.domain.MediaFile; diff --git a/libresonic-main/src/main/java/org/libresonic/player/util/Util.java b/libresonic-main/src/main/java/org/libresonic/player/util/Util.java index 2f8ab6e5..88f58e68 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/util/Util.java +++ b/libresonic-main/src/main/java/org/libresonic/player/util/Util.java @@ -19,12 +19,16 @@ */ package org.libresonic.player.util; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import org.libresonic.player.Logger; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletResponse; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; /** * Miscellaneous general utility methods. @@ -102,4 +106,14 @@ public final class Util { } return result; } + + static ObjectMapper objectMapper = new ObjectMapper(); + public static String debugObject(Object object) { + try { + return objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(object); + } catch (JsonProcessingException e) { + LOG.warn("Cant output debug object", e); + return ""; + } + } } \ No newline at end of file diff --git a/pom.xml b/pom.xml index 12c7192f..86770b8c 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,10 @@ teleal http://teleal.org/m2 + + jaudiotagger-repository + https://dl.bintray.com/ijabz/maven + From dcbc55501c3c88295d3760bbfcc6e597c8fbea9d Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Tue, 18 Apr 2017 22:49:05 -0400 Subject: [PATCH 06/13] README update Signed-off-by: Andrew Rabert --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 85d58820..702051de 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The original [Subsonic](http://www.subsonic.org/) is developed by [Sindre Mehus] Libresonic is maintained by [Eugene E. Kashpureff Jr](mailto:eugene@kashpureff.org). It originated as an unofficial("Kang") of Subsonic which did not contain the Licensing code checks present in the official builds. With the announcement of Subsonic's closed-source future, a decision was made to make a full fork and rebrand to Libresonic. -Libresonic will strive to maintain compatibility and stability for Subsonic users, including a clean upgrade path. New features and refactoring are welcomed as a Pull Request on Github. +Libresonic will strive to maintain compatibility and stability for Subsonic users, including a clean upgrade path. New features and refactoring are welcomed as a Pull Request on GitHub. License @@ -42,7 +42,7 @@ Usage ----- Libresonic can be downloaded from -[Github](https://github.com/Libresonic/libresonic/releases) for personal usage. +[GitHub](https://github.com/Libresonic/libresonic/releases) for personal usage. Packagers can also reference the [release repository](https://libresonic.org/release/). Please see the [INSTALL document](https://github.com/Libresonic/libresonic/blob/develop/INSTALL.md) for instructions on running Libresonic. From e9649dd74677c5b269a61d2e3a1f81ecf8262c06 Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Tue, 18 Apr 2017 22:52:49 -0500 Subject: [PATCH 07/13] Fix broken link on readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 702051de..4c5b853d 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Libresonic can be downloaded from [GitHub](https://github.com/Libresonic/libresonic/releases) for personal usage. Packagers can also reference the [release repository](https://libresonic.org/release/). -Please see the [INSTALL document](https://github.com/Libresonic/libresonic/blob/develop/INSTALL.md) for instructions on running Libresonic. +Please see the [INSTALL document](https://github.com/Libresonic/libresonic/blob/stable/documentation/INSTALL.md) for instructions on running Libresonic. Community From ce5a2cf35f3d0d56e1d3de572265e724acc40dce Mon Sep 17 00:00:00 2001 From: "Eugene E. Kashpureff Jr" Date: Tue, 25 Apr 2017 21:07:15 +0000 Subject: [PATCH 08/13] Libresonic v6.2.beta4 --- CHANGELOG.md | 5 +++++ libresonic-main/pom.xml | 2 +- libresonic-rest-api/pom.xml | 2 +- libresonic-sonos-api/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c1dedd4..5890b545 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ # Libresonic/libresonic # --> +v6.2.beta4 +--------- + + * Final fixes in Beta! Release soon + v6.2.beta3 ---------- diff --git a/libresonic-main/pom.xml b/libresonic-main/pom.xml index 41cd5c8b..f4c695b5 100644 --- a/libresonic-main/pom.xml +++ b/libresonic-main/pom.xml @@ -9,7 +9,7 @@ org.libresonic.player libresonic - 6.2.beta3 + 6.2.beta4 diff --git a/libresonic-rest-api/pom.xml b/libresonic-rest-api/pom.xml index d053cde7..08bb3051 100644 --- a/libresonic-rest-api/pom.xml +++ b/libresonic-rest-api/pom.xml @@ -8,7 +8,7 @@ org.libresonic.player libresonic - 6.2.beta3 + 6.2.beta4 diff --git a/libresonic-sonos-api/pom.xml b/libresonic-sonos-api/pom.xml index 3697402b..3cd53183 100644 --- a/libresonic-sonos-api/pom.xml +++ b/libresonic-sonos-api/pom.xml @@ -8,7 +8,7 @@ org.libresonic.player libresonic - 6.2.beta3 + 6.2.beta4 diff --git a/pom.xml b/pom.xml index 86770b8c..d8f2cc5a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 org.libresonic.player libresonic - 6.2.beta3 + 6.2.beta4 Libresonic pom From bba6e456649c5dfc8b7e79a531f07f517c2c2265 Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Tue, 25 Apr 2017 20:41:52 -0600 Subject: [PATCH 09/13] Fixes #331 Signed-off-by: Andrew DeMaria --- .../src/main/resources/liquibase/legacy/schema52.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libresonic-main/src/main/resources/liquibase/legacy/schema52.xml b/libresonic-main/src/main/resources/liquibase/legacy/schema52.xml index 13652962..82246d3b 100644 --- a/libresonic-main/src/main/resources/liquibase/legacy/schema52.xml +++ b/libresonic-main/src/main/resources/liquibase/legacy/schema52.xml @@ -16,6 +16,7 @@ + 7:e7e0f04cd4691ec2b5d955b449e0154b @@ -32,6 +33,13 @@ + + insert into music_folder_user select music_folder.id, u.username + from music_folder, ${userTableQuote}user${userTableQuote} u + + + + From 37ae8d9f61df34d9f5288c4fc62f4441ec6a46ab Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Fri, 28 Apr 2017 21:10:13 -0600 Subject: [PATCH 10/13] Fix previous checksum Signed-off-by: Andrew DeMaria --- .../src/main/resources/liquibase/legacy/schema52.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libresonic-main/src/main/resources/liquibase/legacy/schema52.xml b/libresonic-main/src/main/resources/liquibase/legacy/schema52.xml index 82246d3b..16656d75 100644 --- a/libresonic-main/src/main/resources/liquibase/legacy/schema52.xml +++ b/libresonic-main/src/main/resources/liquibase/legacy/schema52.xml @@ -16,7 +16,7 @@ - 7:e7e0f04cd4691ec2b5d955b449e0154b + 7:8fde86035edbca443a54b1861ae70819 From 103de63636c58d9004ea4d4a9ffe49064716a5af Mon Sep 17 00:00:00 2001 From: "Eugene E. Kashpureff Jr" Date: Tue, 2 May 2017 16:09:01 +0000 Subject: [PATCH 11/13] Libresonic v6.2 --- CHANGELOG.md | 6 ++++++ libresonic-main/pom.xml | 2 +- libresonic-rest-api/pom.xml | 2 +- libresonic-sonos-api/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5890b545..4d1634fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ # Libresonic/libresonic # --> +v6.2 +---- + + * Small fixes + * Release only a month behind schedule! We're improving! + v6.2.beta4 --------- diff --git a/libresonic-main/pom.xml b/libresonic-main/pom.xml index f4c695b5..47972b0d 100644 --- a/libresonic-main/pom.xml +++ b/libresonic-main/pom.xml @@ -9,7 +9,7 @@ org.libresonic.player libresonic - 6.2.beta4 + 6.2 diff --git a/libresonic-rest-api/pom.xml b/libresonic-rest-api/pom.xml index 08bb3051..dac7549d 100644 --- a/libresonic-rest-api/pom.xml +++ b/libresonic-rest-api/pom.xml @@ -8,7 +8,7 @@ org.libresonic.player libresonic - 6.2.beta4 + 6.2 diff --git a/libresonic-sonos-api/pom.xml b/libresonic-sonos-api/pom.xml index 3cd53183..9fa919f4 100644 --- a/libresonic-sonos-api/pom.xml +++ b/libresonic-sonos-api/pom.xml @@ -8,7 +8,7 @@ org.libresonic.player libresonic - 6.2.beta4 + 6.2 diff --git a/pom.xml b/pom.xml index d8f2cc5a..c75b81af 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 org.libresonic.player libresonic - 6.2.beta4 + 6.2 Libresonic pom From 4d365f4024ca9548470357174c36b1c842d8c091 Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Wed, 3 May 2017 00:14:39 +0200 Subject: [PATCH 12/13] Update install doc WAR file url to v6.2 --- documentation/INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/INSTALL.md b/documentation/INSTALL.md index e4319e81..3a3ca08d 100644 --- a/documentation/INSTALL.md +++ b/documentation/INSTALL.md @@ -45,7 +45,7 @@ You will need a running [Tomcat](http://tomcat.apache.org/) server. If you're un 1. Download the latest war file: - wget https://github.com/Libresonic/libresonic/releases/download/v6.2.beta1/libresonic-v6.2.beta1.war -O /var/lib/tomcat8/webapps/libresonic.war + wget https://github.com/Libresonic/libresonic/releases/download/v6.2/libresonic-v6.2.war -O /var/lib/tomcat8/webapps/libresonic.war Note that this command copies the war file directly to the Tomcat webapps directory, and renames it to `libresonic.war`. From 0916ab1aac245f8c5b94501fd19e0a0a13f69082 Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Wed, 3 May 2017 17:18:43 -0600 Subject: [PATCH 13/13] Dont mix ws and normal HttpServletRequest retrieval methods Signed-off-by: Andrew DeMaria --- .../player/controller/SonosSettingsController.java | 5 +++-- .../java/org/libresonic/player/service/SonosService.java | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libresonic-main/src/main/java/org/libresonic/player/controller/SonosSettingsController.java b/libresonic-main/src/main/java/org/libresonic/player/controller/SonosSettingsController.java index a83bbc12..c52e399d 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/controller/SonosSettingsController.java +++ b/libresonic-main/src/main/java/org/libresonic/player/controller/SonosSettingsController.java @@ -19,6 +19,7 @@ package org.libresonic.player.controller; import org.apache.commons.lang.StringUtils; +import org.libresonic.player.service.NetworkService; import org.libresonic.player.service.SettingsService; import org.libresonic.player.service.SonosService; import org.springframework.beans.factory.annotation.Autowired; @@ -80,8 +81,8 @@ public class SonosSettingsController { settingsService.setSonosServiceName(sonosServiceName); settingsService.save(); - sonosService.setMusicServiceEnabled(false); - sonosService.setMusicServiceEnabled(sonosEnabled); + sonosService.setMusicServiceEnabled(false, NetworkService.getBaseUrl(request)); + sonosService.setMusicServiceEnabled(sonosEnabled, NetworkService.getBaseUrl(request)); } public void setSettingsService(SettingsService settingsService) { diff --git a/libresonic-main/src/main/java/org/libresonic/player/service/SonosService.java b/libresonic-main/src/main/java/org/libresonic/player/service/SonosService.java index 314d330d..4c7aa623 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/service/SonosService.java +++ b/libresonic-main/src/main/java/org/libresonic/player/service/SonosService.java @@ -106,7 +106,7 @@ public class SonosService implements SonosSoap { @Resource private WebServiceContext context; - public void setMusicServiceEnabled(boolean enabled) { + public void setMusicServiceEnabled(boolean enabled, String baseUrl) { List sonosControllers = upnpService.getSonosControllerHosts(); if (sonosControllers.isEmpty()) { LOG.info("No Sonos controller found"); @@ -116,11 +116,10 @@ public class SonosService implements SonosSoap { String sonosServiceName = settingsService.getSonosServiceName(); int sonosServiceId = settingsService.getSonosServiceId(); - String libresonicBaseUrl = NetworkService.getBaseUrl(getRequest()); for (String sonosController : sonosControllers) { try { - new SonosServiceRegistration().setEnabled(libresonicBaseUrl, sonosController, enabled, + new SonosServiceRegistration().setEnabled(baseUrl, sonosController, enabled, sonosServiceName, sonosServiceId); break; } catch (IOException x) {