Remove url redirection

- Add upnp specific base url
- Use http request base url for areas used by url redirection
- Fix sharing
- Removed Network Settings tab

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
master
Andrew DeMaria 8 years ago
parent f1ab639a48
commit 8b92f2bc51
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 31
      libresonic-main/src/main/java/org/libresonic/player/ajax/NowPlayingService.java
  2. 19
      libresonic-main/src/main/java/org/libresonic/player/ajax/PlayQueueService.java
  3. 82
      libresonic-main/src/main/java/org/libresonic/player/command/NetworkSettingsCommand.java
  4. 3
      libresonic-main/src/main/java/org/libresonic/player/controller/DLNASettingsController.java
  5. 24
      libresonic-main/src/main/java/org/libresonic/player/controller/ExternalPlayerController.java
  6. 13
      libresonic-main/src/main/java/org/libresonic/player/controller/M3UController.java
  7. 11
      libresonic-main/src/main/java/org/libresonic/player/controller/MoreController.java
  8. 88
      libresonic-main/src/main/java/org/libresonic/player/controller/NetworkSettingsController.java
  9. 5
      libresonic-main/src/main/java/org/libresonic/player/controller/PasswordSettingsController.java
  10. 9
      libresonic-main/src/main/java/org/libresonic/player/controller/PodcastController.java
  11. 13
      libresonic-main/src/main/java/org/libresonic/player/controller/RESTController.java
  12. 3
      libresonic-main/src/main/java/org/libresonic/player/controller/ShareManagementController.java
  13. 2
      libresonic-main/src/main/java/org/libresonic/player/controller/ShareSettingsController.java
  14. 27
      libresonic-main/src/main/java/org/libresonic/player/controller/VideoPlayerController.java
  15. 29
      libresonic-main/src/main/java/org/libresonic/player/domain/UrlRedirectType.java
  16. 2
      libresonic-main/src/main/java/org/libresonic/player/security/WebSecurityConfig.java
  17. 207
      libresonic-main/src/main/java/org/libresonic/player/service/NetworkService.java
  18. 137
      libresonic-main/src/main/java/org/libresonic/player/service/SettingsService.java
  19. 8
      libresonic-main/src/main/java/org/libresonic/player/service/ShareService.java
  20. 27
      libresonic-main/src/main/java/org/libresonic/player/service/SonosService.java
  21. 30
      libresonic-main/src/main/java/org/libresonic/player/service/sonos/SonosHelper.java
  22. 19
      libresonic-main/src/main/java/org/libresonic/player/service/upnp/LibresonicContentDirectory.java
  23. 62
      libresonic-main/src/main/java/org/libresonic/player/util/StringUtil.java
  24. 93
      libresonic-main/src/main/java/org/libresonic/player/util/URLBuilder.java
  25. 7
      libresonic-main/src/main/resources/applicationContext-service.xml
  26. 11
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_bg.properties
  27. 10
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_ca.properties
  28. 11
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_cs.properties
  29. 8
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_da.properties
  30. 10
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_de.properties
  31. 10
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_el.properties
  32. 24
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_en.properties
  33. 10
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_et.properties
  34. 9
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_fi.properties
  35. 9
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_fr.properties
  36. 9
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_it.properties
  37. 12
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_ja_JP.properties
  38. 9
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_ko.properties
  39. 10
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_nl.properties
  40. 10
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_pl.properties
  41. 9
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_pt.properties
  42. 8
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_ru.properties
  43. 10
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_sl.properties
  44. 10
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_sv.properties
  45. 10
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_zh_CN.properties
  46. 13
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_zh_TW.properties
  47. 43
      libresonic-main/src/main/webapp/WEB-INF/jsp/createShare.jsp
  48. 11
      libresonic-main/src/main/webapp/WEB-INF/jsp/dlnaSettings.jsp
  49. 2
      libresonic-main/src/main/webapp/WEB-INF/jsp/externalPlayer.jsp
  50. 2
      libresonic-main/src/main/webapp/WEB-INF/jsp/gettingStarted.jsp
  51. 84
      libresonic-main/src/main/webapp/WEB-INF/jsp/networkSettings.jsp
  52. 4
      libresonic-main/src/main/webapp/WEB-INF/jsp/settingsHeader.jsp
  53. 3
      libresonic-main/src/test/java/org/libresonic/player/service/SettingsServiceTestCase.java
  54. 40
      libresonic-main/src/test/java/org/libresonic/player/util/StringUtilTestCase.java

@ -24,10 +24,7 @@ import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.*;
import org.libresonic.player.service.MediaScannerService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.StatusService;
import org.libresonic.player.service.*;
import org.libresonic.player.util.StringUtil;
import javax.servlet.http.HttpServletRequest;
@ -91,7 +88,7 @@ public class NowPlayingService {
private List<NowPlayingInfo> convert(List<PlayStatus> playStatuses) {
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
String url = request.getRequestURL().toString();
String url = NetworkService.getBaseUrl(request);
List<NowPlayingInfo> result = new ArrayList<NowPlayingInfo>();
for (PlayStatus status : playStatuses) {
@ -108,30 +105,20 @@ public class NowPlayingService {
String artist = mediaFile.getArtist();
String title = mediaFile.getTitle();
String streamUrl = url.replaceFirst("/dwr/.*", "/stream?player=" + player.getId() + "&id=" + mediaFile.getId());
String albumUrl = url.replaceFirst("/dwr/.*", "/main.view?id=" + mediaFile.getId());
String streamUrl = url + "/stream?player=" + player.getId() + "&id=" + mediaFile.getId();
String albumUrl = url + "/main.view?id=" + mediaFile.getId();
String lyricsUrl = null;
if (!mediaFile.isVideo()) {
lyricsUrl = url.replaceFirst("/dwr/.*", "/lyrics.view?artistUtf8Hex=" + StringUtil.utf8HexEncode(artist) +
"&songUtf8Hex=" + StringUtil.utf8HexEncode(title));
lyricsUrl = url + "/lyrics.view?artistUtf8Hex=" + StringUtil.utf8HexEncode(artist) +
"&songUtf8Hex=" + StringUtil.utf8HexEncode(title);
}
String coverArtUrl = url.replaceFirst("/dwr/.*", "/coverArt.view?size=60&id=" + mediaFile.getId());
String coverArtUrl = url + "/coverArt.view?size=60&id=" + mediaFile.getId();
String avatarUrl = null;
if (userSettings.getAvatarScheme() == AvatarScheme.SYSTEM) {
avatarUrl = url.replaceFirst("/dwr/.*", "/avatar.view?id=" + userSettings.getSystemAvatarId());
avatarUrl = url + "/avatar.view?id=" + userSettings.getSystemAvatarId();
} else if (userSettings.getAvatarScheme() == AvatarScheme.CUSTOM && settingsService.getCustomAvatar(username) != null) {
avatarUrl = url.replaceFirst("/dwr/.*", "/avatar.view?usernameUtf8Hex=" + StringUtil.utf8HexEncode(username));
}
// Rewrite URLs in case we're behind a proxy.
if (settingsService.isRewriteUrlEnabled()) {
String referer = request.getHeader("referer");
streamUrl = StringUtil.rewriteUrl(streamUrl, referer);
albumUrl = StringUtil.rewriteUrl(albumUrl, referer);
lyricsUrl = StringUtil.rewriteUrl(lyricsUrl, referer);
coverArtUrl = StringUtil.rewriteUrl(coverArtUrl, referer);
avatarUrl = StringUtil.rewriteUrl(avatarUrl, referer);
avatarUrl = url + "/avatar.view?usernameUtf8Hex=" + StringUtil.utf8HexEncode(username);
}
String tooltip = StringUtil.toHtml(artist) + " &ndash; " + StringUtil.toHtml(title);

@ -620,7 +620,7 @@ public class PlayQueueService {
}
private PlayQueueInfo convert(HttpServletRequest request, Player player, boolean serverSidePlaylist, int offset) throws Exception {
String url = request.getRequestURL().toString();
String url = NetworkService.getBaseUrl(request);
if (serverSidePlaylist && player.isJukebox()) {
jukeboxService.updateJukebox(player, offset);
@ -636,19 +636,12 @@ public class PlayQueueService {
for (MediaFile file : playQueue.getFiles()) {
String albumUrl = url.replaceFirst("/dwr/.*", "/main.view?id=" + file.getId());
String streamUrl = url.replaceFirst("/dwr/.*", "/stream?player=" + player.getId() + "&id=" + file.getId());
String coverArtUrl = url.replaceFirst("/dwr/.*", "/coverArt.view?id=" + file.getId());
String albumUrl = url + "/main.view?id=" + file.getId();
String streamUrl = url + "/stream?player=" + player.getId() + "&id=" + file.getId();
String coverArtUrl = url + "/coverArt.view?id=" + file.getId();
// Rewrite URLs in case we're behind a proxy.
if (settingsService.isRewriteUrlEnabled()) {
String referer = request.getHeader("referer");
albumUrl = StringUtil.rewriteUrl(albumUrl, referer);
streamUrl = StringUtil.rewriteUrl(streamUrl, referer);
}
String remoteStreamUrl = settingsService.rewriteRemoteUrl(streamUrl);
String remoteCoverArtUrl = settingsService.rewriteRemoteUrl(coverArtUrl);
String remoteStreamUrl = streamUrl;
String remoteCoverArtUrl = coverArtUrl;
String format = formatFormat(player, file);
String username = securityService.getCurrentUsername(request);

@ -1,82 +0,0 @@
/*
This file is part of Libresonic.
Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/
package org.libresonic.player.command;
/**
* @author Sindre Mehus
* @version $Id$
*/
public class NetworkSettingsCommand {
private boolean urlRedirectionEnabled;
private String urlRedirectFrom;
private String urlRedirectCustomUrl;
private String urlRedirectType;
private int port;
private boolean toast;
public boolean isUrlRedirectionEnabled() {
return urlRedirectionEnabled;
}
public void setUrlRedirectionEnabled(boolean urlRedirectionEnabled) {
this.urlRedirectionEnabled = urlRedirectionEnabled;
}
public String getUrlRedirectFrom() {
return urlRedirectFrom;
}
public void setUrlRedirectFrom(String urlRedirectFrom) {
this.urlRedirectFrom = urlRedirectFrom;
}
public String getUrlRedirectCustomUrl() {
return urlRedirectCustomUrl;
}
public void setUrlRedirectCustomUrl(String urlRedirectCustomUrl) {
this.urlRedirectCustomUrl = urlRedirectCustomUrl;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public boolean isToast() {
return toast;
}
public void setToast(boolean toast) {
this.toast = toast;
}
public String getUrlRedirectType() {
return urlRedirectType;
}
public void setUrlRedirectType(String urlRedirectType) {
this.urlRedirectType = urlRedirectType;
}
}

@ -56,6 +56,7 @@ public class DLNASettingsController {
map.put("dlnaEnabled", settingsService.isDlnaEnabled());
map.put("dlnaServerName", settingsService.getDlnaServerName());
map.put("dlnaBaseLANURL", settingsService.getDlnaBaseLANURL());
model.addAttribute("model", map);
return "dlnaSettings";
@ -71,6 +72,7 @@ public class DLNASettingsController {
private void handleParameters(HttpServletRequest request) {
boolean dlnaEnabled = ServletRequestUtils.getBooleanParameter(request, "dlnaEnabled", false);
String dlnaServerName = StringUtils.trimToNull(request.getParameter("dlnaServerName"));
String dlnaBaseLANURL = StringUtils.trimToNull(request.getParameter("dlnaBaseLANURL"));
if (dlnaServerName == null) {
dlnaServerName = "Libresonic";
}
@ -78,6 +80,7 @@ public class DLNASettingsController {
upnpService.setMediaServerEnabled(false);
settingsService.setDlnaEnabled(dlnaEnabled);
settingsService.setDlnaServerName(dlnaServerName);
settingsService.setDlnaBaseLANURL(dlnaBaseLANURL);
settingsService.save();
upnpService.setMediaServerEnabled(dlnaEnabled);
}

@ -19,6 +19,8 @@
*/
package org.libresonic.player.controller;
import org.apache.commons.lang3.StringUtils;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.MusicFolder;
import org.libresonic.player.domain.Player;
@ -32,6 +34,7 @@ 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.util.UrlPathHelper;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -39,15 +42,21 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
import static org.libresonic.player.controller.ExternalPlayerController.SHARE_PATH;
/**
* Controller for the page used to play shared music (Twitter, Facebook etc).
*
* @author Sindre Mehus
*/
@Controller
@RequestMapping("/share/**")
@RequestMapping(SHARE_PATH + "**")
public class ExternalPlayerController {
private static final Logger LOG = Logger.getLogger(ExternalPlayerController.class);
public static final String SHARE_PATH = "/share/";
@Autowired
private SettingsService settingsService;
@Autowired
@ -60,18 +69,22 @@ public class ExternalPlayerController {
@RequestMapping(method = RequestMethod.GET)
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
Map<String, Object> map = new HashMap<>();
String pathRelativeToBase = new UrlPathHelper().getPathWithinApplication(request);
String pathInfo = request.getPathInfo();
String shareName = StringUtils.removeStart(pathRelativeToBase, SHARE_PATH);
if (pathInfo == null || !pathInfo.startsWith("/")) {
if(StringUtils.isBlank(shareName)) {
LOG.warn("Could not find share with shareName " + shareName);
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return null;
}
Share share = shareService.getShareByName(pathInfo.substring(1));
Share share = shareService.getShareByName(shareName);
if (share != null && share.getExpires() != null && share.getExpires().before(new Date())) {
LOG.warn("Share " + shareName + " is expired");
share = null;
}
@ -85,7 +98,6 @@ public class ExternalPlayerController {
map.put("share", share);
map.put("songs", getSongs(share, player.getUsername()));
map.put("redirectUrl", settingsService.getUrlRedirectUrl());
map.put("player", player.getId());
return new ModelAndView("externalPlayer", "model", map);

@ -22,6 +22,7 @@ package org.libresonic.player.controller;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.PlayQueue;
import org.libresonic.player.domain.Player;
import org.libresonic.player.service.NetworkService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.TranscodingService;
@ -62,16 +63,8 @@ public class M3UController {
Player player = playerService.getPlayer(request, response);
String url = request.getRequestURL().toString();
url = url.replaceFirst("play.m3u.*", "stream?");
// Rewrite URLs in case we're behind a proxy.
if (settingsService.isRewriteUrlEnabled()) {
String referer = request.getHeader("referer");
url = StringUtil.rewriteUrl(url, referer);
}
url = settingsService.rewriteRemoteUrl(url);
String url = NetworkService.getBaseUrl(request);
url = url + "stream?";
if (player.isExternalWithPlaylist()) {
createClientSidePlaylist(response.getWriter(), player, url);

@ -22,10 +22,7 @@ package org.libresonic.player.controller;
import org.libresonic.player.domain.MusicFolder;
import org.libresonic.player.domain.Player;
import org.libresonic.player.domain.User;
import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.*;
import org.libresonic.player.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -74,11 +71,7 @@ public class MoreController {
StringBuilder jamstashUrl = new StringBuilder("http://jamstash.com/#/settings?u=" + StringUtil.urlEncode(user.getUsername()) + "&url=");
if (settingsService.isUrlRedirectionEnabled()) {
jamstashUrl.append(StringUtil.urlEncode(settingsService.getUrlRedirectUrl()));
} else {
jamstashUrl.append(StringUtil.urlEncode(request.getRequestURL().toString().replaceAll("/more.view.*", "")));
}
jamstashUrl.append(StringUtil.urlEncode(NetworkService.getBaseUrl(request)));
Player player = playerService.getPlayer(request, response);
ModelAndView result = new ModelAndView();

@ -1,88 +0,0 @@
/*
This file is part of Libresonic.
Libresonic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Libresonic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
Copyright 2016 (C) Libresonic Authors
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
*/
package org.libresonic.player.controller;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.command.NetworkSettingsCommand;
import org.libresonic.player.domain.UrlRedirectType;
import org.libresonic.player.service.NetworkService;
import org.libresonic.player.service.SettingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import java.util.Random;
/**
* Controller for the page used to change the network settings.
*
* @author Sindre Mehus
*/
@Controller
@RequestMapping("/networkSettings")
public class NetworkSettingsController {
@Autowired
private SettingsService settingsService;
@Autowired
private NetworkService networkService;
@ModelAttribute
protected void formBackingObject(Model model) throws Exception {
NetworkSettingsCommand command = new NetworkSettingsCommand();
command.setUrlRedirectionEnabled(settingsService.isUrlRedirectionEnabled());
command.setUrlRedirectType(settingsService.getUrlRedirectType().name());
command.setUrlRedirectFrom(settingsService.getUrlRedirectFrom());
command.setUrlRedirectCustomUrl(settingsService.getUrlRedirectCustomUrl());
command.setPort(settingsService.getPort());
model.addAttribute("command",command);
}
@RequestMapping(method = RequestMethod.GET)
protected String displayForm() throws Exception {
return "networkSettings";
}
@RequestMapping(method = RequestMethod.POST)
protected String doSubmitAction(@ModelAttribute("command") NetworkSettingsCommand command, RedirectAttributes redirectAttributes) throws Exception {
settingsService.setUrlRedirectionEnabled(command.isUrlRedirectionEnabled());
settingsService.setUrlRedirectType(UrlRedirectType.valueOf(command.getUrlRedirectType()));
settingsService.setUrlRedirectFrom(StringUtils.lowerCase(command.getUrlRedirectFrom()));
settingsService.setUrlRedirectCustomUrl(StringUtils.trimToEmpty(command.getUrlRedirectCustomUrl()));
if (settingsService.getServerId() == null) {
Random rand = new Random(System.currentTimeMillis());
settingsService.setServerId(String.valueOf(Math.abs(rand.nextLong())));
}
settingsService.save();
networkService.initUrlRedirection(true);
redirectAttributes.addFlashAttribute("settings_toast", true);
return "redirect:networkSettings.view";
}
}

@ -66,7 +66,7 @@ public class PasswordSettingsController {
}
@RequestMapping(method = RequestMethod.POST)
protected String doSubmitAction(HttpServletRequest request,@ModelAttribute("command") @Validated PasswordSettingsCommand command,BindingResult bindingResult, RedirectAttributes redirectAttributes) throws Exception {
protected String doSubmitAction(@ModelAttribute("command") @Validated PasswordSettingsCommand command, BindingResult bindingResult, RedirectAttributes redirectAttributes) throws Exception {
if (!bindingResult.hasErrors()) {
User user = securityService.getUserByName(command.getUsername());
user.setPassword(command.getPassword());
@ -75,11 +75,10 @@ public class PasswordSettingsController {
command.setPassword(null);
command.setConfirmPassword(null);
redirectAttributes.addFlashAttribute("settings_toast", true);
return "redirect:passwordSettings.view";
} else {
return "passwordSettings";
}
return "redirect:passwordSettings.view";
}
}

@ -79,14 +79,7 @@ public class PodcastController {
String suffix = songs.get(0).getFormat();
String type = StringUtil.getMimeType(suffix);
// Rewrite URLs in case we're behind a proxy.
if (settingsService.isRewriteUrlEnabled()) {
String referer = request.getHeader("referer");
url = StringUtil.rewriteUrl(url, referer);
}
String enclosureUrl = url.replaceFirst("/podcast.*", "/stream?playlist=" + playlist.getId());
enclosureUrl = settingsService.rewriteRemoteUrl(enclosureUrl);
String enclosureUrl = url + "/stream?playlist=" + playlist.getId();
podcasts.add(new Podcast(playlist.getName(), publishDate, enclosureUrl, length, type));
}

@ -1809,7 +1809,7 @@ public class RESTController {
Shares result = new Shares();
for (Share share : shareService.getSharesForUser(user)) {
org.libresonic.restapi.Share s = createJaxbShare(share);
org.libresonic.restapi.Share s = createJaxbShare(request, share);
result.getShare().add(s);
for (MediaFile mediaFile : shareService.getSharedFiles(share.getId(), musicFolders)) {
@ -1833,11 +1833,6 @@ public class RESTController {
return;
}
if (!settingsService.isUrlRedirectionEnabled()) {
error(request, response, ErrorCode.GENERIC, "Sharing is only supported for *.libresonic.org domain names.");
return;
}
List<MediaFile> files = new ArrayList<MediaFile>();
for (int id : getRequiredIntParameters(request, "id")) {
files.add(mediaFileService.getMediaFile(id));
@ -1852,7 +1847,7 @@ public class RESTController {
shareService.updateShare(share);
Shares result = new Shares();
org.libresonic.restapi.Share s = createJaxbShare(share);
org.libresonic.restapi.Share s = createJaxbShare(request, share);
result.getShare().add(s);
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
@ -1912,10 +1907,10 @@ public class RESTController {
writeEmptyResponse(request, response);
}
private org.libresonic.restapi.Share createJaxbShare(Share share) {
private org.libresonic.restapi.Share createJaxbShare(HttpServletRequest request, Share share) {
org.libresonic.restapi.Share result = new org.libresonic.restapi.Share();
result.setId(String.valueOf(share.getId()));
result.setUrl(shareService.getShareUrl(share));
result.setUrl(shareService.getShareUrl(request, share));
result.setUsername(share.getUsername());
result.setCreated(jaxbWriter.convertDate(share.getCreated()));
result.setVisitCount(share.getVisitCount());

@ -72,7 +72,6 @@ public class ShareManagementController {
}
Map<String, Object> map = new HashMap<String, Object>();
map.put("urlRedirectionEnabled", settingsService.isUrlRedirectionEnabled());
map.put("dir", dir);
map.put("user", securityService.getCurrentUser(request));
@ -83,7 +82,7 @@ public class ShareManagementController {
shareService.updateShare(share);
}
map.put("playUrl", shareService.getShareUrl(share));
map.put("playUrl", shareService.getShareUrl(request, share));
return new ModelAndView("createShare", "model", map);
}

@ -63,7 +63,7 @@ public class ShareSettingsController {
public String doGet(HttpServletRequest request, Model model) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
map.put("shareBaseUrl", shareService.getShareBaseUrl());
map.put("shareBaseUrl", shareService.getShareBaseUrl(request));
map.put("shareInfos", getShareInfos(request));
map.put("user", securityService.getCurrentUser(request));

@ -21,10 +21,7 @@ package org.libresonic.player.controller;
import org.libresonic.player.domain.MediaFile;
import org.libresonic.player.domain.User;
import org.libresonic.player.service.MediaFileService;
import org.libresonic.player.service.PlayerService;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.service.SettingsService;
import org.libresonic.player.service.*;
import org.libresonic.player.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -55,8 +52,6 @@ public class VideoPlayerController {
@Autowired
private MediaFileService mediaFileService;
@Autowired
private SettingsService settingsService;
@Autowired
private PlayerService playerService;
@Autowired
private SecurityService securityService;
@ -72,24 +67,14 @@ public class VideoPlayerController {
Integer duration = file.getDurationSeconds();
String playerId = playerService.getPlayer(request, response).getId();
String url = request.getRequestURL().toString();
String streamUrl = url.replaceFirst("/videoPlayer.view.*", "/stream?id=" + file.getId() + "&player=" + playerId);
String coverArtUrl = url.replaceFirst("/videoPlayer.view.*", "/coverArt.view?id=" + file.getId());
// Rewrite URLs in case we're behind a proxy.
if (settingsService.isRewriteUrlEnabled()) {
String referer = request.getHeader("referer");
streamUrl = StringUtil.rewriteUrl(streamUrl, referer);
coverArtUrl = StringUtil.rewriteUrl(coverArtUrl, referer);
}
String remoteStreamUrl = settingsService.rewriteRemoteUrl(streamUrl);
String remoteCoverArtUrl = settingsService.rewriteRemoteUrl(coverArtUrl);
String url = NetworkService.getBaseUrl(request);
String streamUrl = url + "/stream?id=" + file.getId() + "&player=" + playerId;
String coverArtUrl = url + "/coverArt.view?id=" + file.getId();
map.put("video", file);
map.put("streamUrl", streamUrl);
map.put("remoteStreamUrl", remoteStreamUrl);
map.put("remoteCoverArtUrl", remoteCoverArtUrl);
map.put("remoteStreamUrl", streamUrl);
map.put("remoteCoverArtUrl", coverArtUrl);
map.put("duration", duration);
map.put("bitRates", BIT_RATES);
map.put("defaultBitRate", DEFAULT_BIT_RATE);

@ -1,29 +0,0 @@
/*
* This file is part of Libresonic.
*
* Libresonic is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Libresonic is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2015 (C) Sindre Mehus
*/
package org.libresonic.player.domain;
/**
* @author Sindre Mehus
* @version $Id$
*/
public enum UrlRedirectType {
NORMAL,
CUSTOM
}

@ -79,7 +79,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
"/playerSettings.view", "/shareSettings.view","/passwordSettings.view")
.hasRole("SETTINGS")
.antMatchers("/generalSettings.view","/advancedSettings.view","/userSettings.view",
"/musicFolderSettings.view","/networkSettings.view")
"/musicFolderSettings.view")
.hasRole("ADMIN")
.antMatchers("/deletePlaylist.view","/savePlaylist.view")
.hasRole("PLAYLIST")

@ -19,31 +19,15 @@
*/
package org.libresonic.player.service;
import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
import org.apache.http.StatusLine;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.BasicResponseHandler;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.libresonic.player.Logger;
import org.libresonic.player.domain.UrlRedirectType;
import org.libresonic.player.util.StringUtil;
import java.io.IOException;
import java.util.ArrayList;
import org.springframework.web.util.UrlPathHelper;
import javax.servlet.http.HttpServletRequest;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Date;
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/**
* Provides network-related services, including port forwarding on UPnP routers and
@ -53,53 +37,16 @@ import java.util.concurrent.TimeUnit;
*/
public class NetworkService {
private static final Logger LOG = Logger.getLogger(NetworkService.class);
private static final long URL_REDIRECTION_DELAY = 2 * 3600L;
private static final String URL_REDIRECTION_REGISTER_URL = getBackendUrl() + "/backend/redirect/register.view";
private static final String URL_REDIRECTION_UNREGISTER_URL = getBackendUrl() + "/backend/redirect/unregister.view";
private static final String URL_REDIRECTION_TEST_URL = getBackendUrl() + "/backend/redirect/test.view";
private SettingsService settingsService;
private final ScheduledExecutorService executor = Executors.newScheduledThreadPool(4);
private final URLRedirectionTask urlRedirectionTask = new URLRedirectionTask();
private Future<?> urlRedirectionFuture;
public static final String NOT_SUPPORTED = "NOT SUPPORTED";
private final static Status portForwardingStatus;
private final static Status urlRedirectionStatus;
static {
portForwardingStatus = new Status();
portForwardingStatus.setText("NOT SUPPORTED");
}
private final Status urlRedirectionStatus = new Status();
private boolean testUrlRedirection;
public void init() {
initUrlRedirection(false);
}
/**
* Configures URL redirection.
*
* @param test Whether to test that the redirection works.
*/
public synchronized void initUrlRedirection(boolean test) {
if (true) {
// This feature isn't currently supported, since it's a public service of subsonic.org
// Display a warning message for now
boolean enabled = settingsService.isUrlRedirectionEnabled() && settingsService.getUrlRedirectType() == UrlRedirectType.NORMAL;
if (enabled) {
LOG.warn("The URL redirection service is currently not enabled!");
}
return;
}
urlRedirectionStatus.setText("Idle");
if (urlRedirectionFuture != null) {
urlRedirectionFuture.cancel(true);
}
testUrlRedirection = test;
urlRedirectionFuture = executor.scheduleWithFixedDelay(urlRedirectionTask, 0L, URL_REDIRECTION_DELAY, TimeUnit.SECONDS);
portForwardingStatus.setText(NOT_SUPPORTED);
urlRedirectionStatus = new Status();
urlRedirectionStatus.setText(NOT_SUPPORTED);
}
public Status getPortForwardingStatus() {
@ -110,115 +57,6 @@ public class NetworkService {
return urlRedirectionStatus;
}
public static String getBackendUrl() {
return "true".equals(System.getProperty("libresonic.test")) ? "http://localhost:8080" : "http://libresonic.org";
}
public void setSettingsService(SettingsService settingsService) {
this.settingsService = settingsService;
}
private class URLRedirectionTask extends Task {
@Override
protected void execute() {
boolean enable = settingsService.isUrlRedirectionEnabled() && settingsService.getUrlRedirectType() == UrlRedirectType.NORMAL;
HttpPost request = new HttpPost(enable ? URL_REDIRECTION_REGISTER_URL : URL_REDIRECTION_UNREGISTER_URL);
int port = settingsService.getPort();
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("serverId", settingsService.getServerId()));
params.add(new BasicNameValuePair("redirectFrom", settingsService.getUrlRedirectFrom()));
params.add(new BasicNameValuePair("port", String.valueOf(port)));
params.add(new BasicNameValuePair("localIp", settingsService.getLocalIpAddress()));
params.add(new BasicNameValuePair("localPort", String.valueOf(port)));
params.add(new BasicNameValuePair("contextPath", settingsService.getUrlRedirectContextPath()));
try (CloseableHttpClient client = HttpClients.createDefault()) {
urlRedirectionStatus.setText(enable ? "Registering web address..." : "Unregistering web address...");
request.setEntity(new UrlEncodedFormEntity(params, StringUtil.ENCODING_UTF8));
try (CloseableHttpResponse response = client.execute(request)) {
StatusLine status = response.getStatusLine();
switch (status.getStatusCode()) {
case HttpStatus.SC_BAD_REQUEST:
urlRedirectionStatus.setText(EntityUtils.toString(response.getEntity()));
testUrlRedirection = false;
break;
case HttpStatus.SC_OK:
urlRedirectionStatus.setText(enable ? "Successfully registered web address." : "Web address disabled.");
break;
default:
testUrlRedirection = false;
throw new IOException(status.getStatusCode() + " " + status.getReasonPhrase());
}
}
} catch (Throwable x) {
LOG.warn(enable ? "Failed to register web address." : "Failed to unregister web address.", x);
urlRedirectionStatus.setText(enable ? ("Failed to register web address. " + x.getMessage() +
" (" + x.getClass().getSimpleName() + ")") : "Web address disabled.");
}
// Test redirection, but only once.
if (testUrlRedirection) {
testUrlRedirection = false;
testUrlRedirection();
}
// Don't do it again if disabled.
if (!enable && urlRedirectionFuture != null) {
urlRedirectionFuture.cancel(false);
}
}
private void testUrlRedirection() {
String urlToTest;
String url = URL_REDIRECTION_TEST_URL;
if (settingsService.getUrlRedirectType() == UrlRedirectType.NORMAL) {
url += "?redirectFrom=" + settingsService.getUrlRedirectFrom();
urlToTest = settingsService.getUrlRedirectFrom() + ".libresonic.org";
} else {
url += "?customUrl=" + settingsService.getUrlRedirectCustomUrl();
urlToTest = settingsService.getUrlRedirectCustomUrl();
}
HttpGet request = new HttpGet(url);
RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(15000)
.setSocketTimeout(15000)
.build();
request.setConfig(requestConfig);
try (CloseableHttpClient client = HttpClients.createDefault()) {
urlRedirectionStatus.setText("Testing web address " + urlToTest + ". Please wait...");
String response = client.execute(request, new BasicResponseHandler());
urlRedirectionStatus.setText(response);
} catch (Throwable x) {
LOG.warn("Failed to test web address.", x);
urlRedirectionStatus.setText("Failed to test web address. " + x.getMessage() + " (" + x.getClass().getSimpleName() + ")");
}
}
}
private abstract class Task implements Runnable {
public void run() {
String name = getClass().getSimpleName();
try {
execute();
} catch (Throwable x) {
LOG.error("Error executing " + name + ": " + x.getMessage(), x);
}
}
protected abstract void execute();
}
public static class Status {
private String text;
@ -237,4 +75,21 @@ public class NetworkService {
return date;
}
}
public static String getBaseUrl(HttpServletRequest request) {
try {
UrlPathHelper urlPathHelper = new UrlPathHelper();
URL url = new URL(request.getRequestURL().toString());
String host = url.getHost();
String userInfo = url.getUserInfo();
String scheme = url.getProtocol();
int port = url.getPort();
URI uri = new URI(scheme, userInfo, host, port, urlPathHelper.getContextPath(request), null, null);
return uri.toString() + "/";
} catch (MalformedURLException | URISyntaxException e) {
throw new RuntimeException("Could not calculate base url", e);
}
}
}

@ -34,7 +34,8 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
* Provides persistent storage of application settings and preferences.
@ -77,7 +78,6 @@ public class SettingsService {
private static final String KEY_HLS_COMMAND = "HlsCommand3";
private static final String KEY_JUKEBOX_COMMAND = "JukeboxCommand2";
private static final String KEY_VIDEO_IMAGE_COMMAND = "VideoImageCommand";
private static final String KEY_REWRITE_URL = "RewriteUrl";
private static final String KEY_LDAP_ENABLED = "LdapEnabled";
private static final String KEY_LDAP_URL = "LdapUrl";
private static final String KEY_LDAP_MANAGER_DN = "LdapManagerDn";
@ -85,13 +85,6 @@ public class SettingsService {
private static final String KEY_LDAP_SEARCH_FILTER = "LdapSearchFilter";
private static final String KEY_LDAP_AUTO_SHADOWING = "LdapAutoShadowing";
private static final String KEY_GETTING_STARTED_ENABLED = "GettingStartedEnabled";
private static final String KEY_PORT = "Port";
private static final String KEY_HTTPS_PORT = "HttpsPort";
private static final String KEY_URL_REDIRECTION_ENABLED = "UrlRedirectionEnabled";
private static final String KEY_URL_REDIRECT_TYPE = "UrlRedirectType";
private static final String KEY_URL_REDIRECT_FROM = "UrlRedirectFrom";
private static final String KEY_URL_REDIRECT_CONTEXT_PATH = "UrlRedirectContextPath";
private static final String KEY_URL_REDIRECT_CUSTOM_URL = "UrlRedirectCustomUrl";
private static final String KEY_SERVER_ID = "ServerId";
private static final String KEY_SETTINGS_CHANGED = "SettingsChanged";
private static final String KEY_LAST_SCANNED = "LastScanned";
@ -100,6 +93,7 @@ public class SettingsService {
private static final String KEY_MEDIA_LIBRARY_STATISTICS = "MediaLibraryStatistics";
private static final String KEY_DLNA_ENABLED = "DlnaEnabled";
private static final String KEY_DLNA_SERVER_NAME = "DlnaServerName";
private static final String KEY_DLNA_BASE_LAN_URL = "DlnaBaseLANURL";
private static final String KEY_SONOS_ENABLED = "SonosEnabled";
private static final String KEY_SONOS_SERVICE_NAME = "SonosServiceName";
private static final String KEY_SONOS_SERVICE_ID = "SonosServiceId";
@ -148,7 +142,6 @@ public class SettingsService {
private static final String DEFAULT_HLS_COMMAND = "ffmpeg -ss %o -t %d -i %s -async 1 -b:v %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f mpegts -c:v libx264 -preset superfast -c:a libmp3lame -threads 0 -";
private static final String DEFAULT_JUKEBOX_COMMAND = "ffmpeg -ss %o -i %s -map 0:0 -v 0 -ar 44100 -ac 2 -f s16be -";
private static final String DEFAULT_VIDEO_IMAGE_COMMAND = "ffmpeg -r 1 -ss %o -t 1 -i %s -s %wx%h -v 0 -f mjpeg -";
private static final boolean DEFAULT_REWRITE_URL = true;
private static final boolean DEFAULT_LDAP_ENABLED = false;
private static final String DEFAULT_LDAP_URL = "ldap://host.domain.com:389/cn=Users,dc=domain,dc=com";
private static final String DEFAULT_LDAP_MANAGER_DN = null;
@ -156,13 +149,6 @@ public class SettingsService {
private static final String DEFAULT_LDAP_SEARCH_FILTER = "(sAMAccountName={0})";
private static final boolean DEFAULT_LDAP_AUTO_SHADOWING = false;
private static final boolean DEFAULT_GETTING_STARTED_ENABLED = true;
private static final int DEFAULT_PORT = 80;
private static final int DEFAULT_HTTPS_PORT = 0;
private static final boolean DEFAULT_URL_REDIRECTION_ENABLED = false;
private static final UrlRedirectType DEFAULT_URL_REDIRECT_TYPE = UrlRedirectType.NORMAL;
private static final String DEFAULT_URL_REDIRECT_FROM = "yourname";
private static final String DEFAULT_URL_REDIRECT_CONTEXT_PATH = System.getProperty("libresonic.contextPath", "").replaceAll("/", "");
private static final String DEFAULT_URL_REDIRECT_CUSTOM_URL = "http://";
private static final String DEFAULT_SERVER_ID = null;
private static final long DEFAULT_SETTINGS_CHANGED = 0L;
private static final boolean DEFAULT_ORGANIZE_BY_FOLDER_STRUCTURE = true;
@ -170,6 +156,7 @@ public class SettingsService {
private static final String DEFAULT_MEDIA_LIBRARY_STATISTICS = "0 0 0 0 0";
private static final boolean DEFAULT_DLNA_ENABLED = false;
private static final String DEFAULT_DLNA_SERVER_NAME = "Libresonic";
private static final String DEFAULT_DLNA_BASE_LAN_URL = null;
private static final boolean DEFAULT_SONOS_ENABLED = false;
private static final String DEFAULT_SONOS_SERVICE_NAME = "Libresonic";
private static final int DEFAULT_SONOS_SERVICE_ID = 242;
@ -186,7 +173,8 @@ public class SettingsService {
"DownsamplingCommand", "DownsamplingCommand2", "DownsamplingCommand3", "AutoCoverBatch", "MusicMask",
"VideoMask", "CoverArtMask, HlsCommand", "HlsCommand2", "JukeboxCommand",
"CoverArtFileTypes", "UrlRedirectCustomHost", "CoverArtLimit", "StreamPort",
"PortForwardingEnabled");
"PortForwardingEnabled", "RewriteUrl", "UrlRedirectCustomUrl", "UrlRedirectContextPath",
"UrlRedirectFrom", "UrlRedirectionEnabled", "UrlRedirectType", "Port", "HttpsPort");
private static final String LOCALES_FILE = "/org/libresonic/player/i18n/locales.txt";
private static final String THEMES_FILE = "/org/libresonic/player/theme/themes.txt";
@ -200,7 +188,6 @@ public class SettingsService {
private UserDao userDao;
private AvatarDao avatarDao;
private ApacheCommonsConfigurationService configurationService;
private VersionService versionService;
private String[] cachedCoverArtFileTypesArray;
private String[] cachedMusicFileTypesArray;
@ -208,12 +195,6 @@ public class SettingsService {
private List<MusicFolder> cachedMusicFolders;
private final ConcurrentMap<String, List<MusicFolder>> cachedMusicFoldersPerUser = new ConcurrentHashMap<String, List<MusicFolder>>();
private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
private static final long LOCAL_IP_LOOKUP_DELAY_SECONDS = 60;
private String localIpAddress;
private void removeObseleteProperties() {
OBSOLETE_KEYS.forEach( oKey -> {
@ -249,7 +230,6 @@ public class SettingsService {
public void init() {
logServerInfo();
ServiceLocator.setSettingsService(this);
scheduleLocalIpAddressLookup();
}
private void logServerInfo() {
@ -594,14 +574,6 @@ public class SettingsService {
return getProperty(KEY_VIDEO_IMAGE_COMMAND, DEFAULT_VIDEO_IMAGE_COMMAND);
}
public boolean isRewriteUrlEnabled() {
return getBoolean(KEY_REWRITE_URL, DEFAULT_REWRITE_URL);
}
public void setRewriteUrlEnabled(boolean rewriteUrl) {
setBoolean(KEY_REWRITE_URL, rewriteUrl);
}
public boolean isLdapEnabled() {
return getBoolean(KEY_LDAP_ENABLED, DEFAULT_LDAP_ENABLED);
}
@ -669,69 +641,6 @@ public class SettingsService {
setBoolean(KEY_GETTING_STARTED_ENABLED, isGettingStartedEnabled);
}
public int getPort() {
return getInt(KEY_PORT, DEFAULT_PORT);
}
public void setPort(int port) {
setInt(KEY_PORT, port);
}
public int getHttpsPort() {
return getInt(KEY_HTTPS_PORT, DEFAULT_HTTPS_PORT);
}
public void setHttpsPort(int httpsPort) {
setInt(KEY_HTTPS_PORT, httpsPort);
}
public boolean isUrlRedirectionEnabled() {
return getBoolean(KEY_URL_REDIRECTION_ENABLED, DEFAULT_URL_REDIRECTION_ENABLED);
}
public void setUrlRedirectionEnabled(boolean isUrlRedirectionEnabled) {
setBoolean(KEY_URL_REDIRECTION_ENABLED, isUrlRedirectionEnabled);
}
public String getUrlRedirectUrl() {
if (getUrlRedirectType() == UrlRedirectType.NORMAL) {
return "http://" + getUrlRedirectFrom() + ".libresonic.org";
}
return StringUtils.removeEnd(getUrlRedirectCustomUrl(), "/");
}
public String getUrlRedirectFrom() {
return getProperty(KEY_URL_REDIRECT_FROM, DEFAULT_URL_REDIRECT_FROM);
}
public void setUrlRedirectFrom(String urlRedirectFrom) {
setProperty(KEY_URL_REDIRECT_FROM, urlRedirectFrom);
}
public UrlRedirectType getUrlRedirectType() {
return UrlRedirectType.valueOf(getProperty(KEY_URL_REDIRECT_TYPE, DEFAULT_URL_REDIRECT_TYPE.name()));
}
public void setUrlRedirectType(UrlRedirectType urlRedirectType) {
setProperty(KEY_URL_REDIRECT_TYPE, urlRedirectType.name());
}
public String getUrlRedirectContextPath() {
return getProperty(KEY_URL_REDIRECT_CONTEXT_PATH, DEFAULT_URL_REDIRECT_CONTEXT_PATH);
}
public void setUrlRedirectContextPath(String contextPath) {
setProperty(KEY_URL_REDIRECT_CONTEXT_PATH, contextPath);
}
public String getUrlRedirectCustomUrl() {
return StringUtils.trimToNull(getProperty(KEY_URL_REDIRECT_CUSTOM_URL, DEFAULT_URL_REDIRECT_CUSTOM_URL));
}
public void setUrlRedirectCustomUrl(String customUrl) {
setProperty(KEY_URL_REDIRECT_CUSTOM_URL, customUrl);
}
public String getServerId() {
return getProperty(KEY_SERVER_ID, DEFAULT_SERVER_ID);
}
@ -1210,6 +1119,14 @@ public class SettingsService {
setString(KEY_DLNA_SERVER_NAME, dlnaServerName);
}
public String getDlnaBaseLANURL() {
return getString(KEY_DLNA_BASE_LAN_URL, DEFAULT_DLNA_BASE_LAN_URL);
}
public void setDlnaBaseLANURL(String dlnaBaseLANURL) {
setString(KEY_DLNA_BASE_LAN_URL, dlnaBaseLANURL);
}
public boolean isSonosEnabled() {
return getBoolean(KEY_SONOS_ENABLED, DEFAULT_SONOS_ENABLED);
}
@ -1234,19 +1151,6 @@ public class SettingsService {
setInt(KEY_SONOS_SERVICE_ID, sonosServiceid);
}
public String getLocalIpAddress() {
return localIpAddress;
}
/**
* Rewrites an URL to make it accessible from remote clients.
*/
public String rewriteRemoteUrl(String localUrl) {
return StringUtil.rewriteRemoteUrl(localUrl, isUrlRedirectionEnabled(), getUrlRedirectType(), getUrlRedirectFrom(),
getUrlRedirectCustomUrl(), getUrlRedirectContextPath(), getLocalIpAddress(),
getPort());
}
private void setProperty(String key, Object value) {
if (value == null) {
configurationService.clearProperty(key);
@ -1265,15 +1169,6 @@ public class SettingsService {
return result.toArray(new String[result.size()]);
}
private void scheduleLocalIpAddressLookup() {
Runnable task = new Runnable() {
public void run() {
localIpAddress = Util.getLocalIpAddress();
}
};
executor.scheduleWithFixedDelay(task,0, LOCAL_IP_LOOKUP_DELAY_SECONDS, TimeUnit.SECONDS);
}
public void setInternetRadioDao(InternetRadioDao internetRadioDao) {
this.internetRadioDao = internetRadioDao;
}
@ -1290,10 +1185,6 @@ public class SettingsService {
this.avatarDao = avatarDao;
}
public void setVersionService(VersionService versionService) {
this.versionService = versionService;
}
public String getSmtpServer() {
return getProperty(KEY_SMTP_SERVER, DEFAULT_SMTP_SERVER);
}

@ -115,12 +115,12 @@ public class ShareService {
shareDao.deleteShare(id);
}
public String getShareBaseUrl() {
return settingsService.getUrlRedirectUrl() + "/share/";
public String getShareBaseUrl(HttpServletRequest request) {
return NetworkService.getBaseUrl(request) + "/share/";
}
public String getShareUrl(Share share) {
return getShareBaseUrl() + share.getName();
public String getShareUrl(HttpServletRequest request, Share share) {
return getShareBaseUrl(request) + share.getName();
}
public void setSecurityService(SecurityService securityService) {

@ -51,9 +51,6 @@ import javax.xml.ws.handler.MessageContext;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/**
* For manual testing of this service:
@ -101,8 +98,6 @@ public class SonosService implements SonosSoap {
private PlaylistService playlistService;
private UPnPService upnpService;
private final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
/**
* The context for the request. This is used to get the Auth information
* form the headers as well as using the request url to build the correct
@ -111,26 +106,6 @@ public class SonosService implements SonosSoap {
@Resource
private WebServiceContext context;
private String localIp;
public void init() {
executor.scheduleWithFixedDelay(new Runnable() {
@Override
public void run() {
registerIfLocalIpChanged();
}
}, 8, 60, TimeUnit.SECONDS);
}
private void registerIfLocalIpChanged() {
if (settingsService.isSonosEnabled()) {
if (localIp == null || !localIp.equals(settingsService.getLocalIpAddress())) {
localIp = settingsService.getLocalIpAddress();
setMusicServiceEnabled(true);
}
}
}
public void setMusicServiceEnabled(boolean enabled) {
List<String> sonosControllers = upnpService.getSonosControllerHosts();
if (sonosControllers.isEmpty()) {
@ -141,7 +116,7 @@ public class SonosService implements SonosSoap {
String sonosServiceName = settingsService.getSonosServiceName();
int sonosServiceId = settingsService.getSonosServiceId();
String libresonicBaseUrl = sonosHelper.getBaseUrl(getRequest());
String libresonicBaseUrl = NetworkService.getBaseUrl(getRequest());
for (String sonosController : sonosControllers) {
try {

@ -23,19 +23,19 @@ import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.sonos.services._1.*;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.controller.CoverArtController;
import org.libresonic.player.dao.MediaFileDao;
import org.libresonic.player.domain.*;
import org.libresonic.player.service.*;
import org.libresonic.player.util.StringUtil;
import org.libresonic.player.util.Util;
import org.springframework.web.bind.ServletRequestUtils;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import static org.libresonic.player.service.NetworkService.getBaseUrl;
/**
* @author Sindre Mehus
* @version $Id$
@ -634,7 +634,7 @@ public class SonosHelper {
Player player = createPlayerIfNecessary(username);
MediaFile song = mediaFileService.getMediaFile(mediaFileId);
return getBaseUrl(request) + "stream?id=" + song.getId() + "&player=" + player.getId();
return NetworkService.getBaseUrl(request) + "stream?id=" + song.getId() + "&player=" + player.getId();
}
private Player createPlayerIfNecessary(String username) {
@ -654,30 +654,6 @@ public class SonosHelper {
return players.get(0);
}
public String getBaseUrl(HttpServletRequest request) {
int port = settingsService.getPort();
String contextPath = settingsService.getUrlRedirectContextPath();
// Note that the server IP can be overridden by the "ip" parameter. Used when Libresonic and Sonos are
// on different networks.
String ip = settingsService.getLocalIpAddress();
if (request != null) {
ip = ServletRequestUtils.getStringParameter(request, "ip", ip);
}
// Note: Serving media and cover art with http (as opposed to https) works when using jetty and LibresonicDeployer.
StringBuilder url = new StringBuilder("http://")
.append(ip)
.append(":")
.append(port)
.append("/");
if (StringUtils.isNotEmpty(contextPath)) {
url.append(contextPath).append("/");
}
return url.toString();
}
public void setMediaFileService(MediaFileService mediaFileService) {
this.mediaFileService = mediaFileService;
}

@ -20,7 +20,7 @@
package org.libresonic.player.service.upnp;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.fourthline.cling.support.contentdirectory.AbstractContentDirectoryService;
import org.fourthline.cling.support.contentdirectory.ContentDirectoryException;
import org.fourthline.cling.support.contentdirectory.DIDLParser;
@ -92,20 +92,11 @@ public abstract class LibresonicContentDirectory extends AbstractContentDirector
}
protected String getBaseUrl() {
int port = settingsService.getPort();
String contextPath = settingsService.getUrlRedirectContextPath();
// Note: Serving media and cover art with http (as opposed to https) works when using jetty and LibresonicDeployer.
StringBuilder url = new StringBuilder("http://")
.append(settingsService.getLocalIpAddress())
.append(":")
.append(port)
.append("/");
if (StringUtils.isNotEmpty(contextPath)) {
url.append(contextPath).append("/");
String dlnaBaseLANURL = settingsService.getDlnaBaseLANURL();
if(StringUtils.isBlank(dlnaBaseLANURL)) {
throw new RuntimeException("DLNA Base LAN URL is not set correctly");
}
return url.toString();
return dlnaBaseLANURL;
}
protected BrowseResult createBrowseResult(DIDLContent didl, int count, int totalMatches) throws Exception {

@ -22,7 +22,6 @@ package org.libresonic.player.util;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.domain.UrlRedirectType;
import java.io.*;
import java.net.MalformedURLException;
@ -461,67 +460,6 @@ public final class StringUtil {
}
}
/**
* Rewrites the URL by changing the protocol, host and port.
*
* @param urlToRewrite The URL to rewrite.
* @param urlWithProtocolHostAndPort Use protocol, host and port from this URL.
* @return The rewritten URL, or an unchanged URL if either argument is not a proper URL.
*/
public static String rewriteUrl(String urlToRewrite, String urlWithProtocolHostAndPort) {
if (urlToRewrite == null) {
return null;
}
try {
URL urlA = new URL(urlToRewrite);
URL urlB = new URL(urlWithProtocolHostAndPort);
URL result = new URL(urlB.getProtocol(), urlB.getHost(), urlB.getPort(), urlA.getFile());
return result.toExternalForm();
} catch (MalformedURLException x) {
return urlToRewrite;
}
}
/**
* Rewrites an URL to make it accessible from remote clients.
*/
public static String rewriteRemoteUrl(String localUrl, boolean urlRedirectionEnabled, UrlRedirectType urlRedirectType,
String urlRedirectFrom, String urlRedirectCustomUrl, String urlRedirectContextPath,
String localIp, int localPort) {
try {
URLBuilder urlBuilder = new URLBuilder(localUrl);
if (urlRedirectionEnabled) {
if (urlRedirectType == UrlRedirectType.NORMAL) {
String libresonicHost = urlRedirectFrom + ".libresonic.org";
urlBuilder.setHost(libresonicHost);
urlBuilder.setPort(80);
urlBuilder.setProtocol(URLBuilder.HTTP);
if (StringUtils.isNotBlank(urlRedirectContextPath)) {
urlBuilder.setFile(urlBuilder.getFile().replaceFirst("^/" + urlRedirectContextPath, ""));
}
} else {
URL customUrl = new URL(urlRedirectCustomUrl);
urlBuilder.setProtocol(URLBuilder.HTTP);
urlBuilder.setHost(customUrl.getHost());
urlBuilder.setPort(localPort);
}
} else {
urlBuilder.setProtocol(URLBuilder.HTTP);
urlBuilder.setHost(localIp);
urlBuilder.setPort(localPort);
}
return urlBuilder.getURLAsString();
} catch (Exception e) {
return localUrl;
}
}
/**
* Makes a given filename safe by replacing special characters like slashes ("/" and "\")
* with dashes ("-").

@ -1,93 +0,0 @@
/*
* This file is part of Libresonic.
*
* Libresonic is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Libresonic is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Libresonic. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2014 (C) Sindre Mehus
*/
package org.libresonic.player.util;
import java.net.MalformedURLException;
import java.net.URL;
/**
* @author Sindre Mehus
* @version $Id$
*/
public class URLBuilder {
public static String HTTP = "http";
public static String HTTPS = "https";
private String protocol;
private String host;
private int port;
private String file;
public URLBuilder(URL url) {
this.protocol = url.getProtocol();
this.host = url.getHost();
this.port = url.getPort();
this.file = url.getFile();
}
public URLBuilder(String url) throws MalformedURLException {
this(new URL(url));
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public void setHost(String host) {
this.host = host;
}
public void setPort(int port) {
this.port = port;
}
public void setFile(String file) {
this.file = file;
}
public String getProtocol() {
return protocol;
}
public String getHost() {
return host;
}
public int getPort() {
return port;
}
public String getFile() {
return file;
}
public URL getURL() {
try {
return new URL(protocol, host, port, file);
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
public String getURLAsString() {
return getURL().toString();
}
}

@ -101,7 +101,6 @@
<property name="musicFolderDao" ref="musicFolderDao"/>
<property name="userDao" ref="userDao"/>
<property name="avatarDao" ref="avatarDao"/>
<property name="versionService" ref="versionService"/>
<property name="configurationService" ref="configurationService" />
</bean>
@ -121,9 +120,7 @@
<property name="albumDao" ref="albumDao"/>
</bean>
<bean id="networkService" class="org.libresonic.player.service.NetworkService" init-method="init">
<property name="settingsService" ref="settingsService"/>
</bean>
<bean id="networkService" class="org.libresonic.player.service.NetworkService" />
<bean id="playerService" class="org.libresonic.player.service.PlayerService" init-method="init">
<property name="playerDao" ref="playerDao"/>
@ -214,7 +211,7 @@
<property name="artistDao" ref="artistDao"/>
</bean>
<bean id="sonosService" class="org.libresonic.player.service.SonosService" init-method="init">
<bean id="sonosService" class="org.libresonic.player.service.SonosService">
<property name="sonosHelper" ref="sonosHelper"/>
<property name="mediaFileService" ref="mediaFileService"/>
<property name="securityService" ref="securityService"/>

@ -121,10 +121,6 @@ gettingStarted.step1.text = \u0417\u0430\u0449\u0438\u0442\u0435\u0442\u0435 \u0
\u041C\u043E\u0436\u0435\u0442\u0435 \u0441\u044A\u0449\u043E \u0442\u0430\u043A\u0430 \u0434\u0430 \u0441\u044A\u0437\u0434\u0430\u0432\u0430\u0442\u0435 \u043D\u043E\u0432\u0438 \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u0441\u043A\u0438 \u043F\u0440\u043E\u0444\u0438\u043B\u0438 \u0441 \u0440\u0430\u0437\u043B\u0438\u0447\u043D\u0438 \u043F\u0440\u0430\u0432\u0430.
gettingStarted.step2.title = \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043D\u0430 \u043F\u0430\u043F\u043A\u0438\u0442\u0435 \u0441 \u043C\u0443\u0437\u0438\u043A\u0430.
gettingStarted.step2.text = \u0422\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u043F\u043E\u0441\u043E\u0447\u0438\u0442\u0435 \u043A\u044A\u0434\u0435 \u0441\u0435 \u043D\u0430\u043C\u0438\u0440\u0430 \u0432\u0430\u0448\u0430\u0442\u0430 \u043C\u0443\u0437\u0438\u043A\u0430.
gettingStarted.step3.title = \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043D\u0430 \u043C\u0440\u0435\u0436\u0430\u0442\u0430.
gettingStarted.step3.text = \u041D\u044F\u043A\u043E\u0438 \u043F\u043E\u043B\u0435\u0437\u043D\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0430\u043A\u043E \u0438\u0441\u043A\u0430\u0442\u0435 \u0434\u0430 \u0441\u043B\u0443\u0448\u0430\u0442\u0435 \u0432\u0430\u0448\u0430\u0442\u0430 \u043C\u0443\u0437\u0438\u043A\u0430 \u0432 \u0418\u043D\u0442\u0435\u0440\u043D\u0435\u0442, \u043A\u044A\u0434\u0435\u0442\u043E \u0438 \u0434\u0430 \u0441\u0435 \u043D\u0430\u043C\u0438\u0440\u0430\u0442\u0435 \
\u0438\u043B\u0438 \u0434\u0430 \u044F \u0441\u043F\u043E\u0434\u0435\u043B\u044F\u0442\u0435 \u0441 \u043F\u0440\u0438\u044F\u0442\u0435\u043B\u0438 \u0438 \u0441\u0435\u043C\u0435\u0439\u0441\u0442\u0432\u043E\u0442\u043E. \u0412\u0437\u0435\u043C\u0435\u0442\u0435 \u0432\u0430\u0448 \u043B\u0438\u0447\u0435\u043D <b><em>\u0432\u0430\u0448\u0435\u0442\u043E\u0438\u043C\u0435</em>.libresonic.org</b> \
\u0438\u043D\u0442\u0435\u0440\u043D\u0435\u0442 \u0430\u0434\u0440\u0435\u0441.
gettingStarted.hide = \u041D\u0435 \u043F\u043E\u043A\u0430\u0437\u0432\u0430\u0439 \u0442\u043E\u0432\u0430 \u043F\u043E\u0432\u0435\u0447\u0435
gettingStarted.hidealert = \u0417\u0430 \u0434\u0430 \u043F\u043E\u043A\u0430\u0436\u0435\u0442\u0435 \u0442\u0430\u0437\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043E\u0442\u043D\u043E\u0432\u043E, \u043E\u0442\u0432\u043E\u0440\u0435\u0442\u0435 \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 > \u041E\u0431\u0449\u0438.
@ -221,7 +217,6 @@ settingsheader.musicFolder = \u041F\u0430\u043F\u043A\u0438 \u0441 \u043C\u0443\
settingsheader.internetRadio = Internet TV/\u0420\u0430\u0434\u0438\u043E
settingsheader.podcast = \u041F\u043E\u0434\u043A\u0430\u0441\u0442
settingsheader.player = \u041F\u043B\u0435\u044A\u0440\u0438
settingsheader.network = \u041C\u0440\u0435\u0436\u0430
settingsheader.transcoding = \u041A\u043E\u043D\u0432\u0435\u0440\u0442\u0438\u0440\u0430\u043D\u0435
settingsheader.user = \u041F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u0438
settingsheader.search = \u0422\u044A\u0440\u0441\u0430\u0447\u043A\u0430
@ -307,12 +302,6 @@ musicfoldersettings.enabled = \u0410\u043A\u0442\u0438\u0432\u043D\u0430
musicfoldersettings.add = \u0414\u043E\u0431\u0430\u0432\u0438 \u043F\u0430\u043F\u043A\u0430
musicfoldersettings.nopath = \u041C\u043E\u043B\u044F \u043F\u043E\u0441\u043E\u0447\u0435\u0442\u0435 \u043F\u0430\u043F\u043A\u0430.
# networkSettings.jsp
networksettings.text = \u0418\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0439\u0442\u0435 \u043E\u043F\u0446\u0438\u0438\u0442\u0435 \u043F\u043E-\u0434\u043E\u043B\u0443 \u0437\u0430 \u0434\u0430 \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u0435 \u043D\u0430\u0447\u0438\u043D\u0430 \u0437\u0430 \u0434\u043E\u0441\u0442\u044A\u043F \u0434\u043E \u0432\u0430\u0448\u0438\u044F Libresonic \u0441\u044A\u0440\u0432\u044A\u0440 \u043F\u0440\u0435\u0437 Internet.<br> \
\u0410\u043A\u043E \u0438\u043C\u0430\u0442\u0435 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0438, \u043C\u043E\u043B\u044F \u043F\u0440\u043E\u0447\u0435\u0442\u0435\u0442\u0435 <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>\u0420\u044A\u043A\u043E\u0432\u043E\u0434\u0441\u0442\u0432\u043E\u0442\u043E</b></a> \u0437\u0430 \u043D\u043E\u0432\u0438 \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u0438.
networksettings.urlredirectionenabled = \u0418\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u0439\u0442\u0435 \u043B\u0435\u0441\u043D\u043E \u0437\u0430\u043F\u043E\u043C\u043D\u044F\u0449 \u0441\u0435 \u0430\u0434\u0440\u0435\u0441 \u0437\u0430 \u0434\u043E\u0441\u0442\u044A\u043F \u0434\u043E \u0432\u0430\u0448\u0438\u044F\u0442 \u0441\u044A\u0440\u0432\u044A\u0440.
networksettings.status = \u0421\u0442\u0430\u0442\u0443\u0441:
# transcodingSettings.jsp
transcodingsettings.name = \u0418\u043C\u0435
transcodingsettings.sourceformat = \u041A\u043E\u043D\u0432\u0435\u0440\u0442\u0438\u0440\u0430\u043D\u0435 \u043E\u0442

@ -140,9 +140,6 @@ gettingStarted.step1.text = Per tal de fer m\u00E9s segur el seu servidor es rec
Tamb\u00E9 pot crear comptes d'usuari nous amb diferents privilegis associats.
gettingStarted.step2.title = Configuri els directoris multim\u00E8dia.
gettingStarted.step2.text = Indiqui a Libresonic a on guarda els arxius de m\u00FAsica i de v\u00EDdeo.
gettingStarted.step3.title = Configuri els par\u00E0metres de xarxa.
gettingStarted.step3.text = Par\u00E0metres \u00FAtil per tal de gaudir de Libresonic remotament a trav\u00E9s de Internet, \
o compartir-ho amb la fam\u00EDlia i amics. Aconsegueixi la seva adre\u00E7a personal <b><em>el_seu_nom</em>.libresonic.org</b>.
gettingStarted.hide = No mostrar aquest missatge de nou
gettingStarted.hidealert = Per tal de tornar a mostrar aquest missatge, accedeixi a Configuraci\u00F3 > General.
@ -241,7 +238,6 @@ settingsheader.internetRadio = Internet TV/radio
settingsheader.podcast = Podcast
settingsheader.player = Oients
settingsheader.share = Shared media
settingsheader.network = Xarxa
settingsheader.transcoding = Canviar format
settingsheader.user = Usuaris
settingsheader.search = Buscar
@ -342,12 +338,6 @@ musicfoldersettings.fastcache.description = Usi aquesta opci\u00F3 per tal de mi
musicfoldersettings.organizebyfolderstructure = Organitzar segons l'estructura dels directoris
musicfoldersettings.organizebyfolderstructure.description = Usi aquesta opci\u00F3 per tal de navegar per la seva biblioteca multim\u00E8dia usant l'estructura dels directoris enlloc dels ID3 tags artista/\u00E0lbum.
# networkSettings.jsp
networksettings.text = Usi els seg\u00FCents par\u00E0metres per a controlar com s'accedeix al seu servidor Libresonic a trav\u00E9s de Internet.<br> \
Si experimenta algun tipus de contratemps, visiti la guia de <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Primers passos</b></a>.
networksettings.urlredirectionenabled = Accedeixi al seu servidor a trav\u00E9s de Internet usant una direcci\u00F3 f\u00E0cil de recordar.
networksettings.status = Estat:
# transcodingSettings.jsp
transcodingsettings.name = Nom
transcodingsettings.sourceformat = Convertir de

@ -176,10 +176,6 @@ gettingStarted.step1.text = Zabezpe\u010Dte si sv\u016Fj server zm\u011Bnou v\u0
M\u016F\u017Eete tak\u00E9 vytvo\u0159it nov\u00E9 \u00FA\u010Dty u\u017Eivatel\u016F s rozd\u00EDln\u00FDmi opr\u00E1vn\u011Bn\u00EDmi.
gettingStarted.step2.title = Nastavte slo\u017Eky m\u00E9di\u00ED.
gettingStarted.step2.text = Ur\u010Dete slo\u017Eky, kde m\u00E1te svou hudbu a videa.
gettingStarted.step3.title = Nastavte s\u00ED\u0165.
gettingStarted.step3.text = N\u011Bkter\u00E1 u\u017Eite\u010Dn\u00E1 nastaven\u00ED, pokud si chcete u\u017E\u00EDvat svou hudbu z internetu, \
nebo ji sd\u00EDlet s rodinou a p\u0159\u00E1teli. Z\u00EDskejte svou soukromou adresu \
<b><em>vasejmeno</em>.libresonic.org</b>.
gettingStarted.hide = Toto znovu nezobrazovat
gettingStarted.hidealert = Pro op\u011Btovn\u00E9 zobrazen\u00ED t\u00E9to obrazovky p\u0159ejd\u011Bte do Nastaven\u00ED > Obecn\u00E9.
@ -292,7 +288,6 @@ settingsheader.podcast = Podcasty
settingsheader.player = P\u0159ehr\u00E1va\u010De
settingsheader.dlna = DLNA
settingsheader.share = Sd\u00EDlen\u00E1 m\u00E9dia
settingsheader.network = S\u00ED\u0165
settingsheader.transcoding = P\u0159ek\u00F3dov\u00E1n\u00ED
settingsheader.user = U\u017Eivatel\u00E9
settingsheader.search = Vyhled\u00E1v\u00E1n\u00ED a mezipam\u011B\u0165
@ -397,12 +392,6 @@ musicfoldersettings.expunge.description = Libresonic ukl\u00E1d\u00E1 informace
musicfoldersettings.organizebyfolderstructure = Organizovat podle structury slo\u017Eek
musicfoldersettings.organizebyfolderstructure.description = Tuto volbu pou\u017Eijte pro proch\u00E1zen\u00ED knihovny m\u00E9di\u00ED pomoc\u00ED adres\u00E1\u0159ov\u00E9 struktury ne\u017E pomoc\u00ED informac\u00ED o interpretech nebo albech v ID3 taz\u00EDch.
# networkSettings.jsp
networksettings.text = Pomoc\u00ED n\u00ED\u017Ee uveden\u00FDch nastaven\u00ED ur\u010Dete, jak p\u0159istupovat k va\u0161emu serveru Libresonic z internetu.<br> \
Pokud naraz\u00EDte na pot\u00ED\u017Ee, p\u0159e\u010Dt\u011Bte si p\u0159\u00EDru\u010Dku <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Za\u010D\u00EDn\u00E1me</b></a>.
networksettings.urlredirectionenabled = P\u0159istupovat k serveru z internetu pomoc\u00ED snadno zapamatovateln\u00E9 adresy.
networksettings.status = Stav:
# transcodingSettings.jsp
transcodingsettings.name = N\u00E1zev
transcodingsettings.sourceformat = P\u0159ev\u00E9st z

@ -194,7 +194,6 @@ settingsheader.internetRadio = Internet TV / radio
settingsheader.podcast = Podcast
settingsheader.player = Afspillere
settingsheader.share = Delt medie
settingsheader.network = Netv\u00E6rk
settingsheader.transcoding = Kodning
settingsheader.user = Brugere
settingsheader.search = S\u00F8g
@ -364,11 +363,6 @@ playersettings.ok = Gem
playersettings.forget = Slet afspiller
playersettings.clone = Klon afspiller
# NetworkSettings.jsp
networksettings.text = Brug indstillingerne nedenfor til at kontrollere, hvordan adgangen til din Libresonic server skal v\u00E6re over internettet.
networksettings.urlredirectionenabled = F\u00E5 adgang til din server over internettet ved hj\u00E6lp af en adresse, der er let at huske.
networksettings.status = Status:
# shareSettings.jsp
sharesettings.name = Navn
sharesettings.owner = Delt af
@ -452,8 +446,6 @@ gettingStarted.step1.text = Sikre din server ved at \u00E6ndre standard password
gettingStarted.step2.title = Indstil medie mapper.
gettingStarted.step2.text = Fort\u00E6l Libresonic hvor du opbevarer din medie.
gettingStarted.step3.title = Konfigurer netv\u00E6rksindstillinger.
gettingStarted.step3.text = Nogle nyttige indstillinger, hvis du vil nyde din medie over internettet, \
eller dele det med familie og venner. F\u00E5 din personlige <b><em>ditnavn</em>.libresonic.org</b> adresse.
gettingStarted.hide = Vis ikke denne igen
gettingStarted.hidealert = For at vise dette sk\u00E6rmbillede igen, skal du g\u00E5 til Indstillinger &gt; Generel.

@ -175,9 +175,6 @@ gettingStarted.step1.text = Sichere deinen Server indem du das Standard Passwort
gettingStarted.step2.title = Musikordner einrichten.
gettingStarted.step2.text = Zeige Libresonic wo sich deine Musik befindet.
gettingStarted.step3.title = Konfiguriere Netzwerk Einstellungen.
gettingStarted.step3.text = Einige n\u00FCtzliche Einstellungen um ihre Musik \u00FCber das Internet geniessen zu k\u00F6nnen, \
oder um sie mit Freunden oder Familie zu teilen. Holen sie sich ihre pers\u00F6nliche <b><em>DeinName</em>.libresonic.org</b> \
Addresse.
gettingStarted.hide = Nicht wieder anzeigen
gettingStarted.hidealert = Um diesen Bildschirm wieder anzuzeigen, gehe zu Einstellungen > Allgemein.
@ -287,7 +284,6 @@ settingsheader.musicFolder = Musikordner
settingsheader.internetRadio = Internet TV/radio
settingsheader.player = Player
settingsheader.share = Geteilte Medien
settingsheader.network = Netzwerk
settingsheader.transcoding = Transcoding
settingsheader.user = Benutzer
settingsheader.search = Suchen
@ -396,12 +392,6 @@ musicfoldersettings.expunge.description = Libresonic speichert alle aufgefundene
musicfoldersettings.organizebyfolderstructure = Organisieren nach Ordnerstruktur
musicfoldersettings.organizebyfolderstructure.description = Verwende diese Funktion um die Medienbibliothek nach Verzeichnisstruktur zu durchsuchen anstatt nach Artist / oder Album Info in den ID3-Tags.
# networkSettings.jsp
networksettings.text = Verwenden sie die folgenden Einstellungen um den Zugang zu ihrem Libresonic-Server \u00FCber das Internet einzurichten.
networksettings.status = Status:
networksettings.normalurl = Verwende
networksettings.customurl = Verwende Benutzerdefinierte URL (erweitert)
# transcodingSettings.jsp
transcodingsettings.name = Name
transcodingsettings.sourceformat = Konvertieren von

@ -121,9 +121,6 @@ gettingStarted.step1.text = \u0391\u03C3\u03C6\u03B1\u03BB\u03AF\u03C3\u03C4\u03
gettingStarted.step2.title = \u03A3\u03CD\u03C3\u03C4\u03B1\u03C3\u03B7 \u03BC\u03BF\u03C5\u03C3\u03B9\u03BA\u03CE\u03BD \u03C6\u03B1\u03BA\u03AD\u03BB\u03C9\u03BD.
gettingStarted.step2.text = \u03A5\u03C0\u03BF\u03B4\u03B5\u03AF\u03BE\u03B5\u03C4\u03B5 \u03C3\u03C4\u03BF Libresonic \u03C0\u03BF\u03C5 \u03BA\u03C1\u03B1\u03C4\u03AC\u03C4\u03B5 \u03C4\u03BF\u03C5\u03C2 \u03BC\u03BF\u03C5\u03C3\u03B9\u03BA\u03BF\u03CD\u03C2 \u03C3\u03B1\u03C2 \u03C6\u03B1\u03BA\u03AD\u03BB\u03BF\u03C5\u03C2.
gettingStarted.step3.title = \u039C\u03BF\u03C1\u03C6\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7 \u03C0\u03B1\u03C1\u03B1\u03BC\u03AD\u03C4\u03C1\u03C9\u03BD \u03B4\u03B9\u03BA\u03C4\u03CD\u03BF\u03C5.
gettingStarted.step3.text = \u039C\u03B5\u03C1\u03B9\u03BA\u03BF\u03AF \u03C7\u03C1\u03AE\u03C3\u03B9\u03BC\u03BF\u03B9 \u03C0\u03B1\u03C1\u03AC\u03BC\u03B5\u03C4\u03C1\u03BF\u03B9 \u03B5\u03AC\u03BD \u03B8\u03AD\u03BB\u03B5\u03C4\u03B5 \u03BD\u03B1 \u03B1\u03C0\u03BF\u03BB\u03B1\u03CD\u03C3\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03BC\u03BF\u03C5\u03C3\u03B9\u03BA\u03AE \u03C3\u03B1\u03C2 \u03B1\u03C0\u03BF\u03BC\u03B1\u03BA\u03C1\u03C5\u03C3\u03BC\u03AD\u03BD\u03B1 \u03BC\u03AD\u03C3\u03C9 \u03AF\u03BD\u03C4\u03B5\u03C1\u03BD\u03B5\u03C4, \
\u03AE \u03BC\u03BF\u03B9\u03C1\u03AC\u03B6\u03BF\u03BD\u03C4\u03B1\u03C2 \u03C4\u03B7 \u03BC\u03B5 \u03C4\u03B7\u03BD \u03BF\u03B9\u03BA\u03BF\u03B3\u03AD\u03BD\u03B5\u03B9\u03B1 \u03BA\u03B1\u03B9 \u03C4\u03BF\u03C5\u03C2 \u03C6\u03AF\u03BB\u03BF\u03C5\u03C2 \u03C3\u03B1\u03C2. \u03A0\u03C1\u03BF\u03BC\u03B7\u03B8\u03B5\u03C5\u03C4\u03B5\u03AF\u03C4\u03B5 \u03C4\u03B7 \u03C0\u03C1\u03BF\u03C3\u03C9\u03C0\u03B9\u03BA\u03AE \u03C3\u03B1\u03C2 <b><em>\u03C4\u03BF_\u03CC\u03BD\u03BF\u03BC\u03B1_\u03C3\u03B1\u03C2</em>.libresonic.org</b> \
\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7.
gettingStarted.hide = \u039D\u03B1 \u03BC\u03B7\u03BD \u03C6\u03B1\u03BD\u03B5\u03AF \u03BE\u03B1\u03BD\u03AC \u03B1\u03C5\u03C4\u03CC.
gettingStarted.hidealert = \u0393\u03B9\u03B1 \u03BD\u03B1 \u03B4\u03B5\u03AF\u03C4\u03B5 \u03BE\u03B1\u03BD\u03AC \u03B1\u03C5\u03C4\u03AE \u03C4\u03B7\u03BD \u03BF\u03B8\u03CC\u03BD\u03B7, \u03C0\u03B7\u03B3\u03B1\u03AF\u03BD\u03B5\u03C4\u03B5 \u03C3\u03C4\u03B9\u03C2 \u03C1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 > \u0393\u03B5\u03BD\u03B9\u03BA\u03AC.
@ -220,7 +217,6 @@ settingsheader.musicFolder = \u039C\u03BF\u03C5\u03C3\u03B9\u03BA\u03AC \u03B1\u
settingsheader.internetRadio = \u03AF\u03BD\u03C4\u03B5\u03C1\u03BD\u03B5\u03C4 \u03C4\u03B7\u03BB\u03B5\u03CC\u03C1\u03B1\u03C3\u03B7/\u03C1\u03B1\u03B4\u03B9\u03CC\u03C6\u03C9\u03BD\u03BF
settingsheader.podcast = Podcast
settingsheader.player = \u039B\u03BF\u03B3\u03B9\u03C3\u03BC\u03B9\u03BA\u03AC \u03B1\u03BD\u03B1\u03C0\u03B1\u03C1\u03B1\u03B3\u03C9\u03B3\u03AE\u03C2
settingsheader.network = \u0394\u03AF\u03BA\u03C4\u03C5\u03BF
settingsheader.transcoding = \u0395\u03C0\u03B1\u03BD\u03B1\u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7
settingsheader.user = \u03A7\u03C1\u03AE\u03C3\u03C4\u03B5\u03C2
settingsheader.search = \u0391\u03BD\u03B1\u03B6\u03AE\u03C4\u03B7\u03C3\u03B7
@ -306,12 +302,6 @@ musicfoldersettings.enabled = \u0395\u03BD\u03B5\u03C1\u03B3\u03CC
musicfoldersettings.add = \u03A0\u03C1\u03CC\u03C3\u03B8\u03B5\u03C3\u03B7 \u03BC\u03BF\u03C5\u03C3\u03B9\u03BA\u03BF\u03CD \u03C6\u03B1\u03BA\u03AD\u03BB\u03BF\u03C5
musicfoldersettings.nopath = \u03A0\u03B1\u03C1\u03B1\u03BA\u03B1\u03BB\u03CE \u03B5\u03C0\u03B9\u03B4\u03B5\u03AF\u03BE\u03B5\u03C4\u03B5 \u03AD\u03BD\u03B1 \u03C6\u03AC\u03BA\u03B5\u03BB\u03BF.
# networkSettings.jsp
networksettings.text = \u03A7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03C4\u03B5 \u03C4\u03B9\u03C2 \u03C0\u03B1\u03C1\u03B1\u03BA\u03AC\u03C4\u03C9 \u03C1\u03C5\u03B8\u03BC\u03AF\u03C3\u03B5\u03B9\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03C0\u03C1\u03BF\u03C3\u03B4\u03B9\u03BF\u03C1\u03AF\u03C3\u03B5\u03C4\u03B5 \u03C0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03BF\u03BD Libresonic \u03C5\u03C0\u03BF\u03BB\u03BF\u03B3\u03B9\u03C3\u03C4\u03AE \u03C3\u03B1\u03C2 \u03BC\u03AD\u03C3\u03C9 \u03AF\u03BD\u03C4\u03B5\u03C1\u03BD\u03B5\u03C4.<br> \
\u0391\u03BD \u03AD\u03C7\u03B5\u03C4\u03B5 \u03C0\u03C1\u03CC\u03B2\u03BB\u03B7\u03BC\u03B1, \u03C3\u03C5\u03BC\u03B2\u03BF\u03C5\u03BB\u03B5\u03C5\u03C4\u03AE\u03C4\u03B5 \u03C4\u03B9\u03C2 <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>\u03A0\u03CE\u03C2 \u03BD\u03B1 \u03B1\u03C1\u03C7\u03AF\u03C3\u03B5\u03C4\u03B5</b></a> \u03BF\u03B4\u03B7\u03B3\u03AF\u03B5\u03C2.
networksettings.urlredirectionenabled = \u03A0\u03C1\u03CC\u03C3\u03B2\u03B1\u03C3\u03B7 \u03C3\u03C4\u03BF\u03BD \u03C5\u03C0\u03BF\u03BB\u03BF\u03B3\u03B9\u03C3\u03C4\u03AE \u03C3\u03B1\u03C2 \u03BC\u03AD\u03C3\u03C9 \u03AF\u03BD\u03C4\u03B5\u03C1\u03BD\u03B5\u03C4 \u03C7\u03C1\u03B7\u03C3\u03B9\u03BC\u03BF\u03C0\u03BF\u03B9\u03CC\u03BD\u03C4\u03B1\u03C2 \u03BC\u03B9\u03B1 \u03B5\u03CD\u03BA\u03BF\u03BB\u03B7 \u03C0\u03C1\u03BF\u03C2 \u03B1\u03C0\u03BF\u03BC\u03BD\u03B7\u03BC\u03CC\u03BD\u03B5\u03C5\u03C3\u03B7 \u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7.
networksettings.status = \u039A\u03B1\u03C4\u03AC\u03C3\u03C4\u03B1\u03C3\u03B7:
# transcodingSettings.jsp
transcodingsettings.name = \u038C\u03BD\u03BF\u03BC\u03B1
transcodingsettings.sourceformat = \u039C\u03B5\u03C4\u03B1\u03C4\u03C1\u03BF\u03C0\u03AE \u03B1\u03C0\u03CC

@ -182,10 +182,10 @@ gettingStarted.step1.text = Secure your server by changing the default password
You can also create new user accounts with different privileges.
gettingStarted.step2.title = Set up media folders.
gettingStarted.step2.text = Tell Libresonic where you keep your music and videos.
gettingStarted.step3.title = Configure network settings.
gettingStarted.step3.text = Some useful settings if you want to enjoy your music remotely over the Internet, \
or share it with family and friends. Get your personal <b><em>yourname</em>.libresonic.org</b> \
address.
gettingStarted.step3.title = External Documentation
gettingStarted.step3.text = In the case that you want to enjoy Libresonic remotely, you may want to checkout the \
<a href="https://github.com/Libresonic/libresonic/blob/develop/documentation/PROXY.md>proxy documentation</a> \
which provides guidance for setting up SSL, URL rewriting, and custom addresses. Additionally,
gettingStarted.hide = Don't show this again
gettingStarted.hidealert = To show this screen again, go to Settings > General.
@ -335,7 +335,6 @@ settingsheader.player = Players
settingsheader.dlna = DLNA/UPnP
settingsheader.sonos = Sonos
settingsheader.share = Shared media
settingsheader.network = Network
settingsheader.transcoding = Transcoding
settingsheader.user = Users
settingsheader.search = Search/caching
@ -457,16 +456,6 @@ musicfoldersettings.expunge.description = Libresonic stores information about al
musicfoldersettings.organizebyfolderstructure = Organize by folder structure
musicfoldersettings.organizebyfolderstructure.description = Use this option to browse through your media library using the directory structure rather than using artist/album info in ID3 tags.
# networkSettings.jsp
networksettings.text = Use the settings below to control how to access your Libresonic server over the Internet.<br> \
If you experience difficulties, please consult the <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Getting started</b></a> guide.
networksettings.urlredirectionenabled = Access your server over the Internet using an easy-to-remember address.
networksettings.status = Status:
networksettings.normalurl = Use
networksettings.customurl = Use custom URL (advanced)
networksettings.urlRedirectDisabled = Feature not currently available
# transcodingSettings.jsp
transcodingsettings.name = Name
transcodingsettings.sourceformat = Convert from
@ -548,9 +537,12 @@ playersettings.clone = Clone player
dlnasettings.enabled = Enable DLNA server
dlnasettings.description = Use this option to turn on the DLNA/UPnP Media Server in Libresonic, \
and stream your media to compatible DLNA players.
and stream your media to compatible DLNA players. Requires restart.
dlnasettings.servername = Media Server name
dlnasettings.servername.description = The name of the Media Server as it will appear in DLNA players.
dlnasettings.baselanurl = LAN Server address
dlnasettings.lanurl.description = The base LAN address to be used for DLNA resources. \
An example is http://192.168.0.2/libresonic/
sonossettings.enabled = Enable Sonos music service
sonossettings.description = Use this option to turn on the Sonos music service in Libresonic, \

@ -176,9 +176,6 @@ gettingStarted.step1.text = Muutke administraatori konto tavaparooli, et server
gettingStarted.step2.title = Seadista meediakaustad.
gettingStarted.step2.text = Anna Libresonicule teada oma muusika ja videote hoiupaigast.
gettingStarted.step3.title = Seadista võrguseadeid.
gettingStarted.step3.text = Kui soovite nautide muusikat Interneti abil või tahate jagada seda koos oma pere ja sõpradega, siis vajalikud seadistused leiate siit, \
Hangi endale oma <b><em>sinunimi</em>.libresonic.org</b> \
aadress.
gettingStarted.hide = Ära enam kuva seda
gettingStarted.hidealert = Kui soovite seda teadet hiljem uuesti kuvada, siis leiate selle valiku alt Seaded > Põhiline.
@ -289,7 +286,6 @@ settingsheader.podcast = Taskupleier
settingsheader.player = Meediaesitajad
settingsheader.dlna = DLNA
settingsheader.share = Jagatud meedia
settingsheader.network = Võrk
settingsheader.transcoding = Transkodeerimine
settingsheader.user = Kasutajad
settingsheader.search = Otsing/vahemälu
@ -395,12 +391,6 @@ musicfoldersettings.expunge.description = Libresonic kogub kõikide siia laetud
musicfoldersettings.organizebyfolderstructure = Organiseeri kausta ülesehituse järgi
musicfoldersettings.organizebyfolderstructure.description = Kasuta seda valikut, et sirvida oma meediakogu sihtkoha ülesehituse järgi. Selle asemel, et kasutada ID3 teekide esitaja/albumi andmeid.
# networkSettings.jsp
networksettings.text = Kasuta seda seadet, et hallata ligipääsu Libresonicu serverisse Interneti kaudu.<br> \
Kui ilmneb raskusi siis tutvuge <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Sissejuhatuse</b></a> peatükiga.
networksettings.urlredirectionenabled = Hangi hästi meeldejääv aadress, et ligipääs oma serverile Interneti kaudu oleks lihtsustatud.
networksettings.status = Olek:
# transcodingSettings.jsp
transcodingsettings.name = Nimi
transcodingsettings.sourceformat = Konverdi formaadist

@ -112,9 +112,6 @@ gettingStarted.step1.text = Suojaa serveri muuttamalla p\u00E4\u00E4k\u00E4ytt\u
gettingStarted.step2.title = M\u00E4\u00E4rit\u00E4 musiikkikansioiden sijainti.
gettingStarted.step2.text = M\u00E4\u00E4rit\u00E4 Libresonic-ohjelmalle musiikkikansioiden sijainti.
gettingStarted.step3.title = M\u00E4\u00E4rit\u00E4 verkkoasetukset.
gettingStarted.step3.text = Hy\u00F6dyllisi\u00E4 asetuksia jos haluat kuunnella musiikkia internetin yli. \
M\u00E4\u00E4rit\u00E4 helposti muistettava <b><em>yourname</em>.libresonic.org</b> \
osoite.
gettingStarted.hide = \u00C4l\u00E4 n\u00E4yt\u00E4 t\u00E4t\u00E4 sivua en\u00E4\u00E4.
gettingStarted.hidealert = T\u00E4m\u00E4n sivun saat uudelleen n\u00E4kyviin valitsemalla Asetukset > Yleiset.
@ -207,7 +204,6 @@ settingsheader.musicFolder = Kansiot
settingsheader.internetRadio = Internet Tv/Radio
settingsheader.podcast = Podcastit
settingsheader.player = Soittimet
settingsheader.network = Verkko
settingsheader.transcoding = Muuntaminen
settingsheader.user = K\u00E4ytt\u00E4j\u00E4t
settingsheader.search = Hakutietokanta
@ -293,11 +289,6 @@ musicfoldersettings.enabled = K\u00E4yt\u00F6ss\u00E4
musicfoldersettings.add = Lis\u00E4\u00E4 musiikkikansio
musicfoldersettings.nopath = M\u00E4\u00E4rit\u00E4 kansion sijainti.
# networkSettings.jsp
networksettings.text = K\u00E4yt\u00E4 alla olevia asetuksia m\u00E4\u00E4ritt\u00E4\u00E4ksesi p\u00E4\u00E4syn Libresonic serverille internetist\u00E4 k\u00E4sin.
networksettings.urlredirectionenabled = P\u00E4\u00E4sy serverille internetist\u00E4 k\u00E4sin k\u00E4ytt\u00E4m\u00E4ll\u00E4 helposti muistettavaa verkko-osoitetta.
networksettings.status = Tilanne:
# transcodingSettings.jsp
transcodingsettings.name = S\u00E4\u00E4nt\u00F6
transcodingsettings.sourceformat = K\u00E4\u00E4nn\u00E4

@ -171,8 +171,6 @@ gettingStarted.step1.text = S\u00E9curisez votre installation en modifiant le mo
gettingStarted.step2.title = G\u00E9rer les dossiers de musique.
gettingStarted.step2.text = Libresonic doit savoir dans quel dossier se trouve votre musique.
gettingStarted.step3.title = Configurer les r\u00E9glages r\u00E9seau.
gettingStarted.step3.text = Quelques r\u00E9glages pour acc\u00E9der \u00E0 votre musique depuis Internet, \
ou la partager avec votre famille ou vos amis. Obtenez votre adresse personnelle <b><em>votre nom</em>.libresonic.org</b>.
gettingStarted.hide = Ne plus montrer cet \u00E9cran
gettingStarted.hidealert = Pour afficher cet \u00E9cran \u00E0 nouveau, allez dans Param\u00E8tres > G\u00E9n\u00E9ral.
gettingStarted.root = Attention ! Le processus de libresonic a \u00E9t\u00E9 lanc\u00E9 par l''utilisateur root. Nous vous conseillons de \
@ -274,7 +272,6 @@ settingsheader.internetRadio = TV/Radio Internet
settingsheader.podcast = Podcast
settingsheader.player = Lecteurs
settingsheader.share = Media partag\u00E9
settingsheader.network = R\u00E9seau
settingsheader.transcoding = Encodage
settingsheader.user = Utilisateurs
settingsheader.search = Recherche
@ -360,12 +357,6 @@ musicfoldersettings.enabled = Utiliser
musicfoldersettings.add = Ajouter un dossier
musicfoldersettings.nopath = Veuillez indiquer un dossier.
# networkSettings.jsp
networksettings.text = Compl\u00E9tez les options ci-dessous afin de d\u00E9finir comment acc\u00E9der \u00E0 votre serveur Libresonic depuis Internet.<br> \
Si vous rencontrez des probl\u00E8mes, consultez le guide de <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>D\u00E9marrage rapide</b></a>.
networksettings.urlredirectionenabled = Acc\u00E9dez \u00E0 votre serveur depuis Internet en utilisant une adresse facile \u00E0 retenir.
networksettings.status = Statut :
# transcodingSettings.jsp
transcodingsettings.name = Nom
transcodingsettings.sourceformat = Source

@ -118,8 +118,6 @@ gettingStarted.step1.text = Cambiando la password predefinita dell'utente di amm
gettingStarted.step2.title = Imposta le cartelle della musica.
gettingStarted.step2.text = Di' a Libresonic dove tieni la tua musica.
gettingStarted.step3.title = Configura le imposatzioni di rete.
gettingStarted.step3.text = Qualche utile impostazione ti permetter\u00E0 di apprezzare la tua musica in via remota tramite internet, \
o di condividerla con la famiglia e gli amici. Ottieni il tuo indirizzo personale <b><em>tuonome</em>.libresonic.org</b>.
gettingStarted.hide = Non mostrare questa schermata di nuovo.
gettingStarted.hidealert = Per visualizzare nuovamente la schermata, vai in Impostazioni > Generale.
@ -218,7 +216,6 @@ settingsheader.musicFolder = Cartelle per la musica
settingsheader.internetRadio = Internet TV/radio
settingsheader.podcast = Podcast
settingsheader.player = Riproduttori
settingsheader.network = Rete
settingsheader.transcoding = Transcoding
settingsheader.user = Utenti
settingsheader.search = Cerca
@ -304,12 +301,6 @@ musicfoldersettings.enabled = Abilitato
musicfoldersettings.add = Aggiungi cartella per la musica
musicfoldersettings.nopath = Specifica una cartella.
# networkSettings.jsp
networksettings.text = Utilizza le impostazioni qui sotto per regolare l'accesso a Libresonic da internet.<br> \
Se hai problemi, per favore consulta la guida di <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Introduzione a Libresonic</b></a>.
networksettings.urlredirectionenabled = Accedi al tuo server attraverso internet utilizzando un indirizzo facile da ricordare.
networksettings.status = Status:
# transcodingSettings.jsp
transcodingsettings.name = Nome
transcodingsettings.sourceformat = Converti da

@ -183,9 +183,6 @@ gettingStarted.step1.text = \u7BA1\u7406\u8005\u30A2\u30AB\u30A6\u30F3\u30C8\u30
gettingStarted.step2.title = \u30E1\u30C7\u30A3\u30A2\u30D5\u30A9\u30EB\u30C0\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u3057\u307E\u3059\u3002
gettingStarted.step2.text = \u697D\u66F2\u3068\u30D3\u30C7\u30AA\u306E\u4FDD\u5B58\u5834\u6240\u3092\u767B\u9332\u3057\u307E\u3059\u3002
gettingStarted.step3.title = \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u8A2D\u5B9A\u3092\u884C\u3044\u307E\u3059\u3002
gettingStarted.step3.text = \u30A4\u30F3\u30BF\u30FC\u30CD\u30C3\u30C8\u7D4C\u7531\u3067\u97F3\u697D\u3092\u697D\u3057\u3093\u3060\u308A\u3001\u5BB6\u65CF\u3084\u53CB\u4EBA\u3068\u97F3\u697D\u3092\u5171\u6709\u3057\u305F\u3044\u5834\u5408\u306B\u4FBF\u5229\u306A\u3001\
\u3042\u306A\u305F\u5C02\u7528\u306E\u30A2\u30C9\u30EC\u30B9 <b><em>yourname</em>.libresonic.org</b> \
\u3092\u53D6\u5F97\u3067\u304D\u307E\u3059\u3002
gettingStarted.hide = \u6B21\u304B\u3089\u8868\u793A\u3057\u306A\u3044
gettingStarted.hidealert = \u3053\u306E\u753B\u9762\u3092\u518D\u5EA6\u8868\u793A\u3059\u308B: \u53C2\u7167 \u8A2D\u5B9A > \u4E00\u822C
@ -305,7 +302,6 @@ settingsheader.player = \u30D7\u30EC\u30FC\u30E4
settingsheader.dlna = DLNA
settingsheader.sonos = Sonos
settingsheader.share = \u5171\u6709\u306E\u8A2D\u5B9A
settingsheader.network = \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF
settingsheader.transcoding = \u30C8\u30E9\u30F3\u30B9\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0
settingsheader.user = \u30E6\u30FC\u30B6
settingsheader.search = \u691C\u7D22
@ -417,14 +413,6 @@ musicfoldersettings.expunge.description = Libresonic \u306F\u4ECA\u307E\u3067\u3
musicfoldersettings.organizebyfolderstructure = \u30D5\u30A9\u30EB\u30C0\u69CB\u9020\u3067\u6574\u7406
musicfoldersettings.organizebyfolderstructure.description = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u69CB\u9020\u3092\u4F7F\u7528\u305B\u305A\u3001ID3\u30BF\u30B0\u306B\u8A18\u8F09\u3055\u308C\u305F\u30A2\u30FC\u30C6\u30A3\u30B9\u30C8\u30FB\u30A2\u30EB\u30D0\u30E0\u60C5\u5831\u3092\u4F7F\u7528\u3057\u3066\u30E1\u30C7\u30A3\u30A2\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u95B2\u89A7\u3059\u308B\u306B\u306F\u3001\u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
# networkSettings.jsp
networksettings.text = \u30A4\u30F3\u30BF\u30FC\u30CD\u30C3\u30C8\u7D4C\u7531\u3067 Libresonic \u30B5\u30FC\u30D0\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u65B9\u6CD5\u3092\u5236\u5FA1\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u4EE5\u4E0B\u306E\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002<br> \
\u554F\u984C\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Getting started</b></a> \u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
networksettings.urlredirectionenabled = \u7C21\u6F54\u306A\u30A2\u30C9\u30EC\u30B9\u3092\u4F7F\u7528\u3057\u3066\u3001\u30A4\u30F3\u30BF\u30FC\u30CD\u30C3\u30C8\u7D4C\u7531\u3067\u30B5\u30FC\u30D0\u306B\u30A2\u30AF\u30BB\u30B9\u3057\u307E\u3059\u3002
networksettings.status = \u72B6\u614B:\u0081@
networksettings.normalurl = \u4F7F\u7528\u3059\u308B
networksettings.customurl = \u30AB\u30B9\u30BF\u30E0URL\u3092\u4F7F\u7528\u3059\u308B(\u4E0A\u7D1A\u8005\u5411\u304D)
# transcodingSettings.jsp
transcodingsettings.name = \u540D\u524D
transcodingsettings.sourceformat = \u5909\u63DB\u5143

@ -178,8 +178,6 @@ gettingStarted.step1.text = \uAD00\uB9AC\uC790 \uC554\uD638\uB97C \uBCC0\uACBD\u
gettingStarted.step2.title = \uBBF8\uB514\uC5B4 \uD3F4\uB354 \uC124\uC815\uD558\uAE30.
gettingStarted.step2.text = \uC11C\uBE0C\uC18C\uB2C9\uC5D0\uAC8C \uB2F9\uC2E0\uC758 \uBBF8\uB514\uC5B4\uAC00 \uC5B4\uB514\uC5D0 \uC800\uC7A5\uB418\uC5B4 \uC788\uB294\uC9C0 \uC54C\uB824\uC8FC\uC2ED\uC2DC\uC624.
gettingStarted.step3.title = \uB124\uD2B8\uC6CC\uD06C \uC124\uC815\uD558\uAE30.
gettingStarted.step3.text = \uB2F9\uC2E0\uC774 \uC778\uD130\uB137\uC744 \uD1B5\uD574 \uC74C\uC545\uC744 \uC990\uAE30\uAC70\uB098 \uCE5C\uAD6C\uC640 \uAC00\uC871\uACFC \uACF5\uC720\uD558\uB824\uB294 \uACBD\uC6B0\uC5D0\uB294 \uC774 \uC124\uC815\uC774 \uC720\uC6A9\uD569\uB2C8\uB2E4. \
<b><em>\uB2F9\uC2E0\uC758 \uC774\uB984</em>.libresonic.org</b> \uC758 \uC8FC\uC18C\uB97C \uC774\uC6A9\uD558\uC138\uC694.
gettingStarted.hide = \uB2E4\uC2DC \uBCF4\uC9C0 \uC54A\uAE30
gettingStarted.hidealert = \uC774 \uD654\uBA74\uC744 \uB2E4\uC2DC \uBCF4\uACE0 \uC2F6\uB2E4\uBA74 \uC124\uC815 > \uC77C\uBC18 \uC744 \uCC38\uC870\uD558\uC138\uC694.
@ -288,7 +286,6 @@ settingsheader.podcast = \uD31F\uCE90\uC2A4\uD2B8
settingsheader.player = \uC7AC\uC0DD\uAE30
settingsheader.dlna = DLNA
settingsheader.share = \uACF5\uC720\uB41C \uBBF8\uB514\uC5B4
settingsheader.network = \uB124\uD2B8\uC6CC\uD06C
settingsheader.transcoding = \uBCC0\uD658
settingsheader.user = \uC0AC\uC6A9\uC790
settingsheader.search = \uAC80\uC0C9
@ -392,12 +389,6 @@ musicfoldersettings.expunge.description = \uC11C\uBE0C\uC18C\uB2C9\uC740 \uC9C0\
musicfoldersettings.organizebyfolderstructure = \uD3F4\uB354 \uAD6C\uC870\uB85C \uAD6C\uC131
musicfoldersettings.organizebyfolderstructure.description = Use this option to browse through your media library using the directory structure rather than using artist/album info in ID3 tags.
# networkSettings.jsp
networksettings.text = \uC778\uD130\uB137\uC744 \uD1B5\uD574 \uC11C\uBE0C\uC18C\uB2C9 \uC11C\uBC84\uC5D0 \uC811\uADFC\uD558\uB294 \uBC29\uBC95\uC744 \uC124\uC815\uD569\uB2C8\uB2E4..<br> \
\uB9CC\uC57D \uC124\uC815\uC5D0 \uC774\uC0C1\uC774 \uC788\uB2E4\uBA74 \uAC00\uC774\uB4DC\uB97C \uCC38\uACE0\uD558\uC2ED\uC2DC\uC624. <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>\uC2DC\uC791\uD558\uAE30</b></a>
networksettings.urlredirectionenabled = \uAE30\uC5B5\uD558\uAE30 \uC26C\uC6B4 \uC8FC\uC18C\uB85C \uC778\uD130\uB137\uC744 \uD1B5\uD574 \uC11C\uBE0C\uC18C\uB2C9 \uC11C\uBC84\uC5D0 \uC5F0\uACB0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
networksettings.status = \uC0C1\uD0DC:
# transcodingSettings.jsp
transcodingsettings.name = \uBCC0\uD658 \uC774\uB984
transcodingsettings.sourceformat = \uC6D0\uBCF8 \uD30C\uC77C \uD0C0\uC785

@ -183,9 +183,6 @@ gettingStarted.step1.text = Beveilig de server door het standaardwachtwoord van
gettingStarted.step2.title = Stel de mediamappen in.
gettingStarted.step2.text = Vertel Libresonic waar jouw muziek en videos staan.
gettingStarted.step3.title = Configureer netwerk Instellingen.
gettingStarted.step3.text = Enkele nuttige instellingen als je jouw muziek via internet wilt beluisteren, \
of wilt delen met familie en vrienden. Registreer meteen je persoonlijke <b><em>jouwname</em>.libresonic.org</b> \
adres.
gettingStarted.hide = Dit niet meer laten zien.
gettingStarted.hidealert = Ga naar instellingen > Algemeen, om dit scherm weer te tonen.
@ -291,7 +288,6 @@ settingsheader.podcast = Podcast
settingsheader.player = Afspelers
settingsheader.dlna = DLNA
settingsheader.share = Gedeelde media
settingsheader.network = Netwerk
settingsheader.transcoding = Omzetting
settingsheader.user = Gebruikers
settingsheader.search = Zoeken/Cache
@ -403,12 +399,6 @@ musicfoldersettings.expunge.description = Libresonic bewaart de informatie over
musicfoldersettings.organizebyfolderstructure = Organiseer via mappenstructuur.
musicfoldersettings.organizebyfolderstructure.description = Gebruik deze optie om door jouw mediabibliotheek te bladeren via de mappenstructuur in plaats van artiest/album info in ID3 tags.
# networkSettings.jsp
networksettings.text = Gebruik de instellingen hieronder om te bepalen hoe jouw Libresonic-server over het Internet bereikbaar is .<br> \
Als er problemen zijn, raadpleeg dan de <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Beginnersgids</b></a>.
networksettings.urlredirectionenabled = Krijg toegang tot je server over het Internet met een gemakkelijk te onthouden adres.
networksettings.status = Status:
# transcodingInstellingen.jsp
transcodingsettings.name = Naam
transcodingsettings.sourceformat = Converteer van

@ -123,9 +123,6 @@ gettingStarted.step1.text = Zabezpiecz sw\u00F3j serwer zmieniaj\u0105c domyslne
gettingStarted.step2.title = Ustaw foldery medi\u00F3w.
gettingStarted.step2.text = Okre\u015Bl lokalizacje plikow muzycznych i film\u00F3w
gettingStarted.step3.title = Skonfiguruj sie\u0107.
gettingStarted.step3.text = Kilka przydatnych opcji pozwalaj\u0105cych s\u0142ucha\u0107 muzyki zdalnie przez Internet, \
lub podzieli\u0107 si\u0119 ni\u0105 z rodzin\u0105 i przyjaci\u00F3\u0142mi. Stw\u00F3rz w\u0142asny adres <b><em>twojadres</em>.libresonic.org</b>
gettingStarted.hide = Nie pakazuj ponownie
gettingStarted.hidealert = Aby pokaza\u0107 ten ekran ponownie, przejd\u017A do Ustawienia &gt; Og\u00F3lne.
@ -223,7 +220,6 @@ settingsheader.internetRadio = Internet TV/radio
settingsheader.podcast = Podcasty
settingsheader.player = Odtwarzacze
settingsheader.share = Media wsp\u00F3\u0142dzielone
settingsheader.network = Sie\u0107
settingsheader.transcoding = Transkodowanie
settingsheader.user = U\u017Cytkownicy
settingsheader.search = Szukaj
@ -309,12 +305,6 @@ musicfoldersettings.enabled = Aktywny
musicfoldersettings.add = Dodaj folder medi\u00F3w
musicfoldersettings.nopath = Prosz\u0119 okre\u015Bli\u0107 folder.
# networkSettings.jsp
networksettings.text = U\u017Cyj poni\u017Cszych ustawie\u0144, aby kontrolowa\u0107 jak server Libresonic jest dost\u0119pne poprzez Internet.<br> \
Je\u015Bli masz problemy, zajrzyj do <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Instrukcji Obs\u0142ugi</b></a>.
networksettings.urlredirectionenabled = Uzyskaj dost\u0119p do serwera przez Internet poprzez \u0142atwy do zapami\u0119tania adres.
networksettings.status = Status:
# transcodingSettings.jsp
transcodingsettings.name = Nazwa
transcodingsettings.sourceformat = Konwertuj z

@ -118,8 +118,6 @@ gettingStarted.step1.text = Proteja o seu servidor, alterando a senha padr\u00E3
gettingStarted.step2.title = Criar pastas de m\u00FAsica.
gettingStarted.step2.text = Mostrar ao Libresonic onde tem a sua m\u00FAsica.
gettingStarted.step3.title = Configura\u00E7\u00F5es de rede.
gettingStarted.step3.text = Algumas defini\u00E7\u00F5es \u00FAteis se voc\u00EA quiser desfrutar da sua m\u00FAsica remotamente atrav\u00E9s da Internet, \
ou compartilh\u00E1-la com a fam\u00EDlia e amigos. Obtenha o seu endere\u00E7o com nome de<b><em>utilizador</em>.libresonic.org</b>.
gettingStarted.hide = N\u00E3o mostrar mais
gettingStarted.hidealert = Para mostar este ecran outra vez, v\u00E1 a Configura\u00E7\u00F5es > Geral.
@ -217,7 +215,6 @@ settingsheader.musicFolder = Pastas de m\u00FAsica
settingsheader.internetRadio = Internet TV/radio
settingsheader.podcast = Podcast
settingsheader.player = Leitores
settingsheader.network = Rede
settingsheader.transcoding = Transcodifica\u00E7\u00E3o
settingsheader.user = Utilizadores
settingsheader.search = Pesquisa
@ -303,12 +300,6 @@ musicfoldersettings.enabled = Activado
musicfoldersettings.add = Adicionar pasta de m\u00FAsica
musicfoldersettings.nopath = Por favor especifique a pasta.
# networkSettings.jsp
networksettings.text = Use as configura\u00E7\u00F5es abaixo para controlar a forma de aceder ao servidor do Libresonic atrav\u00E9s da Internet .<br> \
Se tiver problemas, consulte o guia dos <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>primeiros passos</b></a>. (em ingl\u00EAs)
networksettings.urlredirectionenabled = Aceda ao seu servidor na Internet usando um endere\u00E7o f\u00E1cil de lembrar.
networksettings.status = Estado:
# transcodingSettings.jsp
transcodingsettings.name = Nome
transcodingsettings.sourceformat = Converter de

@ -112,8 +112,6 @@ gettingStarted.step1.text = \u0417\u0430\u0449\u0438\u0442\u0438\u0442\u0435 \u0
gettingStarted.step2.title = \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043F\u0430\u043F\u043E\u043A \u0441 \u043C\u0443\u0437\u044B\u043A\u043E\u0439.
gettingStarted.step2.text = \u041F\u043E\u043A\u0430\u0436\u0438\u0442\u0435 Libresonic \u0433\u0434\u0435 \u0432\u044B \u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u043C\u0443\u0437\u044B\u043A\u0443.
gettingStarted.step3.title = \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u0441\u0435\u0442\u0438.
gettingStarted.step3.text = \u041D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043F\u043E\u043B\u0435\u0437\u043D\u044B\u0445 \u043E\u043F\u0446\u0438\u0439, \u0435\u0441\u043B\u0438 \u0432\u044B \u043F\u043B\u0430\u043D\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0441\u0438\u0441\u0442\u0435\u043C\u0443 \u0447\u0435\u0440\u0435\u0437 \u0438\u043D\u0442\u0435\u0440\u043D\u0435\u0442, \
\u043B\u0438\u0431\u043E \u0432 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E\u0439 \u0441\u0435\u0442\u0438.
gettingStarted.hide = \u041D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u044D\u0442\u043E \u0431\u043E\u043B\u044C\u0448\u0435
gettingStarted.hidealert = \u0427\u0442\u043E \u0431\u044B \u043E\u043F\u044F\u0442\u044C \u0443\u0432\u0438\u0434\u0435\u0442\u044C \u044D\u0442\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 - \u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435.
@ -206,7 +204,6 @@ settingsheader.musicFolder = \u041F\u0430\u043F\u043A\u0438 \u0441 \u043C\u0443\
settingsheader.internetRadio = \u0418\u043D\u0442\u0435\u0440\u043D\u0435\u0442 TV/\u0440\u0430\u0434\u0438\u043E
settingsheader.podcast = \u041F\u043E\u0434\u043A\u0430\u0441\u0442
settingsheader.player = \u041F\u0440\u043E\u0438\u0433\u0440\u044B\u0432\u0430\u0442\u0435\u043B\u0438
settingsheader.network = \u0421\u0435\u0442\u0435\u0432\u044B\u0435
settingsheader.transcoding = \u0422\u0440\u0430\u043D\u0441\u043A\u043E\u0434\u0438\u043D\u0433
settingsheader.user = \u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0438
settingsheader.search = \u0418\u043D\u0434\u0435\u043A\u0441\u0430\u0446\u0438\u044F
@ -291,11 +288,6 @@ musicfoldersettings.enabled = \u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0430
musicfoldersettings.add = \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0430\u043F\u043A\u0438 \u0441 \u043C\u0443\u0437\u044B\u043A\u043E\u0439
musicfoldersettings.nopath = \u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u0430\u043F\u043A\u0443.
# networkSettings.jsp
networksettings.text = \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u044D\u0442\u0438 \u043E\u043F\u0446\u0438\u0438 \u0434\u043B\u044F \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u0432\u0430\u0448\u0435\u043C\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0447\u0435\u0440\u0435\u0437 \u0438\u043D\u0442\u0435\u0440\u043D\u0435\u0442.
networksettings.urlredirectionenabled = \u0421\u0434\u0435\u043B\u0430\u0439\u0442\u0435 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u043C \u043F\u043E \u043B\u0435\u0433\u043A\u043E\u0437\u0430\u043F\u043E\u043C\u0438\u043D\u0430\u044E\u0449\u0435\u043C\u0443\u0441\u044F \u0430\u0434\u0440\u0435\u0441\u0443.
networksettings.status = \u0421\u0442\u0430\u0442\u0443\u0441:
# transcodingSettings.jsp
transcodingsettings.name = \u0418\u043C\u044F
transcodingsettings.sourceformat = \u041A\u043E\u043D\u0432\u0435\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441

@ -171,9 +171,6 @@ gettingStarted.step1.text = Zavarujte va\u0161 stre\u017Enik tako, da spremenite
gettingStarted.step2.title = Dolo\u010Dite imenike z glasbo.
gettingStarted.step2.text = Povejte Libresonicu, kje hranite va\u0161e glasbene datoteke.
gettingStarted.step3.title = Nastavi omre\u017Ene nastavitve.
gettingStarted.step3.text = Nekaj uporabnih nastavitev, \u010De \u017Eelite poslu\u0161ati va\u0161o glasbo preko spleta, \
oz. jo deliti z dru\u017Eino in/ali prijatelji. Priskrbite si svoj osebni <b><em>va\u0161e_ime</em>.libresonic.org</b> \
spletni naslov.
gettingStarted.hide = Ne prikazuj ve\u010D teh navodil.
gettingStarted.hidealert = \u010Ce \u017Eelite ponovno prebrati ta navodila, poglejte v Nastavitve > Splo\u0161no.
@ -276,7 +273,6 @@ settingsheader.internetRadio = Spletni TV/radio
settingsheader.podcast = Podcast
settingsheader.player = Predvajalniki
settingsheader.share = Skupna raba vsebin
settingsheader.network = Omre\u017Eje
settingsheader.transcoding = Prekodiranje
settingsheader.user = Uporabniki
settingsheader.search = Iskanje
@ -377,12 +373,6 @@ musicfoldersettings.fastcache.description = Uporabite to mo\u017Enost za zmanj\u
musicfoldersettings.organizebyfolderstructure = Organiziraj po imeni\u0161ki strukuri
musicfoldersettings.organizebyfolderstructure.description = Uporabite to mo\u017Enost za brskanje po va\u0161ih medijskih datotekah s pomo\u010Djo imeni\u0161ke strukture, namesto uporabe podatkov o izvajalcih/albumih iz ID3 zna\u010Dk.
# networkSettings.jsp
networksettings.text = Uporabi spodnje nastavitve za nadzor dostopa do va\u0161ega Libresonic stre\u017Enika na Internetu.<br> \
\u010Ce naletite na te\u017Eave, si prosimo oglejte <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Uvod</b></a> k programu.
networksettings.urlredirectionenabled = Dostopajte do svojega stre\u017Enika preko interneta z uporabo naslova, ki si ga je lahko zapomniti.
networksettings.status = Stanje:
# transcodingSettings.jsp
transcodingsettings.name = Ime
transcodingsettings.sourceformat = Pretvori iz

@ -122,9 +122,6 @@ gettingStarted.step1.text = S\u00E4kra din server genom att \u00E4ndra standardl
gettingStarted.step2.title = S\u00E4tt upp mediamappar.
gettingStarted.step2.text = Tala om f\u00F6r Libresonic s\u00F6kv\u00E4gen till din musik och dina videos.
gettingStarted.step3.title = Konfigurera inst\u00E4llningarna f\u00F6r n\u00E4tverket.
gettingStarted.step3.text = Anv\u00E4ndbara inst\u00E4llningar om du vill f\u00E5 tillg\u00E5ng till din musik \u00F6ver Internet, \
eller dela den med familj och v\u00E4nner. Skapa din personliga <b><em>dittnamn</em>.libresonic.org</b> \
adress.
gettingStarted.hide = Visa inte detta igen
gettingStarted.hidealert = F\u00F6r att visa denn info igen, g\u00E5 till Inst\u00E4llningar > Allm\u00E4nt.
@ -222,7 +219,6 @@ settingsheader.internetRadio = Internet TV/radio
settingsheader.podcast = Podcast
settingsheader.player = Spelare
settingsheader.share = Delad Media
settingsheader.network = N\u00E4tverk
settingsheader.transcoding = Transcoding
settingsheader.user = Anv\u00E4ndare
settingsheader.search = S\u00F6k
@ -308,12 +304,6 @@ musicfoldersettings.enabled = Aktiverad
musicfoldersettings.add = L\u00E4gg till mapp
musicfoldersettings.nopath = V\u00E4nligen specificera en s\u00F6kv\u00E4g.
# networkSettings.jsp
networksettings.text = Anv\u00E4nd inst\u00E4llningarna nedan f\u00F6r att f\u00E5 tillg\u00E5ng till Libresonicserver via internet.<br> \
Om du f\u00E5r problem, v\u00E4nligen konsultera <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>Att komma ig\u00E5ng</b></a> guiden.
networksettings.urlredirectionenabled = F\u00E5 tillg\u00E5ng till din server via internet genom att anv\u00E4nda en adress som \u00E4r l\u00E4tt att komma ih\u00E5g.
networksettings.status = Status:
# transcodingSettings.jsp
transcodingsettings.name = Namn
transcodingsettings.sourceformat = Fr\u00E5n

@ -171,9 +171,6 @@ gettingStarted.step1.text = \u8BF7\u4FEE\u6539\u9884\u8BBE\u7684\u7BA1\u7406\u54
gettingStarted.step2.title = \u8BBE\u7F6E\u5A92\u4F53\u6587\u4EF6\u5939.
gettingStarted.step2.text = \u8BBE\u7F6E\u60A8\u97F3\u4E50\u6240\u653E\u7F6E\u7684\u8D44\u6599\u5939\u3002
gettingStarted.step3.title = \u914D\u7F6E\u7F51\u8DEF\u8BBE\u7F6E.
gettingStarted.step3.text = \u5982\u679C\u60A8\u8981\u901A\u8FC7Internet\u8BBF\u95EE\u4F60\u7684\u5A92\u4F53\u6216\u662F\u4E0E\u60A8\u7684\u670B\u53CB\u3001\u5BB6\u4EBA\u5206\u4EAB\u3002\
\u53EF\u4EE5\u53D6\u5F97\u60A8\u7684\u4E13\u5C5E\u7F51\u5740\
<em>yourname</em>.libresonic.org.
gettingStarted.hide = \u4E0B\u6B21\u4E0D\u663E\u793A\u672C\u9875
gettingStarted.hidealert = \u5982\u679C\u4E0B\u6B21\u8FD8\u9700\u8981\u663E\u793A\u63D0\u793A,\u8BF7\u4ECE \u8BBE\u7F6E->\u4E00\u822C \u4E2D\u52FE\u9009.
@ -276,7 +273,6 @@ settingsheader.internetRadio = \u7EBF\u4E0A\u7535\u89C6/\u6536\u97F3\u673A
settingsheader.podcast = \u64AD\u5BA2
settingsheader.player = \u64AD\u653E\u5668
settingsheader.share = \u5171\u4EAB\u7684\u5A92\u4F53
settingsheader.network = \u7F51\u7EDC
settingsheader.transcoding = \u8F6C\u7801
settingsheader.user = \u7528\u6237
settingsheader.search = \u67E5\u627E
@ -380,12 +376,6 @@ musicfoldersettings.expunge.description = Libresonic \u4F1A\u8BB0\u5F55\u5B83\u9
musicfoldersettings.organizebyfolderstructure = \u6309\u7167\u6587\u4EF6\u5939\u7ED3\u6784\u6574\u7406
musicfoldersettings.organizebyfolderstructure.description = \u4F7F\u7528\u8FD9\u4E2A\u9009\u9879\u4F7F Libresonic \u6309\u7167\u539F\u59CB\u7684\u6587\u4EF6\u5939\u7ED3\u6784\u6D4F\u89C8\u66F2\u76EE,\u800C\u4E0D\u662F\u6309\u827A\u672F\u5BB6/\u4E13\u8F91\u7684\u65B9\u5F0F\u6D4F\u89C8
# networkSettings.jsp
networksettings.text = \u4EE5\u4E0B\u8BBE\u7F6E\u8BA9\u60A8\u900F\u8FC7\u7F51\u9645\u7F51\u8DEF\u5B58\u53D6Libresonic\u670D\u52A1\u5668.<br> \
\u6709\u4EFB\u4F55\u95EE\u9898, \u8BF7\u53C2\u8003 <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>\u521D\u6B21\u4F7F\u7528</b></a>\u624B\u518C.
networksettings.urlredirectionenabled = \u7528\u7B80\u5355\u597D\u8BB0\u7684\u7F51\u5740\u8FDE\u7EBF\u5230\u60A8\u7684\u670D\u52A1\u5668.
networksettings.status = \u72B6\u6001:
# transcodingSettings.jsp
transcodingsettings.name = \u540D\u79F0
transcodingsettings.sourceformat = \u6E90\u683C\u5F0F

@ -185,8 +185,6 @@ gettingStarted.step1.text = \u8ACB\u4FEE\u6539\u9810\u8A2D\u7684\u7BA1\u7406\u54
gettingStarted.step2.title = \u8A2D\u5B9A\u97F3\u6A02\u8CC7\u6599\u593E\u3002
gettingStarted.step2.text = \u8A2D\u5B9A\u60A8\u97F3\u6A02\u6240\u653E\u7F6E\u7684\u8CC7\u6599\u593E\u3002
gettingStarted.step3.title = \u914D\u7F6E\u7DB2\u8DEF\u8A2D\u5B9A\u3002
gettingStarted.step3.text = \u5982\u679C\u60A8\u8981\u900F\u904E\u7DB2\u969B\u7DB2\u8DEF\u6216\u662F\u8207\u60A8\u7684\u670B\u53CB\u3001\u5BB6\u4EBA\u5206\u4EAB\u3002\
\u4E26\u53D6\u5F97\u60A8\u7684\u5C08\u5C6C\u7DB2\u5740\u50CF\u662F<em>yourname</em>.libresonic.org\u3002
gettingStarted.hide = \u4E0B\u6B21\u4E0D\u986F\u793A\u672C\u9801\uFF01
gettingStarted.hidealert = \u5982\u679C\u4E0B\u6B21\u9084\u9700\u8981\u986F\u793A\u63D0\u793A\uFF0C\u8ACB\u5F9E \u8A2D\u5B9A\u2192\u4E00\u822C \u4E2D\u52FE\u9078\u3002
@ -295,7 +293,6 @@ settingsheader.player = \u64AD\u653E\u5668
settingsheader.dlna = DLNA/UPnP
settingsheader.sonos = Sonos
settingsheader.share = \u5206\u4EAB\u5A92\u9AD4
settingsheader.network = \u7DB2\u8DEF
settingsheader.transcoding = \u8F49\u6A94
settingsheader.user = \u4F7F\u7528\u8005
settingsheader.search = \u641C\u5C0B
@ -414,16 +411,6 @@ musicfoldersettings.expunge.description = Libresonic \u5132\u5B58\u4E86\u6240\u6
musicfoldersettings.organizebyfolderstructure = \u4EE5\u8CC7\u6599\u593E\u7D50\u69CB\u6574\u7406
musicfoldersettings.organizebyfolderstructure.description = \u958B\u555F\u9019\u500B\u9078\u9805\u4F7F\u60A8\u700F\u89BD\u5A92\u9AD4\u8CC7\u6599\u5EAB\u6642\u4F7F\u7528\u539F\u4F86\u7684\u8CC7\u6599\u593E\u7D50\u69CB\uFF0C\u800C\u4E0D\u662F\u4F9D\u7167 ID3 \u6A19\u7C64\u5167\u7684\u6B4C\u624B\u8207\u5C08\u8F2F\u8CC7\u8A0A\u3002
# networkSettings.jsp
networksettings.text = \u4EE5\u4E0B\u8A2D\u5B9A\u8B93\u60A8\u900F\u904E\u7DB2\u969B\u7DB2\u8DEF\u5B58\u53D6Libresonic\u4F3A\u670D\u5668\u3002<br> \
\u6709\u4EFB\u4F55\u554F\u984C\uFF0C\u8ACB\u53C3\u8003 <a href="http://libresonic.org/pages/getting-started.jsp" target="_blank"><b>\u521D\u6B21\u4F7F\u7528</b></a>\u624B\u518A\u3002
networksettings.urlredirectionenabled = \u7528\u7C21\u55AE\u597D\u8A18\u7684\u7DB2\u5740\u9023\u7DDA\u5230\u60A8\u7684\u4F3A\u670D\u5668\u3002
networksettings.status = \u72C0\u614B\uFF1A
networksettings.normalurl = Use
networksettings.customurl = Use custom URL (advanced)
networksettings.urlRedirectDisabled = Feature not currently available
# transcodingSettings.jsp
transcodingsettings.name = \u8F49\u6A94\u540D\u7A31
transcodingsettings.sourceformat = \u539F\u59CB\u6A94

@ -12,33 +12,24 @@
<span style="vertical-align: middle"><fmt:message key="share.title"/></span>
</h1>
<c:choose>
<c:when test="${model.urlRedirectionEnabled}">
<fmt:message key="share.warning"/>
<p>
<a href="http://www.facebook.com/sharer.php?u=${model.playUrl}" target="_blank"><img src="<spring:theme code="shareFacebookImage"/>" alt=""></a>&nbsp;
<a href="http://www.facebook.com/sharer.php?u=${model.playUrl}" target="_blank"><fmt:message key="share.facebook"/></a>
</p>
<fmt:message key="share.warning"/>
<p>
<a href="http://www.facebook.com/sharer.php?u=${model.playUrl}" target="_blank"><img src="<spring:theme code="shareFacebookImage"/>" alt=""></a>&nbsp;
<a href="http://www.facebook.com/sharer.php?u=${model.playUrl}" target="_blank"><fmt:message key="share.facebook"/></a>
</p>
<p>
<a href="http://twitter.com/?status=Listening to ${model.playUrl}" target="_blank"><img src="<spring:theme code="shareTwitterImage"/>" alt=""></a>&nbsp;
<a href="http://twitter.com/?status=Listening to ${model.playUrl}" target="_blank"><fmt:message key="share.twitter"/></a>
</p>
<p>
<g:plusone size="small" annotation="none" href="${model.playUrl}"></g:plusone>&nbsp;<fmt:message key="share.googleplus"/>
</p>
<p>
<fmt:message key="share.link">
<fmt:param>${model.playUrl}</fmt:param>
</fmt:message>
</p>
</c:when>
<c:otherwise>
<p>
<fmt:message key="share.disabled"/>
</p>
</c:otherwise>
</c:choose>
<p>
<a href="http://twitter.com/?status=Listening to ${model.playUrl}" target="_blank"><img src="<spring:theme code="shareTwitterImage"/>" alt=""></a>&nbsp;
<a href="http://twitter.com/?status=Listening to ${model.playUrl}" target="_blank"><fmt:message key="share.twitter"/></a>
</p>
<p>
<g:plusone size="small" annotation="none" href="${model.playUrl}"></g:plusone>&nbsp;<fmt:message key="share.googleplus"/>
</p>
<p>
<fmt:message key="share.link">
<fmt:param>${model.playUrl}</fmt:param>
</fmt:message>
</p>
<div style="padding-top:1em">
<c:if test="${not empty model.dir}">

@ -41,10 +41,10 @@
<c:if test="${model.dlnaEnabled}">checked="checked"</c:if>/>
<label for="dlnaEnabled"><fmt:message key="dlnasettings.enabled"/></label>
</div>
<p class="detail" style="width:60%;white-space:normal">
<fmt:message key="dlnasettings.description"/>
</p>
<div>
<fmt:message key="dlnasettings.servername"/>
<input name="dlnaServerName" id="dlnaServerName" size="40"
@ -54,6 +54,15 @@
<fmt:message key="dlnasettings.servername.description"/>
</p>
<div>
<label for="dlnaBaseLANURL" ><fmt:message key="dlnasettings.baselanurl"/></label>
<input type="text" size="50" name="dlnaBaseLANURL" id="dlnaBaseLANURL"
value="<c:out value="${model.dlnaBaseLANURL}" />" />
</div>
<p class="detail" style="width:60%;white-space:normal">
<fmt:message key="dlnasettings.lanurl.description"/>
</p>
<p>
<input type="submit" value="<fmt:message key="common.save"/>" style="margin-right:0.3em">
<input type="button" value="<fmt:message key="common.cancel"/>" onclick="location.href='nowPlaying.view'">

@ -15,7 +15,7 @@
<sub:param name="size" value="500"/>
</sub:url>
<meta name="og:title" content="${fn:escapeXml(model.songs[0].artist)} &mdash; ${fn:escapeXml(model.songs[0].albumName)}"/>
<meta name="og:image" content="${model.redirectUrl}${coverArtUrl}"/>
<meta name="og:image" content="${coverArtUrl}"/>
</c:if>
<script type="text/javascript">

@ -41,7 +41,7 @@
<tr>
<td style="font-size:26pt;padding:20pt">3</td>
<td>
<div style="font-size:14pt"><a href="networkSettings.view"><fmt:message key="gettingStarted.step3.title"/></a></div>
<div style="font-size:14pt"><fmt:message key="gettingStarted.step3.title"/></div>
<div style="padding-top:5pt"><fmt:message key="gettingStarted.step3.text"/></div>
</td>
</tr>

@ -1,84 +0,0 @@
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="iso-8859-1" %>
<%--@elvariable id="command" type="org.libresonic.player.command.NetworkSettingsCommand"--%>
<html>
<head>
<%@ include file="head.jsp" %>
<%@ include file="jquery.jsp" %>
<script type="text/javascript" src="<c:url value="/dwr/interface/multiService.js"/>"></script>
<script type="text/javascript" src="<c:url value="/dwr/engine.js"/>"></script>
<script type="text/javascript" language="javascript">
function init() {
enableUrlRedirectionFields();
refreshStatus();
}
function refreshStatus() {
multiService.getNetworkStatus(updateStatus);
}
function updateStatus(networkStatus) {
$("#urlRedirectionStatus").html(networkStatus.urlRedirectionStatusText);
window.setTimeout("refreshStatus()", 1000);
}
function enableUrlRedirectionFields() {
var urlRedirectionEnabled = $("#urlRedirectionEnabled").is(":checked");
var normal = $("#urlRedirectTypeNormal").is(":checked");
var custom = $("#urlRedirectTypeCustom").is(":checked");
$("#urlRedirectFrom").prop("disabled", !urlRedirectionEnabled || !normal);
$("#urlRedirectCustomUrl").prop("disabled", !urlRedirectionEnabled || !custom);
$("#urlRedirectTypeNormal").prop("disabled", !urlRedirectionEnabled);
$("#urlRedirectTypeCustom").prop("disabled", !urlRedirectionEnabled);
}
</script>
</head>
<body class="mainframe bgcolor1" onload="init()">
<script type="text/javascript" src="<c:url value="/script/wz_tooltip.js"/>"></script>
<script type="text/javascript" src="<c:url value="/script/tip_balloon.js"/>"></script>
<c:import url="settingsHeader.jsp">
<c:param name="cat" value="network"/>
<c:param name="toast" value="${settings_toast}"/>
</c:import>
<p style="padding-top:1em"><fmt:message key="networksettings.text"/></p>
<form:form commandName="command" action="networkSettings.view" method="post">
<p style="padding-top:1em"><form:checkbox id="urlRedirectionEnabled" path="urlRedirectionEnabled"
onclick="enableUrlRedirectionFields()"/>
<label for="urlRedirectionEnabled"><fmt:message key="networksettings.urlredirectionenabled"/></label>
</p>
<div style="padding-left:2em">
<p>
<form:radiobutton id="urlRedirectTypeNormal" path="urlRedirectType" value="NORMAL" onclick="enableUrlRedirectionFields()"/>
<label for="urlRedirectTypeNormal"><fmt:message key="networksettings.normalurl"/></label>
http://<form:input id="urlRedirectFrom" path="urlRedirectFrom" size="16" cssStyle="margin-left:0.25em"/>.libresonic.org (<fmt:message key="networksettings.urlRedirectDisabled"/>)
</p>
<p>
<form:radiobutton id="urlRedirectTypeCustom" path="urlRedirectType" value="CUSTOM" onclick="enableUrlRedirectionFields()"/>
<label for="urlRedirectTypeCustom"><fmt:message key="networksettings.customurl"/></label>
<form:input id="urlRedirectCustomUrl" path="urlRedirectCustomUrl" size="50" cssStyle="margin-left:0.5em"/>
</p>
<p class="detail">
<fmt:message key="networksettings.status"/>
<span id="urlRedirectionStatus" style="margin-left:0.25em"></span>
<span id="urlRedirectionTestStatus" style="margin-left:0.25em"></span>
</p>
</div>
<p style="padding-top:1em">
<input type="submit" value="<fmt:message key="common.save"/>" style="margin-right:0.3em">
<input type="button" value="<fmt:message key="common.cancel"/>" onclick="location.href='nowPlaying.view'">
</p>
</form:form>
</body>
</html>

@ -9,7 +9,7 @@
</script>
</c:if>
<c:set var="categories" value="${param.restricted ? 'personal password player share' : 'musicFolder general advanced personal user player network share dlna sonos transcoding internetRadio podcast'}"/>
<c:set var="categories" value="${param.restricted ? 'personal password player share' : 'musicFolder general advanced personal user player share dlna sonos transcoding internetRadio podcast'}"/>
<h1>
<img src="<spring:theme code="settingsImage"/>" alt=""/>
<span style="vertical-align: middle"><fmt:message key="settingsheader.title"/></span>
@ -18,7 +18,7 @@
<h2>
<c:forTokens items="${categories}" delims=" " var="cat" varStatus="loopStatus">
<c:choose>
<c:when test="${loopStatus.count > 1 and (loopStatus.count - 1) % 8 != 0}">&nbsp;|&nbsp;</c:when>
<c:when test="${loopStatus.count > 1 and (loopStatus.count - 1) % 7 != 0}">&nbsp;|&nbsp;</c:when>
<c:otherwise></h2><h2></c:otherwise>
</c:choose>

@ -63,7 +63,6 @@ public class SettingsServiceTestCase extends TestCase {
assertEquals("Wrong default Podcast episode download count.", 1, settingsService.getPodcastEpisodeDownloadCount());
assertTrue("Wrong default Podcast folder.", settingsService.getPodcastFolder().endsWith("Podcast"));
assertEquals("Wrong default Podcast update interval.", 24, settingsService.getPodcastUpdateInterval());
assertEquals("Wrong default rewrite URL enabled.", true, settingsService.isRewriteUrlEnabled());
assertEquals("Wrong default LDAP enabled.", false, settingsService.isLdapEnabled());
assertEquals("Wrong default LDAP URL.", "ldap://host.domain.com:389/cn=Users,dc=domain,dc=com", settingsService.getLdapUrl());
assertNull("Wrong default LDAP manager DN.", settingsService.getLdapManagerDn());
@ -89,7 +88,6 @@ public class SettingsServiceTestCase extends TestCase {
settingsService.setPodcastEpisodeDownloadCount(-1);
settingsService.setPodcastFolder("d:/podcasts");
settingsService.setPodcastUpdateInterval(-1);
settingsService.setRewriteUrlEnabled(false);
settingsService.setLdapEnabled(true);
settingsService.setLdapUrl("newLdapUrl");
settingsService.setLdapManagerDn("admin");
@ -126,7 +124,6 @@ public class SettingsServiceTestCase extends TestCase {
assertEquals("Wrong Podcast episode download count.", -1, settingsService.getPodcastEpisodeDownloadCount());
assertEquals("Wrong Podcast folder.", "d:/podcasts", settingsService.getPodcastFolder());
assertEquals("Wrong Podcast update interval.", -1, settingsService.getPodcastUpdateInterval());
assertEquals("Wrong rewrite URL enabled.", false, settingsService.isRewriteUrlEnabled());
assertTrue("Wrong LDAP enabled.", settingsService.isLdapEnabled());
assertEquals("Wrong LDAP URL.", "newLdapUrl", settingsService.getLdapUrl());
assertEquals("Wrong LDAP manager DN.", "admin", settingsService.getLdapManagerDn());

@ -20,9 +20,7 @@
package org.libresonic.player.util;
import junit.framework.TestCase;
import org.libresonic.player.domain.UrlRedirectType;
import java.net.MalformedURLException;
import java.util.Arrays;
import java.util.Locale;
@ -182,22 +180,6 @@ public class StringUtilTestCase extends TestCase {
assertEquals("Error in fileSystemSafe().", "foo-bar", StringUtil.fileSystemSafe("foo:bar"));
}
public void testRewriteUrl() {
assertEquals("Error in rewriteUrl().", "http://foo/", StringUtil.rewriteUrl("http://foo/", "http://foo/"));
assertEquals("Error in rewriteUrl().", "http://foo:81/", StringUtil.rewriteUrl("http://foo/", "http://foo:81/"));
assertEquals("Error in rewriteUrl().", "http://bar/", StringUtil.rewriteUrl("http://foo/", "http://bar/"));
assertEquals("Error in rewriteUrl().", "http://bar.com/", StringUtil.rewriteUrl("http://foo.com/", "http://bar.com/"));
assertEquals("Error in rewriteUrl().", "http://bar.com/", StringUtil.rewriteUrl("http://foo.com/", "http://bar.com/"));
assertEquals("Error in rewriteUrl().", "http://bar.com/a", StringUtil.rewriteUrl("http://foo.com/a", "http://bar.com/"));
assertEquals("Error in rewriteUrl().", "http://bar.com/a/b", StringUtil.rewriteUrl("http://foo.com/a/b", "http://bar.com/c"));
assertEquals("Error in rewriteUrl().", "http://bar.com:8080/a?b=1&c=2", StringUtil.rewriteUrl("http://foo.com/a?b=1&c=2", "http://bar.com:8080/e?f=3"));
assertEquals("Error in rewriteUrl().", "http://foo.com:8080/a?b=1&c=2", StringUtil.rewriteUrl("http://foo.com/a?b=1&c=2", "http://foo.com:8080/e?f=3"));
assertEquals("Error in rewriteUrl().", "https://foo.com:8080/a?b=1&c=2", StringUtil.rewriteUrl("http://foo.com/a?b=1&c=2", "https://foo.com:8080/e?f=3"));
assertEquals("Error in rewriteUrl().", "http://foo/", StringUtil.rewriteUrl("http://foo/", "not:a:url"));
assertEquals("Error in rewriteUrl().", "http://foo/", StringUtil.rewriteUrl("http://foo/", ""));
assertEquals("Error in rewriteUrl().", "http://foo/", StringUtil.rewriteUrl("http://foo/", null));
}
public void testRemoveMarkup() {
assertEquals("Error in removeMarkup()", "foo", StringUtil.removeMarkup("<b>foo</b>"));
assertEquals("Error in removeMarkup()", "foobar", StringUtil.removeMarkup("<b>foo</b>bar"));
@ -206,26 +188,4 @@ public class StringUtilTestCase extends TestCase {
assertEquals("Error in removeMarkup()", null, StringUtil.removeMarkup(null));
}
public void testRewriteRemoteUrl() throws MalformedURLException {
UrlRedirectType urlRedirectType = UrlRedirectType.NORMAL;
String urlRedirectCustomUrl = null;
assertEquals("http://192.168.1.10:4040/stream?id=42",
StringUtil.rewriteRemoteUrl("http://localhost:4040/stream?id=42", false, urlRedirectType, null, urlRedirectCustomUrl, "", "192.168.1.10", 4040));
assertEquals("http://192.168.1.10:4040/libresonic/stream?id=42",
StringUtil.rewriteRemoteUrl("http://localhost:4040/libresonic/stream?id=42", false, urlRedirectType, null, urlRedirectCustomUrl, "libresonic", "192.168.1.10", 4040));
assertEquals("http://192.168.1.10:4040/stream?id=42",
StringUtil.rewriteRemoteUrl("https://localhost:4443/stream?id=42", false, urlRedirectType, null, urlRedirectCustomUrl, "", "192.168.1.10", 4040));
assertEquals("http://192.168.1.10:4040/libresonic/stream?id=42",
StringUtil.rewriteRemoteUrl("https://localhost:4443/libresonic/stream?id=42", false, urlRedirectType, null, urlRedirectCustomUrl, "libresonic", "192.168.1.10", 4040));
assertEquals("http://sindre.libresonic.org:80/stream?id=42",
StringUtil.rewriteRemoteUrl("http://localhost:4040/stream?id=42", true, urlRedirectType, "sindre", urlRedirectCustomUrl, "", "192.168.1.10", 4040));
assertEquals("http://sindre.libresonic.org:80/stream?id=42",
StringUtil.rewriteRemoteUrl("http://localhost:4040/libresonic/stream?id=42", true, urlRedirectType, "sindre", urlRedirectCustomUrl, "libresonic", "192.168.1.10", 4040));
assertEquals("http://sindre.libresonic.org:80/stream?id=42",
StringUtil.rewriteRemoteUrl("https://localhost:4443/stream?id=42", true, urlRedirectType, "sindre", urlRedirectCustomUrl, "", "192.168.1.10", 4040));
assertEquals("http://sindre.libresonic.org:80/stream?id=42",
StringUtil.rewriteRemoteUrl("https://localhost:4443/libresonic/stream?id=42", true, urlRedirectType, "sindre", urlRedirectCustomUrl, "libresonic", "192.168.1.10", 4040));
}
}

Loading…
Cancel
Save