s/SUBSONIC/LIBRESONIC
Signed-off-by: Bernardus Jansen <bernardus@bajansen.nl>
This commit is contained in:
+3
-3
@@ -48,8 +48,8 @@ public class LibresonicDeployer implements LibresonicDeployerService {
|
||||
private static final int HEADER_BUFFER_SIZE = 64 * 1024;
|
||||
|
||||
// Libresonic home directory.
|
||||
private static final File SUBSONIC_HOME_WINDOWS = new File("c:/libresonic");
|
||||
private static final File SUBSONIC_HOME_OTHER = new File("/var/libresonic");
|
||||
private static final File LIBRESONIC_HOME_WINDOWS = new File("c:/libresonic");
|
||||
private static final File LIBRESONIC_HOME_OTHER = new File("/var/libresonic");
|
||||
|
||||
private Throwable exception;
|
||||
private File libresonicHome;
|
||||
@@ -311,7 +311,7 @@ public class LibresonicDeployer implements LibresonicDeployerService {
|
||||
home = new File(overrideHome);
|
||||
} else {
|
||||
boolean isWindows = System.getProperty("os.name", "Windows").toLowerCase().startsWith("windows");
|
||||
home = isWindows ? SUBSONIC_HOME_WINDOWS : SUBSONIC_HOME_OTHER;
|
||||
home = isWindows ? LIBRESONIC_HOME_WINDOWS : LIBRESONIC_HOME_OTHER;
|
||||
}
|
||||
|
||||
// Attempt to create home directory if it doesn't exist.
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
@echo off
|
||||
|
||||
REM The directory where Libresonic will create files. Make sure it is writable.
|
||||
set SUBSONIC_HOME=c:\libresonic
|
||||
set LIBRESONIC_HOME=c:\libresonic
|
||||
|
||||
REM The host name or IP address on which to bind Libresonic. Only relevant if you have
|
||||
REM multiple network interfaces and want to make Libresonic available on only one of them.
|
||||
REM The default value 0.0.0.0 will bind Libresonic to all available network interfaces.
|
||||
set SUBSONIC_HOST=0.0.0.0
|
||||
set LIBRESONIC_HOST=0.0.0.0
|
||||
|
||||
REM The port on which Libresonic will listen for incoming HTTP traffic.
|
||||
set SUBSONIC_PORT=4040
|
||||
set LIBRESONIC_PORT=4040
|
||||
|
||||
REM The port on which Libresonic will listen for incoming HTTPS traffic (0 to disable).
|
||||
set SUBSONIC_HTTPS_PORT=0
|
||||
set LIBRESONIC_HTTPS_PORT=0
|
||||
|
||||
REM The context path (i.e., the last part of the Libresonic URL). Typically "/" or "/libresonic".
|
||||
set SUBSONIC_CONTEXT_PATH=/
|
||||
set LIBRESONIC_CONTEXT_PATH=/
|
||||
|
||||
REM The memory limit (max Java heap size) in megabytes.
|
||||
set MAX_MEMORY=150
|
||||
|
||||
java -Xmx%MAX_MEMORY%m -Dlibresonic.home=%SUBSONIC_HOME% -Dlibresonic.host=%SUBSONIC_HOST% -Dlibresonic.port=%SUBSONIC_PORT% -Dlibresonic.httpsPort=%SUBSONIC_HTTPS_PORT% -Dlibresonic.contextPath=%SUBSONIC_CONTEXT_PATH% -jar libresonic-booter-jar-with-dependencies.jar
|
||||
java -Xmx%MAX_MEMORY%m -Dlibresonic.home=%LIBRESONIC_HOME% -Dlibresonic.host=%LIBRESONIC_HOST% -Dlibresonic.port=%LIBRESONIC_PORT% -Dlibresonic.httpsPort=%LIBRESONIC_HTTPS_PORT% -Dlibresonic.contextPath=%LIBRESONIC_CONTEXT_PATH% -jar libresonic-booter-jar-with-dependencies.jar
|
||||
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
# Author: Sindre Mehus
|
||||
###################################################################################
|
||||
|
||||
SUBSONIC_HOME=/var/libresonic
|
||||
SUBSONIC_HOST=0.0.0.0
|
||||
SUBSONIC_PORT=4040
|
||||
SUBSONIC_HTTPS_PORT=0
|
||||
SUBSONIC_CONTEXT_PATH=/
|
||||
SUBSONIC_MAX_MEMORY=150
|
||||
SUBSONIC_PIDFILE=
|
||||
SUBSONIC_DEFAULT_MUSIC_FOLDER=/var/music
|
||||
SUBSONIC_DEFAULT_PODCAST_FOLDER=/var/music/Podcast
|
||||
SUBSONIC_DEFAULT_PLAYLIST_FOLDER=/var/playlists
|
||||
LIBRESONIC_HOME=/var/libresonic
|
||||
LIBRESONIC_HOST=0.0.0.0
|
||||
LIBRESONIC_PORT=4040
|
||||
LIBRESONIC_HTTPS_PORT=0
|
||||
LIBRESONIC_CONTEXT_PATH=/
|
||||
LIBRESONIC_MAX_MEMORY=150
|
||||
LIBRESONIC_PIDFILE=
|
||||
LIBRESONIC_DEFAULT_MUSIC_FOLDER=/var/music
|
||||
LIBRESONIC_DEFAULT_PODCAST_FOLDER=/var/music/Podcast
|
||||
LIBRESONIC_DEFAULT_PLAYLIST_FOLDER=/var/playlists
|
||||
|
||||
quiet=0
|
||||
|
||||
@@ -54,37 +54,37 @@ while [ $# -ge 1 ]; do
|
||||
usage
|
||||
;;
|
||||
--home=?*)
|
||||
SUBSONIC_HOME=${1#--home=}
|
||||
LIBRESONIC_HOME=${1#--home=}
|
||||
;;
|
||||
--host=?*)
|
||||
SUBSONIC_HOST=${1#--host=}
|
||||
LIBRESONIC_HOST=${1#--host=}
|
||||
;;
|
||||
--port=?*)
|
||||
SUBSONIC_PORT=${1#--port=}
|
||||
LIBRESONIC_PORT=${1#--port=}
|
||||
;;
|
||||
--https-port=?*)
|
||||
SUBSONIC_HTTPS_PORT=${1#--https-port=}
|
||||
LIBRESONIC_HTTPS_PORT=${1#--https-port=}
|
||||
;;
|
||||
--context-path=?*)
|
||||
SUBSONIC_CONTEXT_PATH=${1#--context-path=}
|
||||
LIBRESONIC_CONTEXT_PATH=${1#--context-path=}
|
||||
;;
|
||||
--max-memory=?*)
|
||||
SUBSONIC_MAX_MEMORY=${1#--max-memory=}
|
||||
LIBRESONIC_MAX_MEMORY=${1#--max-memory=}
|
||||
;;
|
||||
--pidfile=?*)
|
||||
SUBSONIC_PIDFILE=${1#--pidfile=}
|
||||
LIBRESONIC_PIDFILE=${1#--pidfile=}
|
||||
;;
|
||||
--quiet)
|
||||
quiet=1
|
||||
;;
|
||||
--default-music-folder=?*)
|
||||
SUBSONIC_DEFAULT_MUSIC_FOLDER=${1#--default-music-folder=}
|
||||
LIBRESONIC_DEFAULT_MUSIC_FOLDER=${1#--default-music-folder=}
|
||||
;;
|
||||
--default-podcast-folder=?*)
|
||||
SUBSONIC_DEFAULT_PODCAST_FOLDER=${1#--default-podcast-folder=}
|
||||
LIBRESONIC_DEFAULT_PODCAST_FOLDER=${1#--default-podcast-folder=}
|
||||
;;
|
||||
--default-playlist-folder=?*)
|
||||
SUBSONIC_DEFAULT_PLAYLIST_FOLDER=${1#--default-playlist-folder=}
|
||||
LIBRESONIC_DEFAULT_PLAYLIST_FOLDER=${1#--default-playlist-folder=}
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
@@ -101,8 +101,8 @@ if [ -e "${JAVA_HOME}" ]
|
||||
fi
|
||||
|
||||
# Create Libresonic home directory.
|
||||
mkdir -p ${SUBSONIC_HOME}
|
||||
LOG=${SUBSONIC_HOME}/libresonic_sh.log
|
||||
mkdir -p ${LIBRESONIC_HOME}
|
||||
LOG=${LIBRESONIC_HOME}/libresonic_sh.log
|
||||
rm -f ${LOG}
|
||||
|
||||
cd $(dirname $0)
|
||||
@@ -110,22 +110,22 @@ if [ -L $0 ] && ([ -e /bin/readlink ] || [ -e /usr/bin/readlink ]); then
|
||||
cd $(dirname $(readlink $0))
|
||||
fi
|
||||
|
||||
${JAVA} -Xmx${SUBSONIC_MAX_MEMORY}m \
|
||||
-Dlibresonic.home=${SUBSONIC_HOME} \
|
||||
-Dlibresonic.host=${SUBSONIC_HOST} \
|
||||
-Dlibresonic.port=${SUBSONIC_PORT} \
|
||||
-Dlibresonic.httpsPort=${SUBSONIC_HTTPS_PORT} \
|
||||
-Dlibresonic.contextPath=${SUBSONIC_CONTEXT_PATH} \
|
||||
-Dlibresonic.defaultMusicFolder=${SUBSONIC_DEFAULT_MUSIC_FOLDER} \
|
||||
-Dlibresonic.defaultPodcastFolder=${SUBSONIC_DEFAULT_PODCAST_FOLDER} \
|
||||
-Dlibresonic.defaultPlaylistFolder=${SUBSONIC_DEFAULT_PLAYLIST_FOLDER} \
|
||||
${JAVA} -Xmx${LIBRESONIC_MAX_MEMORY}m \
|
||||
-Dlibresonic.home=${LIBRESONIC_HOME} \
|
||||
-Dlibresonic.host=${LIBRESONIC_HOST} \
|
||||
-Dlibresonic.port=${LIBRESONIC_PORT} \
|
||||
-Dlibresonic.httpsPort=${LIBRESONIC_HTTPS_PORT} \
|
||||
-Dlibresonic.contextPath=${LIBRESONIC_CONTEXT_PATH} \
|
||||
-Dlibresonic.defaultMusicFolder=${LIBRESONIC_DEFAULT_MUSIC_FOLDER} \
|
||||
-Dlibresonic.defaultPodcastFolder=${LIBRESONIC_DEFAULT_PODCAST_FOLDER} \
|
||||
-Dlibresonic.defaultPlaylistFolder=${LIBRESONIC_DEFAULT_PLAYLIST_FOLDER} \
|
||||
-Djava.awt.headless=true \
|
||||
-verbose:gc \
|
||||
-jar libresonic-booter-jar-with-dependencies.jar > ${LOG} 2>&1 &
|
||||
|
||||
# Write pid to pidfile if it is defined.
|
||||
if [ $SUBSONIC_PIDFILE ]; then
|
||||
echo $! > ${SUBSONIC_PIDFILE}
|
||||
if [ $LIBRESONIC_PIDFILE ]; then
|
||||
echo $! > ${LIBRESONIC_PIDFILE}
|
||||
fi
|
||||
|
||||
if [ $quiet = 0 ]; then
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# (/etc/init.d/libresonic)
|
||||
#
|
||||
# To change the startup parameters of Libresonic, modify
|
||||
# the SUBSONIC_ARGS variable below.
|
||||
# the LIBRESONIC_ARGS variable below.
|
||||
#
|
||||
# Type "/usr/share/libresonic/libresonic.sh --help" on the command line to read an
|
||||
# explanation of the different options.
|
||||
@@ -12,9 +12,9 @@
|
||||
# and 443 (for https), and use a Java memory heap size of 200 MB, use
|
||||
# the following:
|
||||
#
|
||||
# SUBSONIC_ARGS="--port=80 --https-port=443 --max-memory=200"
|
||||
# LIBRESONIC_ARGS="--port=80 --https-port=443 --max-memory=200"
|
||||
|
||||
SUBSONIC_ARGS="--max-memory=150"
|
||||
LIBRESONIC_ARGS="--max-memory=150"
|
||||
|
||||
|
||||
# The user which should run the Libresonic process. Default "root".
|
||||
@@ -22,4 +22,4 @@ SUBSONIC_ARGS="--max-memory=150"
|
||||
# below 1024. Also make sure to grant the user write permissions in
|
||||
# the music directories, otherwise changing album art and tags will fail.
|
||||
|
||||
SUBSONIC_USER=root
|
||||
LIBRESONIC_USER=root
|
||||
@@ -22,14 +22,14 @@ DESC="Libresonic Daemon"
|
||||
NAME=libresonic
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS="--pidfile=$PIDFILE $SUBSONIC_ARGS"
|
||||
DAEMON_ARGS="--pidfile=$PIDFILE $LIBRESONIC_ARGS"
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Run as root if SUBSONIC_USER is not set.
|
||||
[ "$SUBSONIC_USER" = "" ] && SUBSONIC_USER=root
|
||||
# Run as root if LIBRESONIC_USER is not set.
|
||||
[ "$LIBRESONIC_USER" = "" ] && LIBRESONIC_USER=root
|
||||
|
||||
# Make sure Libresonic is started with system locale
|
||||
if [ -r /etc/default/locale ]; then
|
||||
@@ -61,11 +61,11 @@ do_start()
|
||||
fi
|
||||
|
||||
touch $PIDFILE
|
||||
chown $SUBSONIC_USER $PIDFILE
|
||||
[ -e /var/libresonic ] && chown -R $SUBSONIC_USER /var/libresonic
|
||||
[ -e /tmp/libresonic ] && chown -R $SUBSONIC_USER /tmp/libresonic
|
||||
chown $LIBRESONIC_USER $PIDFILE
|
||||
[ -e /var/libresonic ] && chown -R $LIBRESONIC_USER /var/libresonic
|
||||
[ -e /tmp/libresonic ] && chown -R $LIBRESONIC_USER /tmp/libresonic
|
||||
|
||||
start-stop-daemon --start -c $SUBSONIC_USER --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2
|
||||
start-stop-daemon --start -c $LIBRESONIC_USER --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 2
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
SUBSONIC_HOME="/Library/Application Support/Libresonic"
|
||||
LIBRESONIC_HOME="/Library/Application Support/Libresonic"
|
||||
|
||||
chmod oug+rwx "$SUBSONIC_HOME"
|
||||
chown root:admin "$SUBSONIC_HOME"
|
||||
chmod oug+rwx "$LIBRESONIC_HOME"
|
||||
chown root:admin "$LIBRESONIC_HOME"
|
||||
|
||||
chmod oug+rx "$SUBSONIC_HOME/transcode"
|
||||
chown root:admin "$SUBSONIC_HOME/transcode"
|
||||
chmod oug+rx "$LIBRESONIC_HOME/transcode"
|
||||
chown root:admin "$LIBRESONIC_HOME/transcode"
|
||||
|
||||
rm -rf "$SUBSONIC_HOME/jetty"
|
||||
rm -rf "$LIBRESONIC_HOME/jetty"
|
||||
|
||||
echo Libresonic installation done
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
SUBSONIC_HOME="/Library/Application Support/Libresonic"
|
||||
LIBRESONIC_HOME="/Library/Application Support/Libresonic"
|
||||
|
||||
# Backup database.
|
||||
|
||||
if [ -e "$SUBSONIC_HOME/db" ]; then
|
||||
rm -rf "$SUBSONIC_HOME/db.backup"
|
||||
cp -R "$SUBSONIC_HOME/db" "$SUBSONIC_HOME/db.backup"
|
||||
if [ -e "$LIBRESONIC_HOME/db" ]; then
|
||||
rm -rf "$LIBRESONIC_HOME/db.backup"
|
||||
cp -R "$LIBRESONIC_HOME/db" "$LIBRESONIC_HOME/db.backup"
|
||||
fi
|
||||
|
||||
|
||||
@@ -28,14 +28,14 @@ NAME=libresonic
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
LOCKFILE=/var/lock/subsys/$NAME
|
||||
DAEMON=/usr/bin/$NAME
|
||||
DAEMON_ARGS="--pidfile=$PIDFILE $SUBSONIC_ARGS"
|
||||
DAEMON_ARGS="--pidfile=$PIDFILE $LIBRESONIC_ARGS"
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Exit if the package is not installed.
|
||||
[ -x "$DAEMON" ] || exit 0
|
||||
|
||||
# Run as root if SUBSONIC_USER is not set.
|
||||
[ "$SUBSONIC_USER" = "" ] && SUBSONIC_USER=root
|
||||
# Run as root if LIBRESONIC_USER is not set.
|
||||
[ "$LIBRESONIC_USER" = "" ] && LIBRESONIC_USER=root
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
@@ -53,12 +53,12 @@ do_start()
|
||||
fi
|
||||
|
||||
touch $PIDFILE
|
||||
chown $SUBSONIC_USER $PIDFILE
|
||||
[ -e /var/libresonic ] && chown -R $SUBSONIC_USER /var/libresonic
|
||||
[ -e /tmp/libresonic ] && chown -R $SUBSONIC_USER /tmp/libresonic
|
||||
chown $LIBRESONIC_USER $PIDFILE
|
||||
[ -e /var/libresonic ] && chown -R $LIBRESONIC_USER /var/libresonic
|
||||
[ -e /tmp/libresonic ] && chown -R $LIBRESONIC_USER /tmp/libresonic
|
||||
|
||||
echo $"Starting $NAME ..."
|
||||
su -c "$DAEMON $DAEMON_ARGS" $SUBSONIC_USER
|
||||
su -c "$DAEMON $DAEMON_ARGS" $LIBRESONIC_USER
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch $LOCKFILE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# (/etc/init.d/libresonic)
|
||||
#
|
||||
# To change the startup parameters of Libresonic, modify
|
||||
# the SUBSONIC_ARGS variable below.
|
||||
# the LIBRESONIC_ARGS variable below.
|
||||
#
|
||||
# Type "/usr/share/libresonic/libresonic.sh --help" on the command line to read an
|
||||
# explanation of the different options.
|
||||
@@ -12,9 +12,9 @@
|
||||
# and 443 (for https), and use a Java memory heap size of 200 MB, use
|
||||
# the following:
|
||||
#
|
||||
# SUBSONIC_ARGS="--port=80 --https-port=443 --max-memory=200"
|
||||
# LIBRESONIC_ARGS="--port=80 --https-port=443 --max-memory=200"
|
||||
|
||||
SUBSONIC_ARGS="--max-memory=150"
|
||||
LIBRESONIC_ARGS="--max-memory=150"
|
||||
|
||||
|
||||
# The user which should run the Libresonic process. Default "root".
|
||||
@@ -22,4 +22,4 @@ SUBSONIC_ARGS="--max-memory=150"
|
||||
# below 1024. Also make sure to grant the user write permissions in
|
||||
# the music directories, otherwise changing album art and tags will fail.
|
||||
|
||||
SUBSONIC_USER=root
|
||||
LIBRESONIC_USER=root
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.text.*;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Logger implementation which logs to SUBSONIC_HOME/libresonic.log.
|
||||
* Logger implementation which logs to LIBRESONIC_HOME/libresonic.log.
|
||||
* <br/>
|
||||
* Note: Third party logging libraries (such as log4j and Commons logging) are intentionally not
|
||||
* used. These libraries causes a lot of headache when deploying to some application servers
|
||||
|
||||
+1
-1
@@ -163,7 +163,7 @@ public class StreamController implements Controller {
|
||||
response.setContentType(StringUtil.getMimeType("ts")); // HLS is always MPEG TS.
|
||||
} else {
|
||||
String transcodedSuffix = transcodingService.getSuffix(player, file, preferredTargetFormat);
|
||||
boolean sonos = SonosHelper.SUBSONIC_CLIENT_ID.equals(player.getClientId());
|
||||
boolean sonos = SonosHelper.LIBRESONIC_CLIENT_ID.equals(player.getClientId());
|
||||
response.setContentType(StringUtil.getMimeType(transcodedSuffix, sonos));
|
||||
setContentDuration(response, file);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class PlayQueueInputStream extends InputStream {
|
||||
mediaFileService.incrementPlayCount(file);
|
||||
|
||||
// Don't scrobble REST players (except Sonos)
|
||||
if (player.getClientId() == null || player.getClientId().equals(SonosHelper.SUBSONIC_CLIENT_ID)) {
|
||||
if (player.getClientId() == null || player.getClientId().equals(SonosHelper.LIBRESONIC_CLIENT_ID)) {
|
||||
audioScrobblerService.register(file, player.getUsername(), false, null);
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public class PlayQueueInputStream extends InputStream {
|
||||
}
|
||||
} finally {
|
||||
// Don't scrobble REST players (except Sonos)
|
||||
if (player.getClientId() == null || player.getClientId().equals(SonosHelper.SUBSONIC_CLIENT_ID)) {
|
||||
if (player.getClientId() == null || player.getClientId().equals(SonosHelper.LIBRESONIC_CLIENT_ID)) {
|
||||
audioScrobblerService.register(currentFile, player.getUsername(), true, null);
|
||||
}
|
||||
currentInputStream = null;
|
||||
|
||||
@@ -76,8 +76,8 @@ import org.libresonic.player.util.Util;
|
||||
public class SettingsService {
|
||||
|
||||
// Libresonic home directory.
|
||||
private static final File SUBSONIC_HOME_WINDOWS = new File("c:/libresonic");
|
||||
private static final File SUBSONIC_HOME_OTHER = new File("/var/libresonic");
|
||||
private static final File LIBRESONIC_HOME_WINDOWS = new File("c:/libresonic");
|
||||
private static final File LIBRESONIC_HOME_OTHER = new File("/var/libresonic");
|
||||
|
||||
// Number of free trial days.
|
||||
public static final long TRIAL_DAYS = 30L;
|
||||
@@ -341,7 +341,7 @@ public class SettingsService {
|
||||
home = new File(overrideHome);
|
||||
} else {
|
||||
boolean isWindows = System.getProperty("os.name", "Windows").toLowerCase().startsWith("windows");
|
||||
home = isWindows ? SUBSONIC_HOME_WINDOWS : SUBSONIC_HOME_OTHER;
|
||||
home = isWindows ? LIBRESONIC_HOME_WINDOWS : LIBRESONIC_HOME_OTHER;
|
||||
}
|
||||
|
||||
// Attempt to create home directory if it doesn't exist.
|
||||
|
||||
@@ -246,8 +246,8 @@ public class VersionService {
|
||||
}
|
||||
|
||||
BufferedReader reader = new BufferedReader(new StringReader(content));
|
||||
Pattern finalPattern = Pattern.compile("SUBSONIC_FULL_VERSION_BEGIN(.*)SUBSONIC_FULL_VERSION_END");
|
||||
Pattern betaPattern = Pattern.compile("SUBSONIC_BETA_VERSION_BEGIN(.*)SUBSONIC_BETA_VERSION_END");
|
||||
Pattern finalPattern = Pattern.compile("LIBRESONIC_FULL_VERSION_BEGIN(.*)LIBRESONIC_FULL_VERSION_END");
|
||||
Pattern betaPattern = Pattern.compile("LIBRESONIC_BETA_VERSION_BEGIN(.*)LIBRESONIC_BETA_VERSION_END");
|
||||
|
||||
try {
|
||||
String line = reader.readLine();
|
||||
|
||||
@@ -78,7 +78,7 @@ import org.libresonic.player.util.Util;
|
||||
*/
|
||||
public class SonosHelper {
|
||||
|
||||
public static final String SUBSONIC_CLIENT_ID = "sonos";
|
||||
public static final String LIBRESONIC_CLIENT_ID = "sonos";
|
||||
|
||||
private MediaFileService mediaFileService;
|
||||
private PlaylistService playlistService;
|
||||
@@ -674,17 +674,17 @@ public class SonosHelper {
|
||||
}
|
||||
|
||||
private Player createPlayerIfNecessary(String username) {
|
||||
List<Player> players = playerService.getPlayersForUserAndClientId(username, SUBSONIC_CLIENT_ID);
|
||||
List<Player> players = playerService.getPlayersForUserAndClientId(username, LIBRESONIC_CLIENT_ID);
|
||||
|
||||
// If not found, create it.
|
||||
if (players.isEmpty()) {
|
||||
Player player = new Player();
|
||||
player.setUsername(username);
|
||||
player.setClientId(SUBSONIC_CLIENT_ID);
|
||||
player.setClientId(LIBRESONIC_CLIENT_ID);
|
||||
player.setName("Sonos");
|
||||
player.setTechnology(PlayerTechnology.EXTERNAL_WITH_PLAYLIST);
|
||||
playerService.createPlayer(player);
|
||||
players = playerService.getPlayersForUserAndClientId(username, SUBSONIC_CLIENT_ID);
|
||||
players = playerService.getPlayersForUserAndClientId(username, LIBRESONIC_CLIENT_ID);
|
||||
}
|
||||
|
||||
return players.get(0);
|
||||
|
||||
+4
-4
@@ -33,19 +33,19 @@ import junit.framework.TestCase;
|
||||
*/
|
||||
public class SettingsServiceTestCase extends TestCase {
|
||||
|
||||
private static final File SUBSONIC_HOME = new File("/tmp/libresonic");
|
||||
private static final File LIBRESONIC_HOME = new File("/tmp/libresonic");
|
||||
|
||||
private SettingsService settingsService;
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
System.setProperty("libresonic.home", SUBSONIC_HOME.getPath());
|
||||
new File(SUBSONIC_HOME, "libresonic.properties").delete();
|
||||
System.setProperty("libresonic.home", LIBRESONIC_HOME.getPath());
|
||||
new File(LIBRESONIC_HOME, "libresonic.properties").delete();
|
||||
settingsService = new SettingsService();
|
||||
}
|
||||
|
||||
public void testLibresonicHome() {
|
||||
assertEquals("Wrong Libresonic home.", SUBSONIC_HOME, SettingsService.getLibresonicHome());
|
||||
assertEquals("Wrong Libresonic home.", LIBRESONIC_HOME, SettingsService.getLibresonicHome());
|
||||
}
|
||||
|
||||
public void testDefaultValues() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
==========================================================
|
||||
SUBSONIC TRANSCODING PACK
|
||||
LIBRESONIC TRANSCODING PACK
|
||||
==========================================================
|
||||
|
||||
This is a collection of free audio codecs for Windows.
|
||||
|
||||
Reference in New Issue
Block a user