Removed chat feature

Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
master
Andrew DeMaria 8 years ago
parent 370089f3e1
commit cc0ac2e4d2
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 161
      libresonic-main/src/main/java/org/libresonic/player/ajax/ChatService.java
  2. 9
      libresonic-main/src/main/java/org/libresonic/player/command/PersonalSettingsCommand.java
  3. 2
      libresonic-main/src/main/java/org/libresonic/player/controller/IndexController.java
  4. 2
      libresonic-main/src/main/java/org/libresonic/player/controller/PersonalSettingsController.java
  5. 31
      libresonic-main/src/main/java/org/libresonic/player/controller/RESTController.java
  6. 1
      libresonic-main/src/main/java/org/libresonic/player/controller/RightController.java
  7. 5
      libresonic-main/src/main/java/org/libresonic/player/dao/UserDao.java
  8. 9
      libresonic-main/src/main/java/org/libresonic/player/domain/UserSettings.java
  9. 1
      libresonic-main/src/main/java/org/libresonic/player/service/SettingsService.java
  10. 4
      libresonic-main/src/main/resources/applicationContext-service.xml
  11. 6
      libresonic-main/src/main/resources/liquibase/6.2/changelog.xml
  12. 12
      libresonic-main/src/main/resources/liquibase/6.2/remove-show-chat.xml
  13. 1
      libresonic-main/src/main/resources/liquibase/db-changelog.xml
  14. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_bg.properties
  15. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_ca.properties
  16. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_cs.properties
  17. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_da.properties
  18. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_de.properties
  19. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_el.properties
  20. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_en.properties
  21. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_et.properties
  22. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_fi.properties
  23. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_fr.properties
  24. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_is.properties
  25. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_it.properties
  26. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_ja_JP.properties
  27. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_ko.properties
  28. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_nl.properties
  29. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_pl.properties
  30. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_pt.properties
  31. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_ru.properties
  32. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_sl.properties
  33. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_sv.properties
  34. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_zh_CN.properties
  35. 1
      libresonic-main/src/main/resources/org/libresonic/player/i18n/ResourceBundle_zh_TW.properties
  36. 6
      libresonic-main/src/main/webapp/WEB-INF/dwr.xml
  37. 2
      libresonic-main/src/main/webapp/WEB-INF/jsp/personalSettings.jsp
  38. 90
      libresonic-main/src/main/webapp/WEB-INF/jsp/right.jsp
  39. 13
      libresonic-rest-api/src/main/resources/libresonic-rest-api.xsd

@ -1,161 +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.ajax;
import org.apache.commons.lang.StringUtils;
import org.directwebremoting.WebContext;
import org.directwebremoting.WebContextFactory;
import org.libresonic.player.Logger;
import org.libresonic.player.service.SecurityService;
import org.libresonic.player.util.BoundedList;
import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.*;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/**
* Provides AJAX-enabled services for the chatting.
* This class is used by the DWR framework (http://getahead.ltd.uk/dwr/).
*
* @author Sindre Mehus
*/
public class ChatService {
private static final Logger LOG = Logger.getLogger(ChatService.class);
private static final String CACHE_KEY = "1";
private static final int MAX_MESSAGES = 10;
private static final long TTL_MILLIS = 3L * 24L * 60L * 60L * 1000L; // 3 days.
private final LinkedList<Message> messages = new BoundedList<Message>(MAX_MESSAGES);
private SecurityService securityService;
private long revision = System.identityHashCode(this);
/**
* Invoked by Spring.
*/
public void init() {
// Delete old messages every hour.
ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
Runnable runnable = new Runnable() {
public void run() {
removeOldMessages();
}
};
executor.scheduleWithFixedDelay(runnable, 0L, 3600L, TimeUnit.SECONDS);
}
private synchronized void removeOldMessages() {
long now = System.currentTimeMillis();
for (Iterator<Message> iterator = messages.iterator(); iterator.hasNext();) {
Message message = iterator.next();
if (now - message.getDate().getTime() > TTL_MILLIS) {
iterator.remove();
revision++;
}
}
}
public synchronized void addMessage(String message) {
WebContext webContext = WebContextFactory.get();
doAddMessage(message, webContext.getHttpServletRequest());
}
public synchronized void doAddMessage(String message, HttpServletRequest request) {
String user = securityService.getCurrentUsername(request);
message = StringUtils.trimToNull(message);
if (message != null && user != null) {
messages.addFirst(new Message(message, user, new Date()));
revision++;
}
}
public synchronized void clearMessages() {
messages.clear();
revision++;
}
/**
* Returns all messages, but only if the given revision is different from the
* current revision.
*/
public synchronized Messages getMessages(long revision) {
if (this.revision != revision) {
return new Messages(new ArrayList<Message>(messages), this.revision);
}
return null;
}
public void setSecurityService(SecurityService securityService) {
this.securityService = securityService;
}
public static class Messages implements Serializable {
private static final long serialVersionUID = -752602719879818165L;
private final List<Message> messages;
private final long revision;
public Messages(List<Message> messages, long revision) {
this.messages = messages;
this.revision = revision;
}
public List<Message> getMessages() {
return messages;
}
public long getRevision() {
return revision;
}
}
public static class Message implements Serializable {
private static final long serialVersionUID = -1907101191518133712L;
private final String content;
private final String username;
private final Date date;
public Message(String content, String username, Date date) {
this.content = content;
this.username = username;
this.date = date;
}
public String getContent() {
return content;
}
public String getUsername() {
return username;
}
public Date getDate() {
return date;
}
}
}

@ -44,7 +44,6 @@ public class PersonalSettingsCommand {
private UserSettings.Visibility playlistVisibility;
private boolean partyModeEnabled;
private boolean showNowPlayingEnabled;
private boolean showChatEnabled;
private boolean showArtistInfoEnabled;
private boolean nowPlayingAllowed;
private boolean autoHidePlayQueue;
@ -170,14 +169,6 @@ public class PersonalSettingsCommand {
this.showNowPlayingEnabled = showNowPlayingEnabled;
}
public boolean isShowChatEnabled() {
return showChatEnabled;
}
public void setShowChatEnabled(boolean showChatEnabled) {
this.showChatEnabled = showChatEnabled;
}
public boolean isShowArtistInfoEnabled() {
return showArtistInfoEnabled;
}

@ -32,7 +32,7 @@ public class IndexController {
UserSettings userSettings = settingsService.getUserSettings(securityService.getCurrentUsername(request));
Map<String, Object> map = new HashMap<String, Object>();
map.put("showRight", userSettings.isShowNowPlayingEnabled() || userSettings.isShowChatEnabled());
map.put("showRight", userSettings.isShowNowPlayingEnabled());
map.put("autoHidePlayQueue", userSettings.isAutoHidePlayQueue());
map.put("listReloadDelay", userSettings.getListReloadDelay());
map.put("keyboardShortcutsEnabled", userSettings.isKeyboardShortcutsEnabled());

@ -69,7 +69,6 @@ public class PersonalSettingsController {
command.setPartyModeEnabled(userSettings.isPartyModeEnabled());
command.setQueueFollowingSongs(userSettings.isQueueFollowingSongs());
command.setShowNowPlayingEnabled(userSettings.isShowNowPlayingEnabled());
command.setShowChatEnabled(userSettings.isShowChatEnabled());
command.setShowArtistInfoEnabled(userSettings.isShowArtistInfoEnabled());
command.setNowPlayingAllowed(userSettings.isNowPlayingAllowed());
command.setMainVisibility(userSettings.getMainVisibility());
@ -137,7 +136,6 @@ public class PersonalSettingsController {
settings.setPartyModeEnabled(command.isPartyModeEnabled());
settings.setQueueFollowingSongs(command.isQueueFollowingSongs());
settings.setShowNowPlayingEnabled(command.isShowNowPlayingEnabled());
settings.setShowChatEnabled(command.isShowChatEnabled());
settings.setShowArtistInfoEnabled(command.isShowArtistInfoEnabled());
settings.setNowPlayingAllowed(command.isNowPlayingAllowed());
settings.setMainVisibility(command.getMainVisibility());

@ -21,7 +21,6 @@ package org.libresonic.player.controller;
import org.apache.commons.lang.StringUtils;
import org.libresonic.player.Logger;
import org.libresonic.player.ajax.ChatService;
import org.libresonic.player.ajax.LyricsInfo;
import org.libresonic.player.ajax.LyricsService;
import org.libresonic.player.ajax.PlayQueueService;
@ -113,8 +112,6 @@ public class RESTController {
@Autowired
private PlaylistService playlistService;
@Autowired
private ChatService chatService;
@Autowired
private LyricsService lyricsService;
@Autowired
private PlayQueueService playQueueService;
@ -2186,34 +2183,6 @@ public class RESTController {
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/getChatMessages", method = {RequestMethod.GET, RequestMethod.POST})
public void getChatMessages(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
long since = getLongParameter(request, "since", 0L);
ChatMessages result = new ChatMessages();
for (ChatService.Message message : chatService.getMessages(0L).getMessages()) {
long time = message.getDate().getTime();
if (time > since) {
ChatMessage c = new ChatMessage();
result.getChatMessage().add(c);
c.setUsername(message.getUsername());
c.setTime(time);
c.setMessage(message.getContent());
}
}
Response res = createResponse();
res.setChatMessages(result);
jaxbWriter.writeResponse(request, response, res);
}
@RequestMapping(value = "/rest/addChatMessage", method = {RequestMethod.GET, RequestMethod.POST})
public void addChatMessage(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);
chatService.doAddMessage(getRequiredStringParameter(request, "message"), request);
writeEmptyResponse(request, response);
}
@RequestMapping(value = "/rest/getLyrics", method = {RequestMethod.GET, RequestMethod.POST})
public void getLyrics(HttpServletRequest request, HttpServletResponse response) throws Exception {
request = wrapRequest(request);

@ -67,7 +67,6 @@ public class RightController {
map.put("brand", settingsService.getBrand());
map.put("showNowPlaying", userSettings.isShowNowPlayingEnabled());
map.put("showChat", userSettings.isShowChatEnabled());
map.put("user", securityService.getCurrentUser(request));
result.addObject("model", map);

@ -45,7 +45,7 @@ public class UserDao extends AbstractDao {
"playlist_track_number, playlist_artist, playlist_album, playlist_genre, " +
"playlist_year, playlist_bit_rate, playlist_duration, playlist_format, playlist_file_size, " +
"last_fm_enabled, last_fm_username, last_fm_password, transcode_scheme, show_now_playing, selected_music_folder_id, " +
"party_mode_enabled, now_playing_allowed, avatar_scheme, system_avatar_id, changed, show_chat, show_artist_info, auto_hide_play_queue, " +
"party_mode_enabled, now_playing_allowed, avatar_scheme, system_avatar_id, changed, show_artist_info, auto_hide_play_queue, " +
"view_as_list, default_album_list, queue_following_songs, show_side_bar, list_reload_delay, keyboard_shortcuts_enabled";
private static final Integer ROLE_ID_ADMIN = 1;
@ -212,7 +212,7 @@ public class UserDao extends AbstractDao {
settings.getTranscodeScheme().name(), settings.isShowNowPlayingEnabled(),
settings.getSelectedMusicFolderId(), settings.isPartyModeEnabled(), settings.isNowPlayingAllowed(),
settings.getAvatarScheme().name(), settings.getSystemAvatarId(), settings.getChanged(),
settings.isShowChatEnabled(), settings.isShowArtistInfoEnabled(), settings.isAutoHidePlayQueue(),
settings.isShowArtistInfoEnabled(), settings.isAutoHidePlayQueue(),
settings.isViewAsList(), settings.getDefaultAlbumList().getId(), settings.isQueueFollowingSongs(),
settings.isShowSideBar(), settings.getListReloadDelay(), settings.isKeyboardShortcutsEnabled()});
}
@ -367,7 +367,6 @@ public class UserDao extends AbstractDao {
settings.setAvatarScheme(AvatarScheme.valueOf(rs.getString(col++)));
settings.setSystemAvatarId((Integer) rs.getObject(col++));
settings.setChanged(rs.getTimestamp(col++));
settings.setShowChatEnabled(rs.getBoolean(col++));
settings.setShowArtistInfoEnabled(rs.getBoolean(col++));
settings.setAutoHidePlayQueue(rs.getBoolean(col++));
settings.setViewAsList(rs.getBoolean(col++));

@ -33,7 +33,6 @@ public class UserSettings {
private Locale locale;
private String themeId;
private boolean showNowPlayingEnabled;
private boolean showChatEnabled;
private boolean showArtistInfoEnabled;
private boolean finalVersionNotificationEnabled;
private boolean betaVersionNotificationEnabled;
@ -94,14 +93,6 @@ public class UserSettings {
this.showNowPlayingEnabled = showNowPlayingEnabled;
}
public boolean isShowChatEnabled() {
return showChatEnabled;
}
public void setShowChatEnabled(boolean showChatEnabled) {
this.showChatEnabled = showChatEnabled;
}
public boolean isShowArtistInfoEnabled() {
return showArtistInfoEnabled;
}

@ -1123,7 +1123,6 @@ public class SettingsService {
settings.setBetaVersionNotificationEnabled(false);
settings.setSongNotificationEnabled(true);
settings.setShowNowPlayingEnabled(true);
settings.setShowChatEnabled(true);
settings.setPartyModeEnabled(false);
settings.setNowPlayingAllowed(true);
settings.setAutoHidePlayQueue(true);

@ -300,10 +300,6 @@
<bean id="ajaxTransferService" class="org.libresonic.player.ajax.TransferService"/>
<bean id="ajaxChatService" class="org.libresonic.player.ajax.ChatService" init-method="init">
<property name="securityService" ref="securityService"/>
</bean>
<bean id="localeResolver" class="org.libresonic.player.i18n.LibresonicLocaleResolver">
<property name="securityService" ref="securityService"/>
<property name="settingsService" ref="settingsService"/>

@ -0,0 +1,6 @@
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<include file="remove-show-chat.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

@ -0,0 +1,12 @@
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="remove-show-chat_001" author="muff1nman">
<preConditions onFail="MARK_RAN">
<columnExists tableName="user_settings" columnName="show_chat" />
</preConditions>
<dropColumn tableName="user_settings" columnName="show_chat" />
<rollback changeSetId="schema38_003" changeSetPath="classpath:liquibase/legacy/schema38.xml" changeSetAuthor="muff1nman"/>
</changeSet>
</databaseChangeLog>

@ -8,4 +8,5 @@
<property name="varchar_type" dbms="mysql" value="varchar(${varcharLimit})" />
<property name="varchar_type" value="varchar" />
<include file="legacy/legacy-changelog.xml" relativeToChangelogFile="true"/>
<include file="6.2/changelog.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>

@ -277,7 +277,6 @@ personalsettings.captioncutoff = \u0417\u0430\u0433\u043B\u0430\u0432\u0438\u044
personalsettings.partymode = \u041E\u043B\u0435\u043A\u043E\u0442\u0435\u043D \u0440\u0435\u0436\u0438\u043C
personalsettings.shownowplaying = \u041F\u043E\u043A\u0430\u0437\u0432\u0430\u0439 \u043A\u0430\u043A\u0432\u043E \u0441\u043B\u0443\u0448\u0430\u0442 \u0434\u0440\u0443\u0433\u0438\u0442\u0435
personalsettings.nowplayingallowed = \u0420\u0430\u0437\u0440\u0435\u0448\u0438 \u043D\u0430 \u043E\u0441\u0442\u0430\u043D\u0430\u043B\u0438\u0442\u0435 \u0434\u0430 \u0432\u0438\u0436\u0434\u0430\u0442 \u043A\u0430\u043A\u0432\u043E \u0441\u043B\u0443\u0448\u0430\u043C \u0430\u0437
personalsettings.showchat = \u041F\u043E\u043A\u0430\u0437\u0432\u0430\u0439 \u0447\u0430\u0442 \u0441\u044A\u043E\u0431\u0449\u0435\u043D\u0438\u044F
personalsettings.finalversionnotification = \u0423\u0432\u0435\u0434\u043E\u043C\u044F\u0432\u0430\u0439 \u043C\u0435 \u0437\u0430 \u043D\u043E\u0432\u0438 \u0432\u0435\u0440\u0441\u0438\u0438
personalsettings.betaversionnotification = \u0423\u0432\u0435\u0434\u043E\u043C\u044F\u0432\u0430\u0439 \u043C\u0435 \u0437\u0430 \u043D\u043E\u0432\u0438 \u0431\u0435\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u0438
personalsettings.lastfmenabled = \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0430\u0439 \u0442\u043E\u0432\u0430, \u043A\u043E\u0435\u0442\u043E \u0441\u043B\u0443\u0448\u0430\u043C \u0432 <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -297,7 +297,6 @@ personalsettings.captioncutoff = Car\u00E0cters visibles
personalsettings.partymode = Mode Festa
personalsettings.shownowplaying = Mostrar el que altres escolten
personalsettings.nowplayingallowed = Permetre als altres veure el que escolto
personalsettings.showchat = Motrar els missatges del Xat
personalsettings.finalversionnotification = Notifica'm sobre noves versions
personalsettings.betaversionnotification = Notifica'm sobre noves versions beta
personalsettings.lastfmenabled = Registrar el que estic reproduint a <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -350,7 +350,6 @@ personalsettings.captioncutoff = Zkr\u00E1cen\u00ED titulku
personalsettings.partymode = Zjednodu\u0161en\u00E9 rozhran\u00ED
personalsettings.shownowplaying = Uk\u00E1zat, co p\u0159ehr\u00E1vaj\u00ED ostatn\u00ED
personalsettings.nowplayingallowed = Uk\u00E1zat ostatn\u00EDm, co p\u0159ehr\u00E1v\u00E1m j\u00E1
personalsettings.showchat = Zobrazit zpr\u00E1vy chatu
personalsettings.finalversionnotification = Upozornit m\u011B na nov\u00E9 verze
personalsettings.betaversionnotification = Upozornit m\u011B na nov\u00E9 betaverze
personalsettings.lastfmenabled = Informovat <a href="http://last.fm/" target="_blank">Last.fm</a> o tom, co p\u0159ehr\u00E1v\u00E1m

@ -252,7 +252,6 @@ personalsettings.shownowplaying = Vis hvad andre spiller
personalsettings.nowplayingallowed = Lad andre se, hvad jeg spiller
personalsettings.finalversionnotification = Advis\u00E9r mig om nye versioner
personalsettings.betaversionnotification = Advis\u00E9r mig om nye beta-versioner
personalsettings.showchat = Vis chat meddelelse
personalsettings.lastfmenabled = Registrer hvad jeg spiller p\u00E5 <a href="http://last.fm/" target="_blank"> Last.fm </a>
personalsettings.lastfmusername = Last.fm brugernavn
personalsettings.lastfmpassword = Last.fm adgangskode

@ -347,7 +347,6 @@ personalsettings.partymode = Party Modus
personalsettings.queuefollowingsongs = Nachfolgende Songs beim abspielen in der Warteschlange einreihen
personalsettings.shownowplaying = Zeige was andere h\u00F6ren
personalsettings.nowplayingallowed = Zeige anderen was ich h\u00F6re
personalsettings.showchat = Zeige Chat Nachrichten
personalsettings.showartistinfo = Zeige Artisten-Info
personalsettings.autohideplayqueue = Playlist automatisch ausblenden
personalsettings.keyboardshortcutsenabled = Tastaturk\u00FCrzeln aktivieren

@ -276,7 +276,6 @@ personalsettings.captioncutoff = \u0391\u03C0\u03BF\u03BA\u03BF\u03C0\u03AE \u03
personalsettings.partymode = \u039B\u03B5\u03B9\u03C4\u03BF\u03C5\u03C1\u03B3\u03AF\u03B1 \u03A0\u03AC\u03C1\u03C4\u03B9
personalsettings.shownowplaying = \u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03C4\u03BF\u03C5 \u03C4\u03B9 \u03B1\u03BA\u03BF\u03CD\u03BD \u03BF\u03B9 \u03AC\u03BB\u03BB\u03BF\u03B9
personalsettings.nowplayingallowed = \u039D\u03B1 \u03BC\u03C0\u03BF\u03C1\u03BF\u03CD\u03BD \u03BD\u03B1 \u03B2\u03BB\u03AD\u03C0\u03BF\u03C5\u03BD \u03BF\u03B9 \u03AC\u03BB\u03BB\u03BF\u03B9 \u03C4\u03B9 \u03B1\u03BA\u03BF\u03CD\u03C9
personalsettings.showchat = \u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE \u03BC\u03B7\u03BD\u03C5\u03BC\u03AC\u03C4\u03C9\u03BD chat
personalsettings.finalversionnotification = \u039D\u03B1 \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03B9\u03BF\u03CD\u03BC\u03B1\u03B9 \u03B3\u03B9\u03B1 \u03BA\u03B1\u03B9\u03BD\u03BF\u03CD\u03C1\u03B9\u03B5\u03C2 \u03B5\u03BA\u03B4\u03CC\u03C3\u03B5\u03B9\u03C2
personalsettings.betaversionnotification = \u039D\u03B1 \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03B9\u03BF\u03CD\u03BC\u03B1\u03B9 \u03B3\u03B9\u03B1 \u03BA\u03B1\u03B9\u03BD\u03BF\u03CD\u03C1\u03B9\u03B5\u03C2 \u03B5\u03BA\u03B4\u03CC\u03C3\u03B5\u03B9\u03C2 beta
personalsettings.lastfmenabled = \u039A\u03B1\u03C4\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03C4\u03BF \u03C4\u03AF \u03B1\u03BA\u03BF\u03CD\u03C9 \u03C3\u03C4\u03BF <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -403,7 +403,6 @@ personalsettings.partymode = Party mode
personalsettings.queuefollowingsongs = Queue following songs on play
personalsettings.shownowplaying = Show what others are playing
personalsettings.nowplayingallowed = Let others see what I am playing
personalsettings.showchat = Show chat messages
personalsettings.showartistinfo = Show artist info
personalsettings.autohideplayqueue = Auto-hide play queue
personalsettings.keyboardshortcutsenabled = Enable keyboard shortcuts

@ -347,7 +347,6 @@ personalsettings.captioncutoff = Märkuse väljalülitus
personalsettings.partymode = Peomeeleolu
personalsettings.shownowplaying = Kuva, mida teised kuulavad
personalsettings.nowplayingallowed = Luba teistel näha, mida ma kuulan
personalsettings.showchat = Kuva vestlusakna teateid
personalsettings.finalversionnotification = Uute versioonide väljastamisest teavita mind
personalsettings.betaversionnotification = Uute Beta-versioonide väljastamisest teavita mind
personalsettings.songnotification = Teavita mind, kui lugu vahetub (kõik veebilehitsejad ei toeta seda)

@ -263,7 +263,6 @@ personalsettings.captioncutoff = Kansikuvan esikatselukuva
personalsettings.partymode = Party mode toiminto
personalsettings.shownowplaying = N\u00E4yt\u00E4 mit\u00E4 muut kuuntelevat
personalsettings.nowplayingallowed = Anna muiden n\u00E4hd\u00E4 mit\u00E4 min\u00E4 kuuntelen
personalsettings.showchat = N\u00E4yt\u00E4 chat-viestit
personalsettings.finalversionnotification = Ilmoita uudesta ohjelmaversiosta
personalsettings.betaversionnotification = Ilmoita uudesta ohjelman beetta versiosta
personalsettings.lastfmenabled = Rekister\u00F6i mit\u00E4 kuuntelen <a href="http://last.fm/" target="_blank">Last.fm-palveluun</a>

@ -330,7 +330,6 @@ personalsettings.captioncutoff = Cacher la l\u00E9gende
personalsettings.partymode = Party mode
personalsettings.shownowplaying = Voir ce que les autres utilisateurs \u00E9coutent
personalsettings.nowplayingallowed = Montrer aux autres ce que j'\u00E9coute
personalsettings.showchat = Voir les messages du chat
personalsettings.finalversionnotification = Me notifier les nouvelles versions
personalsettings.betaversionnotification = Me notifier les nouvelles versions beta
personalsettings.lastfmenabled = Enregistrer ce que j'\u00E9coute sur <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -243,7 +243,6 @@ personalsettings.captioncutoff = Titill Kliptaf
personalsettings.partymode = Part\u00FD M\u00F3t
personalsettings.shownowplaying = S\u00EDna hva\u00F0 a\u00F0rir eru a\u00F0 Spila
personalsettings.nowplayingallowed = Leifa \u00D6\u00F0rum a\u00F0 sj\u00E1 hva\u00F0 \u00E9g er a\u00F0 Spila
personalsettings.showchat = S\u00EDna Spjall Skilabo\u00F0
personalsettings.finalversionnotification = L\u00E1ta mig vita af N\u00FDjum Uppf\u00E6rslum
personalsettings.betaversionnotification = L\u00E1ta mig vita af Prufui \u00DAtg\u00E1fum
personalsettings.lastfmenabled = Skr\u00E1 \u00C9g Er A\u00F0 Spila \u00C1 <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -274,7 +274,6 @@ personalsettings.captioncutoff = Limite del titolo
personalsettings.partymode = Modalit\u00E0 party
personalsettings.shownowplaying = Mostra chi altro \u00E8 attivo
personalsettings.nowplayingallowed = Permetti agli altri di vedere quando sono attivo
personalsettings.showchat = Visualizza messaggi della chat
personalsettings.finalversionnotification = Notificami nuove versioni
personalsettings.betaversionnotification = Notificami nuove versioni beta
personalsettings.lastfmenabled = Registra quello che sto ascoltando su <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -363,7 +363,6 @@ personalsettings.captioncutoff = \u9577\u3044\u30BF\u30A4\u30C8\u30EB\u3092\u770
personalsettings.partymode = \u30D1\u30FC\u30C6\u30A3\u30FC\u30E2\u30FC\u30C9
personalsettings.shownowplaying = \u4ED6\u4EBA\u306E\u518D\u751F\u4E2D\u306E\u66F2\u3092\u8868\u793A
personalsettings.nowplayingallowed = \u4ED6\u4EBA\u306B\u81EA\u5206\u304C\u518D\u751F\u4E2D\u306E\u66F2\u3092\u898B\u305B\u308B
personalsettings.showchat = \u30C1\u30E3\u30C3\u30C8\u3092\u8868\u793A
personalsettings.finalversionnotification = \u65B0\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u901A\u77E5
personalsettings.betaversionnotification = \u65B0\u3057\u3044\u30D9\u30FC\u30BF\u7248\u3092\u901A\u77E5
personalsettings.lastfmenabled = \u518D\u751F\u4E2D\u306E\u66F2\u3092 <a href="http://last.fm/" target="_blank">Last.fm</a> \u306B\u767B\u9332

@ -346,7 +346,6 @@ personalsettings.captioncutoff = \uC81C\uBAA9\uD45C\uC2DC \uAE38\uC774
personalsettings.partymode = \uD30C\uD2F0\uBAA8\uB4DC
personalsettings.shownowplaying = \uB2E4\uB978\uC0AC\uB78C\uC774 \uAC10\uC0C1\uD558\uB294 \uB178\uB798 \uC815\uBCF4\uB97C \uBCFC \uC218 \uC788\uC74C
personalsettings.nowplayingallowed = \uB2E4\uB978 \uC0AC\uB78C\uC774 \uB0B4\uAC00 \uAC10\uC0C1\uD558\uB294 \uB178\uB798 \uC815\uBCF4\uB97C \uBCFC \uC218 \uC788\uC74C
personalsettings.showchat = \uCC44\uD305 \uBA54\uC2DC\uC9C0 \uBCF4\uC774\uAE30
personalsettings.finalversionnotification = \uC0C8\uB85C\uC6B4 \uBC84\uC804(\uC548\uC815)\uC774 \uB098\uC624\uBA74 \uB098\uC5D0\uAC8C \uC54C\uB9BC
personalsettings.betaversionnotification = \uC0C8\uB85C\uC6B4 \uBC84\uC804(\uBCA0\uD0C0)\uC774 \uB098\uC624\uBA74 \uB098\uC5D0\uAC8C \uC54C\uB9BC
personalsettings.lastfmenabled = \uB0B4\uAC00 \uAC10\uC0C1\uD558\uB294 \uB178\uB798\uB97C <a href="http://last.fm/" target="_blank">Last.fm</a> \uC5D0 \uB4F1\uB85D\uD558\uAE30

@ -356,7 +356,6 @@ personalsettings.captioncutoff = Opschrift afsnijden
personalsettings.partymode = Party mode
personalsettings.shownowplaying = Toon wat anderen spelen
personalsettings.nowplayingallowed = Toon anderen wat ik speel
personalsettings.showchat = Toon chat berichten
personalsettings.finalversionnotification = Informeer me over nieuwe versies
personalsettings.betaversionnotification = Informeer me over nieuwe Beta-versies
personalsettings.lastfmenabled = Registreer wat ik afspeel op <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -279,7 +279,6 @@ personalsettings.captioncutoff = Skr\u00F3cenie podpisu
personalsettings.partymode = Tryb imprezy
personalsettings.shownowplaying = Poka\u017C co odtwarzaj\u0105 inni
personalsettings.nowplayingallowed = Pozw\u00F3l innym widzie\u0107 co odtwarzam
personalsettings.showchat = Poka\u017C wiadomo\u015Bci chat
personalsettings.finalversionnotification = Powiadom mnie o nowej wersji
personalsettings.betaversionnotification = Powiadom mnie o nowej beta wersji
personalsettings.lastfmenabled = Rejestuj co odtwarzam na <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -273,7 +273,6 @@ personalsettings.captioncutoff = Caracteres visualiz\u00E1veis
personalsettings.partymode = Modo festa
personalsettings.shownowplaying = Mostra o que os outros est\u00E3o a ouvir
personalsettings.nowplayingallowed = Deixar os outros ver o que eu estou a ouvir
personalsettings.showchat = Mostrar mensagens de chat
personalsettings.finalversionnotification = Notifique-me sobre novas vers\u00F5es
personalsettings.betaversionnotification = Notifique-me sobre novas vers\u00F5es beta
personalsettings.lastfmenabled = Registar o que estou a ouvir no <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -261,7 +261,6 @@ personalsettings.captioncutoff = \u0414\u043B\u0438\u043D\u0430
personalsettings.partymode = \u0423\u043F\u0440\u043E\u0449\u0435\u043D\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C
personalsettings.shownowplaying = \u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0447\u0442\u043E \u0441\u043B\u0443\u0448\u0430\u044E\u0442 \u0434\u0440\u0443\u0433\u0438\u0435
personalsettings.nowplayingallowed = \u041F\u043E\u0437\u0432\u043E\u043B\u0438\u0442\u044C \u0434\u0440\u0443\u0433\u0438\u043C \u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0447\u0442\u043E \u044F \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043B\u0443\u0448\u0430\u044E
personalsettings.showchat = \u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0447\u0430\u0442\u0430
personalsettings.finalversionnotification = \u0421\u043E\u043E\u0431\u0449\u0430\u0442\u044C \u043E \u043D\u043E\u0432\u044B\u0445 \u0432\u0435\u0440\u0441\u0438\u044F\u0445
personalsettings.betaversionnotification = \u0421\u043E\u043E\u0431\u0449\u0430\u0442\u044C \u043E \u043D\u043E\u0432\u044B\u0445 \u0431\u0435\u0442\u0430-\u0432\u0435\u0440\u0441\u0438\u044F\u0445
personalsettings.lastfmenabled = \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0447\u0442\u043E \u044F \u0441\u043B\u0443\u0448\u0430\u044E \u043D\u0430 <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -332,7 +332,6 @@ personalsettings.captioncutoff = \u0160tevilo prikazanih znakov
personalsettings.partymode = Na\u010Din "zabava"
personalsettings.shownowplaying = Poka\u017Ei, kaj poslu\u0161ajo drugi
personalsettings.nowplayingallowed = Naj drugi vidijo, kaj poslu\u0161am
personalsettings.showchat = Poka\u017Ei sporo\u010Dila iz klepeta
personalsettings.finalversionnotification = Obvesti me o novih razli\u010Dicah
personalsettings.betaversionnotification = Obvesti me o novih beta razli\u010Dicah
personalsettings.lastfmenabled = Zabele\u017Ei, kaj poslu\u0161am, na <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -278,7 +278,6 @@ personalsettings.captioncutoff = Max tecken
personalsettings.partymode = Partyl\u00E4ge
personalsettings.shownowplaying = Visa vad andra anv\u00E4ndare spelar
personalsettings.nowplayingallowed = L\u00E5t andra se vad jag spelar
personalsettings.showchat = Visa chatmeddelanden
personalsettings.finalversionnotification = Meddela om nya versioner
personalsettings.betaversionnotification = Meddela om nya beta versioner
personalsettings.lastfmenabled = Registrera vad jag spelar hos <a href="http://last.fm/" target="_blank">Last.fm</a>

@ -333,7 +333,6 @@ personalsettings.captioncutoff = \u5B57\u7B26\u622A\u53D6
personalsettings.partymode = \u6D3E\u5BF9\u6A21\u5F0F
personalsettings.shownowplaying = \u5176\u4ED6\u4EBA\u5728\u542C\u4EC0\u4E48
personalsettings.nowplayingallowed = \u6B63\u5728\u64AD\u653E\u522B\u4EBA\u8BFE\u4EF6
personalsettings.showchat = \u663E\u793A\u804A\u5929
personalsettings.finalversionnotification = \u63D0\u793A\u65B0\u7248\u672C
personalsettings.betaversionnotification = \u63D0\u793A\u65B0\u7684\u6D4B\u8BD5\u7248
personalsettings.lastfmenabled = \u767B\u5F55 <a href="http://last.fm/" target="_blank">Last.fm</a>\u7684\u5E10\u53F7

@ -362,7 +362,6 @@ personalsettings.partymode = \u5BB4\u6703\u6A21\u5F0F
personalsettings.queuefollowingsongs = Queue following songs on play
personalsettings.shownowplaying = \u5176\u4ED6\u4EBA\u5728\u807D\u4EC0\u9EBC
personalsettings.nowplayingallowed = \u8B93\u5225\u4EBA\u770B\u6211\u5728\u807D\u4EC0\u9EBC
personalsettings.showchat = \u986F\u793A\u4EA4\u8AC7\u8A0A\u606F
personalsettings.showartistinfo = \u986F\u793A\u6B4C\u624B\u8CC7\u8A0A
personalsettings.autohideplayqueue = \u81EA\u52D5\u96B1\u85CF\u64AD\u653E\u4F47\u5217
personalsettings.finalversionnotification = \u63D0\u793A\u65B0\u7248\u672C

@ -40,10 +40,6 @@
<param name="beanName" value="ajaxTransferService"/>
</create>
<create creator="spring" javascript="chatService">
<param name="beanName" value="ajaxChatService"/>
</create>
<convert converter="bean" match="org.libresonic.player.ajax.NetworkStatus"/>
<convert converter="bean" match="org.libresonic.player.ajax.NowPlayingInfo"/>
<convert converter="bean" match="org.libresonic.player.ajax.ScanInfo"/>
@ -58,8 +54,6 @@
<convert converter="bean" match="org.libresonic.player.ajax.UploadInfo"/>
<convert converter="bean" match="org.libresonic.player.ajax.LyricsInfo"/>
<convert converter="bean" match="org.libresonic.player.ajax.CoverArtInfo"/>
<convert converter="bean" match="org.libresonic.player.ajax.ChatService$Message"/>
<convert converter="bean" match="org.libresonic.player.ajax.ChatService$Messages"/>
<convert converter="bean" match="org.libresonic.player.ajax.SimilarArtist"/>
<convert converter="bean" match="org.libresonic.player.ajax.ArtistInfo"/>
<convert converter="bean" match="org.libresonic.player.ajax.TopSong"/>

@ -132,8 +132,6 @@
<tr>
<td><form:checkbox path="showNowPlayingEnabled" id="nowPlaying" cssClass="checkbox"/></td>
<td><label for="nowPlaying"><fmt:message key="personalsettings.shownowplaying"/></label></td>
<td style="padding-left:2em"><form:checkbox path="showChatEnabled" id="chat" cssClass="checkbox"/></td>
<td><label for="chat"><fmt:message key="personalsettings.showchat"/></label></td>
<td style="padding-left:2em"><form:checkbox path="showArtistInfoEnabled" id="artistInfo" cssClass="checkbox"/></td>
<td><label for="artistInfo"><fmt:message key="personalsettings.showartistinfo"/></label></td>
</tr>

@ -6,30 +6,20 @@
<%@ include file="jquery.jsp" %>
<script type="text/javascript" src="<c:url value="/dwr/engine.js"/>"></script>
<script type="text/javascript" src="<c:url value="/dwr/util.js"/>"></script>
<script type="text/javascript" src="<c:url value="/dwr/interface/chatService.js"/>"></script>
<script type="text/javascript" src="<c:url value="/dwr/interface/nowPlayingService.js"/>"></script>
<script type="text/javascript" src="<c:url value="/script/scripts-2.0.js"/>"></script>
<script type="text/javascript">
var chatRevision = 0;
function init() {
dwr.engine.setErrorHandler(null);
startGetScanningStatusTimer();
<c:if test="${model.showChat}">
chatService.addMessage(null);
</c:if>
<c:if test="${model.showNowPlaying}">
startGetNowPlayingTimer();
</c:if>
<c:if test="${model.showChat}">
startGetMessagesTimer();
</c:if>
}
function startGetNowPlayingTimer() {
@ -73,67 +63,6 @@
$("#nowPlaying").html(html);
}
function startGetMessagesTimer() {
chatService.getMessages(chatRevision, getMessagesCallback);
setTimeout("startGetMessagesTimer()", 10000);
}
function addMessage() {
chatService.addMessage($("#message").val());
$("#message").val(null);
setTimeout("startGetMessagesTimer()", 500);
}
function clearMessages() {
chatService.clearMessages();
setTimeout("startGetMessagesTimer()", 500);
}
function getMessagesCallback(messages) {
if (messages == null) {
return;
}
chatRevision = messages.revision;
// Delete all the rows except for the "pattern" row
dwr.util.removeAllRows("chatlog", { filter:function(div) {
return (div.id != "pattern");
}});
// Create a new set cloned from the pattern row
for (var i = 0; i < messages.messages.length; i++) {
var message = messages.messages[i];
var id = i + 1;
dwr.util.cloneNode("pattern", { idSuffix:id });
$("#user" + id).text(message.username);
$("#date" + id).text(" [" + formatDate(message.date) + "]");
$("#content" + id).text(message.content);
$("#pattern" + id).show();
}
var clearDiv = $("#clearDiv");
if (clearDiv) {
if (messages.messages.length == 0) {
clearDiv.hide();
} else {
clearDiv.show();
}
}
}
function formatDate(date) {
var hours = date.getHours();
var minutes = date.getMinutes();
var result = hours < 10 ? "0" : "";
result += hours;
result += ":";
if (minutes < 10) {
result += "0";
}
result += minutes;
return result;
}
function startGetScanningStatusTimer() {
nowPlayingService.getScanningStatus(getScanningStatusCallback);
}
@ -165,24 +94,5 @@
<div id="nowPlaying"></div>
<c:if test="${model.showChat}">
<h2><fmt:message key="main.chat"/></h2>
<div style="padding-top:0.3em;padding-bottom:0.3em">
<input type="text" id="message" placeholder="<fmt:message key="main.message"/>" style="width:100%" onkeypress="dwr.util.onReturn(event, addMessage)"/>
</div>
<table>
<tbody id="chatlog">
<tr id="pattern" style="display:none;margin:0;padding:0 0 0.15em 0;border:0"><td>
<span id="user" class="detail" style="font-weight:bold"></span>&nbsp;<span id="date" class="detail"></span> <span id="content"></span></td>
</tr>
</tbody>
</table>
<c:if test="${model.user.adminRole}">
<div id="clearDiv" style="display:none;" class="forward"><a href="javascript:clearMessages()"> <fmt:message key="main.clearchat"/></a></div>
</c:if>
</c:if>
</body>
</html>

@ -30,7 +30,6 @@
<xs:element name="license" type="sub:License" minOccurs="1" maxOccurs="1"/>
<xs:element name="users" type="sub:Users" minOccurs="1" maxOccurs="1"/>
<xs:element name="user" type="sub:User" minOccurs="1" maxOccurs="1"/>
<xs:element name="chatMessages" type="sub:ChatMessages" minOccurs="1" maxOccurs="1"/>
<xs:element name="albumList" type="sub:AlbumList" minOccurs="1" maxOccurs="1"/>
<xs:element name="albumList2" type="sub:AlbumList2" minOccurs="1" maxOccurs="1"/>
<xs:element name="randomSongs" type="sub:Songs" minOccurs="1" maxOccurs="1"/>
@ -336,18 +335,6 @@
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ChatMessages">
<xs:sequence>
<xs:element name="chatMessage" type="sub:ChatMessage" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ChatMessage">
<xs:attribute name="username" type="xs:string" use="required"/>
<xs:attribute name="time" type="xs:long" use="required"/>
<xs:attribute name="message" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="AlbumList">
<xs:sequence>
<xs:element name="album" type="sub:Child" minOccurs="0" maxOccurs="unbounded"/>

Loading…
Cancel
Save