Skip to content

Commit

Permalink
Merge pull request #410 from kagemomiji/issue404-fix-player-selection…
Browse files Browse the repository at this point in the history
…-problem

#404 fix player selection problem and foreign char problems
  • Loading branch information
kagemomiji authored Apr 9, 2024
2 parents afc37e8 + 6f46323 commit e0c01ef
Show file tree
Hide file tree
Showing 5 changed files with 1,419 additions and 1,403 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package org.airsonic.player.controller;

import org.airsonic.player.domain.User;
import org.airsonic.player.domain.UserSettings;
import org.airsonic.player.service.PersonalSettingsService;
import org.airsonic.player.service.PlayerService;
import org.airsonic.player.service.SecurityService;
import org.airsonic.player.service.SettingsService;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -25,10 +27,13 @@ public class IndexController {
private SettingsService settingsService;
@Autowired
private PersonalSettingsService personalSettingsService;
@Autowired
private PlayerService playerService;

@GetMapping
public ModelAndView index(HttpServletRequest request) {
UserSettings userSettings = personalSettingsService.getUserSettings(securityService.getCurrentUsername(request));
User user = securityService.getCurrentUser(request);
UserSettings userSettings = personalSettingsService.getUserSettings(user.getUsername());

Map<String, Object> map = new HashMap<String, Object>();
map.put("showRight", userSettings.getShowNowPlayingEnabled());
Expand All @@ -46,6 +51,9 @@ public ModelAndView index(HttpServletRequest request) {
map.put("autoBookmark", userSettings.getAutoBookmark());
map.put("audioBookmarkFrequency", userSettings.getAudioBookmarkFrequency());

// add player info
map.put("user", user);
map.put("players", playerService.getPlayersForUserAndClientId(user.getUsername(), null));

return new ModelAndView("index", "model", map);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ personalsettings.browse=Gennemse
personalsettings.files=Filer
personalsettings.folders=Mapper
personalsettings.playlist=Spilleliste
personalsettings.playqueue=Afspil k&oslash;
personalsettings.playqueue=Afspil k\u00F8
personalsettings.header=Overskrift
personalsettings.tracknumber=Track #
personalsettings.discnumber=Disk #
Expand All @@ -436,7 +436,7 @@ personalsettings.playcount=Antal afspilninger
personalsettings.lastplayed=Sidst Spillet
personalsettings.lastscanned=Sidst Scannet
personalsettings.created=Oprettet
personalsettings.changed=&AElig;ndret
personalsettings.changed=\u00C6ndret
personalsettings.entrytype=Indgangstype
personalsettings.partymode=Fest indstilling
personalsettings.queuefollowingsongs=Forts\u00E6t efter sangen er spillet
Expand Down
Loading

0 comments on commit e0c01ef

Please sign in to comment.