Rename libresonic -> airsonic
Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
/*
|
||||
* This file is part of Libresonic.
|
||||
* This file is part of Airsonic.
|
||||
*
|
||||
* Libresonic is free software: you can redistribute it and/or modify
|
||||
* Airsonic 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,
|
||||
* Airsonic 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/>.
|
||||
* along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright 2014 (C) Sindre Mehus
|
||||
*/
|
||||
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.libresonic.player.domain.ArtistBio;
|
||||
import org.airsonic.player.domain.ArtistBio;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
/**
|
||||
* Contains info about cover art images for an album.
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.airsonic.player.domain.LastFmCoverArt;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.service.LastFmService;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.libresonic.player.domain.LastFmCoverArt;
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.service.LastFmService;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
/**
|
||||
* Contains lyrics info for a song.
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.http.client.ResponseHandler;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
@@ -30,7 +31,6 @@ import org.jdom.Document;
|
||||
import org.jdom.Element;
|
||||
import org.jdom.Namespace;
|
||||
import org.jdom.input.SAXBuilder;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.airsonic.player.domain.ArtistBio;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.domain.MusicFolder;
|
||||
import org.airsonic.player.domain.UserSettings;
|
||||
import org.airsonic.player.service.LastFmService;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.directwebremoting.WebContextFactory;
|
||||
import org.libresonic.player.domain.ArtistBio;
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.domain.MusicFolder;
|
||||
import org.libresonic.player.domain.UserSettings;
|
||||
import org.libresonic.player.service.LastFmService;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
/**
|
||||
* Details about what a user is currently listening to.
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.directwebremoting.WebContext;
|
||||
import org.directwebremoting.WebContextFactory;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.airsonic.player.dao.MediaFileDao;
|
||||
import org.airsonic.player.dao.PlayQueueDao;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.airsonic.player.service.PlaylistService;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.directwebremoting.WebContextFactory;
|
||||
import org.libresonic.player.dao.MediaFileDao;
|
||||
import org.libresonic.player.dao.PlayQueueDao;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.libresonic.player.service.PlaylistService;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -54,7 +54,7 @@ public class PlayQueueService {
|
||||
private SearchService searchService;
|
||||
private RatingService ratingService;
|
||||
private PodcastService podcastService;
|
||||
private org.libresonic.player.service.PlaylistService playlistService;
|
||||
private PlaylistService playlistService;
|
||||
private MediaFileDao mediaFileDao;
|
||||
private PlayQueueDao playQueueDao;
|
||||
private JWTSecurityService jwtSecurityService;
|
||||
@@ -146,7 +146,7 @@ public class PlayQueueService {
|
||||
List<Integer> ids = MediaFile.toIdList(playQueue.getFiles());
|
||||
|
||||
Integer currentId = currentSongIndex == -1 ? null : playQueue.getFile(currentSongIndex).getId();
|
||||
SavedPlayQueue savedPlayQueue = new SavedPlayQueue(null, username, ids, currentId, positionMillis, new Date(), "Libresonic");
|
||||
SavedPlayQueue savedPlayQueue = new SavedPlayQueue(null, username, ids, currentId, positionMillis, new Date(), "Airsonic");
|
||||
playQueueDao.savePlayQueue(savedPlayQueue);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.libresonic.player.domain.Playlist;
|
||||
import org.airsonic.player.domain.Playlist;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.airsonic.player.dao.MediaFileDao;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.domain.MusicFolder;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.domain.Playlist;
|
||||
import org.airsonic.player.i18n.LocaleResolver;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.PlayerService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.directwebremoting.WebContextFactory;
|
||||
import org.libresonic.player.dao.MediaFileDao;
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.domain.MusicFolder;
|
||||
import org.libresonic.player.domain.Player;
|
||||
import org.libresonic.player.domain.Playlist;
|
||||
import org.libresonic.player.i18n.LibresonicLocaleResolver;
|
||||
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 javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -47,11 +47,11 @@ public class PlaylistService {
|
||||
|
||||
private MediaFileService mediaFileService;
|
||||
private SecurityService securityService;
|
||||
private org.libresonic.player.service.PlaylistService playlistService;
|
||||
private org.airsonic.player.service.PlaylistService playlistService;
|
||||
private MediaFileDao mediaFileDao;
|
||||
private SettingsService settingsService;
|
||||
private PlayerService playerService;
|
||||
private LibresonicLocaleResolver localeResolver;
|
||||
private LocaleResolver localeResolver;
|
||||
|
||||
public List<Playlist> getReadablePlaylists() {
|
||||
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
|
||||
@@ -136,7 +136,7 @@ public class PlaylistService {
|
||||
playlist.setChanged(now);
|
||||
playlist.setShared(false);
|
||||
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("org.libresonic.player.i18n.ResourceBundle", locale);
|
||||
ResourceBundle bundle = ResourceBundle.getBundle("org.airsonic.player.i18n.ResourceBundle", locale);
|
||||
playlist.setName(bundle.getString("top.starred") + " " + dateFormat.format(now));
|
||||
|
||||
playlistService.createPlaylist(playlist);
|
||||
@@ -233,7 +233,7 @@ public class PlaylistService {
|
||||
return getPlaylist(id);
|
||||
}
|
||||
|
||||
public void setPlaylistService(org.libresonic.player.service.PlaylistService playlistService) {
|
||||
public void setPlaylistService(org.airsonic.player.service.PlaylistService playlistService) {
|
||||
this.playlistService = playlistService;
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ public class PlaylistService {
|
||||
this.playerService = playerService;
|
||||
}
|
||||
|
||||
public void setLocaleResolver(LibresonicLocaleResolver localeResolver) {
|
||||
public void setLocaleResolver(LocaleResolver localeResolver) {
|
||||
this.localeResolver = localeResolver;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
/**
|
||||
* Media folder scanning status.
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/*
|
||||
* This file is part of Libresonic.
|
||||
* This file is part of Airsonic.
|
||||
*
|
||||
* Libresonic is free software: you can redistribute it and/or modify
|
||||
* Airsonic 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,
|
||||
* Airsonic 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/>.
|
||||
* along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright 2014 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
/**
|
||||
* Contains info about a similar artist.
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.airsonic.player.dao.MediaFileDao;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.directwebremoting.WebContext;
|
||||
import org.directwebremoting.WebContextFactory;
|
||||
import org.libresonic.player.dao.MediaFileDao;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.metadata.MetaData;
|
||||
import org.airsonic.player.service.metadata.MetaDataParser;
|
||||
import org.airsonic.player.service.metadata.MetaDataParserFactory;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.lang.ObjectUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.libresonic.player.service.metadata.MetaData;
|
||||
import org.libresonic.player.service.metadata.MetaDataParser;
|
||||
import org.libresonic.player.service.metadata.MetaDataParserFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/*
|
||||
* This file is part of Libresonic.
|
||||
* This file is part of Airsonic.
|
||||
*
|
||||
* Libresonic is free software: you can redistribute it and/or modify
|
||||
* Airsonic 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,
|
||||
* Airsonic 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/>.
|
||||
* along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright 2015 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
/**
|
||||
* See {@link ArtistInfo}.
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
import org.airsonic.player.controller.UploadController;
|
||||
import org.airsonic.player.domain.TransferStatus;
|
||||
import org.directwebremoting.WebContextFactory;
|
||||
import org.libresonic.player.controller.UploadController;
|
||||
import org.libresonic.player.domain.TransferStatus;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.ajax;
|
||||
package org.airsonic.player.ajax;
|
||||
|
||||
/**
|
||||
* Contains status for a file upload.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.libresonic.player.boot;
|
||||
package org.airsonic.player.boot;
|
||||
|
||||
import net.sf.ehcache.constructs.web.ShutdownListener;
|
||||
import org.airsonic.player.filter.*;
|
||||
import org.airsonic.player.spring.CustomPropertySourceConfigurer;
|
||||
import org.directwebremoting.servlet.DwrServlet;
|
||||
import org.libresonic.player.filter.*;
|
||||
import org.libresonic.player.spring.LibresonicPropertySourceConfigurer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -40,7 +40,7 @@ import java.lang.reflect.Method;
|
||||
@ImportResource(value = {"classpath:/applicationContext-service.xml",
|
||||
"classpath:/applicationContext-cache.xml",
|
||||
"classpath:/applicationContext-sonos.xml",
|
||||
"classpath:/libresonic-servlet.xml"})
|
||||
"classpath:/servlet.xml"})
|
||||
public class Application extends SpringBootServletInitializer implements EmbeddedServletContainerCustomizer {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Application.class);
|
||||
@@ -180,7 +180,7 @@ public class Application extends SpringBootServletInitializer implements Embedde
|
||||
// Customize the application or call application.sources(...) to add sources
|
||||
// Since our example is itself a @Configuration class (via @SpringBootApplication)
|
||||
// we actually don't need to override this method.
|
||||
return application.sources(Application.class).web(true).initializers(new LibresonicPropertySourceConfigurer());
|
||||
return application.sources(Application.class).web(true).initializers(new CustomPropertySourceConfigurer());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -200,7 +200,7 @@ public class Application extends SpringBootServletInitializer implements Embedde
|
||||
if(tomcatESCF.isInstance(container)) {
|
||||
LOG.debug("Attempting to optimize tomcat");
|
||||
Object tomcatESCFInstance = tomcatESCF.cast(container);
|
||||
Class<?> tomcatApplicationClass = Class.forName("org.libresonic.player.boot.TomcatApplication");
|
||||
Class<?> tomcatApplicationClass = Class.forName("TomcatApplication");
|
||||
Method configure = ReflectionUtils.findMethod(tomcatApplicationClass, "configure", tomcatESCF);
|
||||
configure.invoke(null, tomcatESCFInstance);
|
||||
LOG.debug("Tomcat optimizations complete");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.libresonic.player.boot;
|
||||
package org.airsonic.player.boot;
|
||||
|
||||
import org.apache.catalina.Container;
|
||||
import org.apache.catalina.Wrapper;
|
||||
@@ -12,7 +12,7 @@ public class TomcatApplication {
|
||||
|
||||
tomcatFactory.addContextCustomizers((TomcatContextCustomizer) context -> {
|
||||
|
||||
boolean development = (System.getProperty("libresonic.development") != null);
|
||||
boolean development = (System.getProperty("airsonic.development") != null);
|
||||
|
||||
// Increase the size and time before eviction of the Tomcat
|
||||
// cache so that resources aren't uncompressed too often.
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.cache;
|
||||
package org.airsonic.player.cache;
|
||||
|
||||
import net.sf.ehcache.CacheManager;
|
||||
import net.sf.ehcache.Ehcache;
|
||||
import net.sf.ehcache.config.Configuration;
|
||||
import net.sf.ehcache.config.ConfigurationFactory;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
@@ -44,8 +44,8 @@ public class CacheFactory implements InitializingBean {
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
Configuration configuration = ConfigurationFactory.parseConfiguration();
|
||||
|
||||
// Override configuration to make sure cache is stored in Libresonic home dir.
|
||||
File cacheDir = new File(SettingsService.getLibresonicHome(), "cache");
|
||||
// Override configuration to make sure cache is stored in Airsonic home dir.
|
||||
File cacheDir = new File(SettingsService.getAirsonicHome(), "cache");
|
||||
configuration.getDiskStoreConfiguration().setPath(cacheDir.getPath());
|
||||
|
||||
cacheManager = CacheManager.create(configuration);
|
||||
|
||||
+7
-7
@@ -1,25 +1,25 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.libresonic.player.controller.AdvancedSettingsController;
|
||||
import org.airsonic.player.controller.AdvancedSettingsController;
|
||||
|
||||
/**
|
||||
* Command used in {@link AdvancedSettingsController}.
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.libresonic.player.spring.DataSourceConfigType;
|
||||
import org.airsonic.player.spring.DataSourceConfigType;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
/**
|
||||
* Holds the name and description of an enum value.
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.libresonic.player.controller.GeneralSettingsController;
|
||||
import org.libresonic.player.domain.Theme;
|
||||
import org.airsonic.player.controller.GeneralSettingsController;
|
||||
import org.airsonic.player.domain.Theme;
|
||||
|
||||
/**
|
||||
* Command used in {@link GeneralSettingsController}.
|
||||
|
||||
+8
-8
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.airsonic.player.controller.MusicFolderSettingsController;
|
||||
import org.airsonic.player.domain.MusicFolder;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.controller.MusicFolderSettingsController;
|
||||
import org.libresonic.player.domain.MusicFolder;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
|
||||
+7
-7
@@ -1,25 +1,25 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.libresonic.player.controller.PasswordSettingsController;
|
||||
import org.airsonic.player.controller.PasswordSettingsController;
|
||||
|
||||
/**
|
||||
* Command used in {@link PasswordSettingsController}.
|
||||
|
||||
+8
-8
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.libresonic.player.controller.PersonalSettingsController;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.airsonic.player.controller.PersonalSettingsController;
|
||||
import org.airsonic.player.domain.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
+11
-11
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.libresonic.player.controller.PlayerSettingsController;
|
||||
import org.libresonic.player.domain.Player;
|
||||
import org.libresonic.player.domain.PlayerTechnology;
|
||||
import org.libresonic.player.domain.TranscodeScheme;
|
||||
import org.libresonic.player.domain.Transcoding;
|
||||
import org.airsonic.player.controller.PlayerSettingsController;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.domain.PlayerTechnology;
|
||||
import org.airsonic.player.domain.TranscodeScheme;
|
||||
import org.airsonic.player.domain.Transcoding;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.libresonic.player.controller.PodcastSettingsController;
|
||||
import org.airsonic.player.controller.PodcastSettingsController;
|
||||
|
||||
/**
|
||||
* Command used in {@link PodcastSettingsController}.
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.libresonic.player.controller.SearchController;
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.domain.Player;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.airsonic.player.controller.SearchController;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.domain.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.command;
|
||||
package org.airsonic.player.command;
|
||||
|
||||
import org.libresonic.player.controller.UserSettingsController;
|
||||
import org.libresonic.player.domain.MusicFolder;
|
||||
import org.libresonic.player.domain.TranscodeScheme;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.airsonic.player.controller.UserSettingsController;
|
||||
import org.airsonic.player.domain.MusicFolder;
|
||||
import org.airsonic.player.domain.TranscodeScheme;
|
||||
import org.airsonic.player.domain.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
+6
-6
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.springframework.ui.context.Theme;
|
||||
import org.springframework.web.servlet.support.RequestContextUtils;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
+8
-8
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.command.AdvancedSettingsCommand;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.command.AdvancedSettingsCommand;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2013 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.apache.commons.lang.RandomStringUtils;
|
||||
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.Avatar;
|
||||
import org.libresonic.player.domain.AvatarScheme;
|
||||
import org.libresonic.player.domain.UserSettings;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.domain.Avatar;
|
||||
import org.airsonic.player.domain.AvatarScheme;
|
||||
import org.airsonic.player.domain.UserSettings;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
+10
-10
@@ -1,34 +1,34 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.Avatar;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
import org.apache.commons.fileupload.FileItemFactory;
|
||||
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
|
||||
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.libresonic.player.domain.Avatar;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
+8
-8
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.web.servlet.HandlerMapping;
|
||||
|
||||
+13
-13
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.dao.AlbumDao;
|
||||
import org.airsonic.player.dao.ArtistDao;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.airsonic.player.service.metadata.JaudiotaggerParser;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.libresonic.player.dao.AlbumDao;
|
||||
import org.libresonic.player.dao.ArtistDao;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.libresonic.player.service.metadata.JaudiotaggerParser;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -292,7 +292,7 @@ public class CoverArtController implements LastModified {
|
||||
}
|
||||
|
||||
private synchronized File getImageCacheDirectory(int size) {
|
||||
File dir = new File(SettingsService.getLibresonicHome(), "thumbs");
|
||||
File dir = new File(SettingsService.getAirsonicHome(), "thumbs");
|
||||
dir = new File(dir, String.valueOf(size));
|
||||
if (!dir.exists()) {
|
||||
if (dir.mkdirs()) {
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.dao.DaoHelper;
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
import org.libresonic.player.dao.DaoHelper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.jdbc.core.ColumnMapRowMapper;
|
||||
|
||||
+8
-8
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
* This file is part of Libresonic.
|
||||
* This file is part of Airsonic.
|
||||
*
|
||||
* Libresonic is free software: you can redistribute it and/or modify
|
||||
* Airsonic 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,
|
||||
* Airsonic 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/>.
|
||||
* along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright 2013 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.service.UPnPService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.service.UPnPService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
@@ -74,7 +74,7 @@ public class DLNASettingsController {
|
||||
String dlnaServerName = StringUtils.trimToNull(request.getParameter("dlnaServerName"));
|
||||
String dlnaBaseLANURL = StringUtils.trimToNull(request.getParameter("dlnaBaseLANURL"));
|
||||
if (dlnaServerName == null) {
|
||||
dlnaServerName = "Libresonic";
|
||||
dlnaServerName = "Airsonic";
|
||||
}
|
||||
|
||||
upnpService.setMediaServerEnabled(false);
|
||||
|
||||
+9
-9
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.command.DatabaseSettingsCommand;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.spring.DataSourceConfigType;
|
||||
import org.airsonic.player.command.DatabaseSettingsCommand;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.spring.DataSourceConfigType;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
+12
-12
@@ -1,32 +1,32 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.io.RangeOutputStream;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.airsonic.player.util.FileUtil;
|
||||
import org.airsonic.player.util.HttpRange;
|
||||
import org.airsonic.player.util.Util;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.io.RangeOutputStream;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.libresonic.player.util.FileUtil;
|
||||
import org.libresonic.player.util.HttpRange;
|
||||
import org.libresonic.player.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
+11
-11
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.metadata.JaudiotaggerParser;
|
||||
import org.airsonic.player.service.metadata.MetaDataParser;
|
||||
import org.airsonic.player.service.metadata.MetaDataParserFactory;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.libresonic.player.service.metadata.JaudiotaggerParser;
|
||||
import org.libresonic.player.service.metadata.MetaDataParser;
|
||||
import org.libresonic.player.service.metadata.MetaDataParserFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.Playlist;
|
||||
import org.libresonic.player.service.PlaylistService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.airsonic.player.domain.Playlist;
|
||||
import org.airsonic.player.service.PlaylistService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
+9
-9
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.security.JWTAuthenticationToken;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.security.JWTAuthenticationToken;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
+9
-9
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.command.GeneralSettingsCommand;
|
||||
import org.libresonic.player.domain.Theme;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.command.GeneralSettingsCommand;
|
||||
import org.airsonic.player.domain.Theme;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
+7
-7
@@ -1,25 +1,25 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.service.JWTSecurityService;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.PlayerService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.util.Pair;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.domain.Player;
|
||||
import org.libresonic.player.service.JWTSecurityService;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.libresonic.player.service.PlayerService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.util.Pair;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.service.VersionService;
|
||||
import org.apache.commons.io.input.ReversedLinesFileReader;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.service.VersionService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
+9
-9
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.Playlist;
|
||||
import org.airsonic.player.service.PlaylistService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
import org.apache.commons.fileupload.FileItemFactory;
|
||||
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
|
||||
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.Playlist;
|
||||
import org.libresonic.player.service.PlaylistService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.UserSettings;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.domain.UserSettings;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
+8
-8
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.InternetRadio;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.InternetRadio;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.eclipse.persistence.jaxb.JAXBContext;
|
||||
import org.eclipse.persistence.jaxb.MarshallerProperties;
|
||||
import org.jdom.Attribute;
|
||||
import org.jdom.Document;
|
||||
import org.jdom.input.SAXBuilder;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.subsonic.restapi.Error;
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.libresonic.player.util.FileUtil;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.airsonic.player.util.FileUtil;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.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.JWTSecurityService;
|
||||
import org.libresonic.player.service.NetworkService;
|
||||
import org.libresonic.player.service.PlayerService;
|
||||
import org.libresonic.player.service.TranscodingService;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.domain.PlayQueue;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.service.JWTSecurityService;
|
||||
import org.airsonic.player.service.NetworkService;
|
||||
import org.airsonic.player.service.PlayerService;
|
||||
import org.airsonic.player.service.TranscodingService;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -111,7 +111,7 @@ public class M3UController {
|
||||
out.print("\ufeff");
|
||||
}
|
||||
out.println("#EXTM3U");
|
||||
out.println("#EXTINF:-1,Libresonic");
|
||||
out.println("#EXTINF:-1,Airsonic");
|
||||
out.println(jwtSecurityService.addJWTToken(url));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.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.*;
|
||||
import org.airsonic.player.domain.MusicFolder;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
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;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
+13
-13
@@ -1,31 +1,31 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.command.MusicFolderSettingsCommand;
|
||||
import org.libresonic.player.dao.AlbumDao;
|
||||
import org.libresonic.player.dao.ArtistDao;
|
||||
import org.libresonic.player.dao.MediaFileDao;
|
||||
import org.libresonic.player.domain.MusicFolder;
|
||||
import org.libresonic.player.service.MediaScannerService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.command.MusicFolderSettingsCommand;
|
||||
import org.airsonic.player.dao.AlbumDao;
|
||||
import org.airsonic.player.dao.ArtistDao;
|
||||
import org.airsonic.player.dao.MediaFileDao;
|
||||
import org.airsonic.player.domain.MusicFolder;
|
||||
import org.airsonic.player.service.MediaScannerService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
+12
-12
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.domain.Player;
|
||||
import org.libresonic.player.domain.TransferStatus;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.libresonic.player.service.PlayerService;
|
||||
import org.libresonic.player.service.StatusService;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.domain.TransferStatus;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.PlayerService;
|
||||
import org.airsonic.player.service.StatusService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
+10
-10
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.command.PasswordSettingsCommand;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.validator.PasswordSettingsValidator;
|
||||
import org.airsonic.player.command.PasswordSettingsCommand;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.validator.PasswordSettingsValidator;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
+10
-10
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.command.PersonalSettingsCommand;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.command.PersonalSettingsCommand;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
+12
-12
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.Player;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.domain.UserSettings;
|
||||
import org.libresonic.player.service.PlayerService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.domain.UserSettings;
|
||||
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;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
+11
-11
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.command.PlayerSettingsCommand;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.PlayerService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.TranscodingService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.command.PlayerSettingsCommand;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.service.PlayerService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.TranscodingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
+14
-14
@@ -1,32 +1,32 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.Player;
|
||||
import org.libresonic.player.domain.Playlist;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.domain.UserSettings;
|
||||
import org.libresonic.player.service.PlayerService;
|
||||
import org.libresonic.player.service.PlaylistService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.domain.Playlist;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.domain.UserSettings;
|
||||
import org.airsonic.player.service.PlayerService;
|
||||
import org.airsonic.player.service.PlaylistService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
* This file is part of Libresonic.
|
||||
* This file is part of Airsonic.
|
||||
*
|
||||
* Libresonic is free software: you can redistribute it and/or modify
|
||||
* Airsonic 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,
|
||||
* Airsonic 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/>.
|
||||
* along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright 2014 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.Playlist;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.service.PlaylistService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.airsonic.player.domain.Playlist;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.service.PlaylistService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
+7
-7
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
* This file is part of Libresonic.
|
||||
* This file is part of Airsonic.
|
||||
*
|
||||
* Libresonic is free software: you can redistribute it and/or modify
|
||||
* Airsonic 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,
|
||||
* Airsonic 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/>.
|
||||
* along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright 2015 (C) Sindre Mehus
|
||||
*/
|
||||
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.service.PodcastService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.PodcastService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
+10
-10
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
* This file is part of Libresonic.
|
||||
* This file is part of Airsonic.
|
||||
*
|
||||
* Libresonic is free software: you can redistribute it and/or modify
|
||||
* Airsonic 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,
|
||||
* Airsonic 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/>.
|
||||
* along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright 2015 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.PodcastChannel;
|
||||
import org.libresonic.player.domain.PodcastEpisode;
|
||||
import org.libresonic.player.service.PodcastService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.domain.PodcastChannel;
|
||||
import org.airsonic.player.domain.PodcastEpisode;
|
||||
import org.airsonic.player.service.PodcastService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.domain.Playlist;
|
||||
import org.libresonic.player.service.PlaylistService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.domain.Playlist;
|
||||
import org.airsonic.player.service.PlaylistService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
+10
-10
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.PodcastEpisode;
|
||||
import org.airsonic.player.domain.PodcastStatus;
|
||||
import org.airsonic.player.service.PodcastService;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.PodcastEpisode;
|
||||
import org.libresonic.player.domain.PodcastStatus;
|
||||
import org.libresonic.player.service.PodcastService;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
+9
-9
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.command.PodcastSettingsCommand;
|
||||
import org.libresonic.player.service.PodcastService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.command.PodcastSettingsCommand;
|
||||
import org.airsonic.player.service.PodcastService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
@@ -1,47 +1,36 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.ajax.LyricsInfo;
|
||||
import org.airsonic.player.ajax.LyricsService;
|
||||
import org.airsonic.player.ajax.PlayQueueService;
|
||||
import org.airsonic.player.command.UserSettingsCommand;
|
||||
import org.airsonic.player.dao.*;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.airsonic.player.util.Pair;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.airsonic.player.util.Util;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.libresonic.player.ajax.LyricsInfo;
|
||||
import org.libresonic.player.ajax.LyricsService;
|
||||
import org.libresonic.player.ajax.PlayQueueService;
|
||||
import org.libresonic.player.command.UserSettingsCommand;
|
||||
import org.libresonic.player.dao.*;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.domain.Artist;
|
||||
import org.libresonic.player.domain.Bookmark;
|
||||
import org.libresonic.player.domain.Genre;
|
||||
import org.libresonic.player.domain.MusicFolder;
|
||||
import org.libresonic.player.domain.PlayQueue;
|
||||
import org.libresonic.player.domain.Playlist;
|
||||
import org.libresonic.player.domain.PodcastChannel;
|
||||
import org.libresonic.player.domain.PodcastEpisode;
|
||||
import org.libresonic.player.domain.SearchResult;
|
||||
import org.libresonic.player.domain.Share;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.libresonic.player.util.Pair;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.libresonic.player.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -62,7 +51,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import static org.libresonic.player.security.RESTRequestParameterProcessingFilter.decrypt;
|
||||
import static org.airsonic.player.security.RESTRequestParameterProcessingFilter.decrypt;
|
||||
import static org.springframework.web.bind.ServletRequestUtils.*;
|
||||
|
||||
/**
|
||||
@@ -141,7 +130,7 @@ public class RESTController {
|
||||
@Autowired
|
||||
private MediaScannerService mediaScannerService;
|
||||
|
||||
private final Map<BookmarkKey, Bookmark> bookmarkCache = new ConcurrentHashMap<BookmarkKey, Bookmark>();
|
||||
private final Map<BookmarkKey, org.airsonic.player.domain.Bookmark> bookmarkCache = new ConcurrentHashMap<BookmarkKey, org.airsonic.player.domain.Bookmark>();
|
||||
private final JAXBWriter jaxbWriter = new JAXBWriter();
|
||||
|
||||
private static final String NOT_YET_IMPLEMENTED = "Not yet implemented";
|
||||
@@ -154,7 +143,7 @@ public class RESTController {
|
||||
|
||||
private void refreshBookmarkCache() {
|
||||
bookmarkCache.clear();
|
||||
for (Bookmark bookmark : bookmarkDao.getBookmarks()) {
|
||||
for (org.airsonic.player.domain.Bookmark bookmark : bookmarkDao.getBookmarks()) {
|
||||
bookmarkCache.put(BookmarkKey.forBookmark(bookmark), bookmark);
|
||||
}
|
||||
}
|
||||
@@ -179,7 +168,7 @@ public class RESTController {
|
||||
License license = new License();
|
||||
|
||||
|
||||
license.setEmail("libresonic@github.com");
|
||||
license.setEmail("airsonic@github.com");
|
||||
license.setValid(true);
|
||||
Date neverExpireDate = new Date(Long.MAX_VALUE);
|
||||
license.setLicenseExpires(jaxbWriter.convertDate(neverExpireDate));
|
||||
@@ -197,7 +186,7 @@ public class RESTController {
|
||||
|
||||
MusicFolders musicFolders = new MusicFolders();
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
for (MusicFolder musicFolder : settingsService.getMusicFoldersForUser(username)) {
|
||||
for (org.airsonic.player.domain.MusicFolder musicFolder : settingsService.getMusicFoldersForUser(username)) {
|
||||
org.subsonic.restapi.MusicFolder mf = new org.subsonic.restapi.MusicFolder();
|
||||
mf.setId(musicFolder.getId());
|
||||
mf.setName(musicFolder.getName());
|
||||
@@ -226,10 +215,10 @@ public class RESTController {
|
||||
indexes.setLastModified(lastModified);
|
||||
indexes.setIgnoredArticles(settingsService.getIgnoredArticles());
|
||||
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
Integer musicFolderId = getIntParameter(request, "musicFolderId");
|
||||
if (musicFolderId != null) {
|
||||
for (MusicFolder musicFolder : musicFolders) {
|
||||
for (org.airsonic.player.domain.MusicFolder musicFolder : musicFolders) {
|
||||
if (musicFolderId.equals(musicFolder.getId())) {
|
||||
musicFolders = Collections.singletonList(musicFolder);
|
||||
break;
|
||||
@@ -283,7 +272,7 @@ public class RESTController {
|
||||
request = wrapRequest(request);
|
||||
org.subsonic.restapi.Genres genres = new org.subsonic.restapi.Genres();
|
||||
|
||||
for (Genre genre : mediaFileDao.getGenres(false)) {
|
||||
for (org.airsonic.player.domain.Genre genre : mediaFileDao.getGenres(false)) {
|
||||
org.subsonic.restapi.Genre g = new org.subsonic.restapi.Genre();
|
||||
genres.getGenre().add(g);
|
||||
g.setContent(genre.getName());
|
||||
@@ -308,7 +297,7 @@ public class RESTController {
|
||||
int count = getIntParameter(request, "count", 10);
|
||||
count = Math.max(0, Math.min(count, 500));
|
||||
Integer musicFolderId = getIntParameter(request, "musicFolderId");
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
|
||||
for (MediaFile mediaFile : mediaFileDao.getSongsByGenre(genre, offset, count, musicFolders)) {
|
||||
songs.getSong().add(createJaxbChild(player, mediaFile, username));
|
||||
@@ -325,9 +314,9 @@ public class RESTController {
|
||||
|
||||
ArtistsID3 result = new ArtistsID3();
|
||||
result.setIgnoredArticles(settingsService.getIgnoredArticles());
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
|
||||
List<Artist> artists = artistDao.getAlphabetialArtists(0, Integer.MAX_VALUE, musicFolders);
|
||||
List<org.airsonic.player.domain.Artist> artists = artistDao.getAlphabetialArtists(0, Integer.MAX_VALUE, musicFolders);
|
||||
SortedMap<MusicIndex, List<MusicIndex.SortableArtistWithArtist>> indexedArtists = musicIndexService.getIndexedArtists(artists);
|
||||
for (Map.Entry<MusicIndex, List<MusicIndex.SortableArtistWithArtist>> entry : indexedArtists.entrySet()) {
|
||||
IndexID3 index = new IndexID3();
|
||||
@@ -358,7 +347,7 @@ public class RESTController {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Media file not found.");
|
||||
return;
|
||||
}
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<MediaFile> similarSongs = lastFmService.getSimilarSongs(mediaFile, count, musicFolders);
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
for (MediaFile similarSong : similarSongs) {
|
||||
@@ -380,13 +369,13 @@ public class RESTController {
|
||||
|
||||
SimilarSongs2 result = new SimilarSongs2();
|
||||
|
||||
Artist artist = artistDao.getArtist(id);
|
||||
org.airsonic.player.domain.Artist artist = artistDao.getArtist(id);
|
||||
if (artist == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Artist not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<MediaFile> similarSongs = lastFmService.getSimilarSongs(artist, count, musicFolders);
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
for (MediaFile similarSong : similarSongs) {
|
||||
@@ -408,7 +397,7 @@ public class RESTController {
|
||||
|
||||
TopSongs result = new TopSongs();
|
||||
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<MediaFile> topSongs = lastFmService.getTopSongs(artist, count, musicFolders);
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
for (MediaFile topSong : topSongs) {
|
||||
@@ -436,7 +425,7 @@ public class RESTController {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Media file not found.");
|
||||
return;
|
||||
}
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<MediaFile> similarArtists = lastFmService.getSimilarArtists(mediaFile, count, includeNotPresent, musicFolders);
|
||||
for (MediaFile similarArtist : similarArtists) {
|
||||
result.getSimilarArtist().add(createJaxbArtist(similarArtist, username));
|
||||
@@ -467,15 +456,15 @@ public class RESTController {
|
||||
|
||||
ArtistInfo2 result = new ArtistInfo2();
|
||||
|
||||
Artist artist = artistDao.getArtist(id);
|
||||
org.airsonic.player.domain.Artist artist = artistDao.getArtist(id);
|
||||
if (artist == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Artist not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<Artist> similarArtists = lastFmService.getSimilarArtists(artist, count, includeNotPresent, musicFolders);
|
||||
for (Artist similarArtist : similarArtists) {
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.Artist> similarArtists = lastFmService.getSimilarArtists(artist, count, includeNotPresent, musicFolders);
|
||||
for (org.airsonic.player.domain.Artist similarArtist : similarArtists) {
|
||||
result.getSimilarArtist().add(createJaxbArtist(new ArtistID3(), similarArtist, username));
|
||||
}
|
||||
ArtistBio artistBio = lastFmService.getArtistBio(artist);
|
||||
@@ -493,7 +482,7 @@ public class RESTController {
|
||||
jaxbWriter.writeResponse(request, response, res);
|
||||
}
|
||||
|
||||
private <T extends ArtistID3> T createJaxbArtist(T jaxbArtist, Artist artist, String username) {
|
||||
private <T extends ArtistID3> T createJaxbArtist(T jaxbArtist, org.airsonic.player.domain.Artist artist, String username) {
|
||||
jaxbArtist.setId(String.valueOf(artist.getId()));
|
||||
jaxbArtist.setName(artist.getName());
|
||||
jaxbArtist.setStarred(jaxbWriter.convertDate(mediaFileDao.getMediaFileStarredDate(artist.getId(), username)));
|
||||
@@ -519,13 +508,13 @@ public class RESTController {
|
||||
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
int id = getRequiredIntParameter(request, "id");
|
||||
Artist artist = artistDao.getArtist(id);
|
||||
org.airsonic.player.domain.Artist artist = artistDao.getArtist(id);
|
||||
if (artist == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Artist not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
ArtistWithAlbumsID3 result = createJaxbArtist(new ArtistWithAlbumsID3(), artist, username);
|
||||
for (Album album : albumDao.getAlbumsForArtist(artist.getName(), musicFolders)) {
|
||||
result.getAlbum().add(createJaxbAlbum(new AlbumID3(), album, username));
|
||||
@@ -541,7 +530,7 @@ public class RESTController {
|
||||
jaxbAlbum.setName(album.getName());
|
||||
if (album.getArtist() != null) {
|
||||
jaxbAlbum.setArtist(album.getArtist());
|
||||
Artist artist = artistDao.getArtist(album.getArtist());
|
||||
org.airsonic.player.domain.Artist artist = artistDao.getArtist(album.getArtist());
|
||||
if (artist != null) {
|
||||
jaxbAlbum.setArtistId(String.valueOf(artist.getId()));
|
||||
}
|
||||
@@ -558,7 +547,7 @@ public class RESTController {
|
||||
return jaxbAlbum;
|
||||
}
|
||||
|
||||
private <T extends org.subsonic.restapi.Playlist> T createJaxbPlaylist(T jaxbPlaylist, Playlist playlist) {
|
||||
private <T extends org.subsonic.restapi.Playlist> T createJaxbPlaylist(T jaxbPlaylist, org.airsonic.player.domain.Playlist playlist) {
|
||||
jaxbPlaylist.setId(String.valueOf(playlist.getId()));
|
||||
jaxbPlaylist.setName(playlist.getName());
|
||||
jaxbPlaylist.setComment(playlist.getComment());
|
||||
@@ -695,9 +684,9 @@ public class RESTController {
|
||||
criteria.setQuery(query.toString().trim());
|
||||
criteria.setCount(getIntParameter(request, "count", 20));
|
||||
criteria.setOffset(getIntParameter(request, "offset", 0));
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
|
||||
SearchResult result = searchService.search(criteria, musicFolders, SearchService.IndexType.SONG);
|
||||
org.airsonic.player.domain.SearchResult result = searchService.search(criteria, musicFolders, SearchService.IndexType.SONG);
|
||||
org.subsonic.restapi.SearchResult searchResult = new org.subsonic.restapi.SearchResult();
|
||||
searchResult.setOffset(result.getOffset());
|
||||
searchResult.setTotalHits(result.getTotalHits());
|
||||
@@ -716,7 +705,7 @@ public class RESTController {
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
Integer musicFolderId = getIntParameter(request, "musicFolderId");
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
|
||||
SearchResult2 searchResult = new SearchResult2();
|
||||
|
||||
@@ -725,21 +714,21 @@ public class RESTController {
|
||||
criteria.setQuery(StringUtils.trimToEmpty(query));
|
||||
criteria.setCount(getIntParameter(request, "artistCount", 20));
|
||||
criteria.setOffset(getIntParameter(request, "artistOffset", 0));
|
||||
SearchResult artists = searchService.search(criteria, musicFolders, SearchService.IndexType.ARTIST);
|
||||
org.airsonic.player.domain.SearchResult artists = searchService.search(criteria, musicFolders, SearchService.IndexType.ARTIST);
|
||||
for (MediaFile mediaFile : artists.getMediaFiles()) {
|
||||
searchResult.getArtist().add(createJaxbArtist(mediaFile, username));
|
||||
}
|
||||
|
||||
criteria.setCount(getIntParameter(request, "albumCount", 20));
|
||||
criteria.setOffset(getIntParameter(request, "albumOffset", 0));
|
||||
SearchResult albums = searchService.search(criteria, musicFolders, SearchService.IndexType.ALBUM);
|
||||
org.airsonic.player.domain.SearchResult albums = searchService.search(criteria, musicFolders, SearchService.IndexType.ALBUM);
|
||||
for (MediaFile mediaFile : albums.getMediaFiles()) {
|
||||
searchResult.getAlbum().add(createJaxbChild(player, mediaFile, username));
|
||||
}
|
||||
|
||||
criteria.setCount(getIntParameter(request, "songCount", 20));
|
||||
criteria.setOffset(getIntParameter(request, "songOffset", 0));
|
||||
SearchResult songs = searchService.search(criteria, musicFolders, SearchService.IndexType.SONG);
|
||||
org.airsonic.player.domain.SearchResult songs = searchService.search(criteria, musicFolders, SearchService.IndexType.SONG);
|
||||
for (MediaFile mediaFile : songs.getMediaFiles()) {
|
||||
searchResult.getSong().add(createJaxbChild(player, mediaFile, username));
|
||||
}
|
||||
@@ -755,7 +744,7 @@ public class RESTController {
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
Integer musicFolderId = getIntParameter(request, "musicFolderId");
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
|
||||
SearchResult3 searchResult = new SearchResult3();
|
||||
|
||||
@@ -764,8 +753,8 @@ public class RESTController {
|
||||
criteria.setQuery(StringUtils.trimToEmpty(query));
|
||||
criteria.setCount(getIntParameter(request, "artistCount", 20));
|
||||
criteria.setOffset(getIntParameter(request, "artistOffset", 0));
|
||||
SearchResult result = searchService.search(criteria, musicFolders, SearchService.IndexType.ARTIST_ID3);
|
||||
for (Artist artist : result.getArtists()) {
|
||||
org.airsonic.player.domain.SearchResult result = searchService.search(criteria, musicFolders, SearchService.IndexType.ARTIST_ID3);
|
||||
for (org.airsonic.player.domain.Artist artist : result.getArtists()) {
|
||||
searchResult.getArtist().add(createJaxbArtist(new ArtistID3(), artist, username));
|
||||
}
|
||||
|
||||
@@ -792,7 +781,7 @@ public class RESTController {
|
||||
public void getPlaylists(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
String authenticatedUsername = user.getUsername();
|
||||
String requestedUsername = request.getParameter("username");
|
||||
|
||||
@@ -805,7 +794,7 @@ public class RESTController {
|
||||
|
||||
Playlists result = new Playlists();
|
||||
|
||||
for (Playlist playlist : playlistService.getReadablePlaylistsForUser(requestedUsername)) {
|
||||
for (org.airsonic.player.domain.Playlist playlist : playlistService.getReadablePlaylistsForUser(requestedUsername)) {
|
||||
result.getPlaylist().add(createJaxbPlaylist(new org.subsonic.restapi.Playlist(), playlist));
|
||||
}
|
||||
|
||||
@@ -822,7 +811,7 @@ public class RESTController {
|
||||
|
||||
int id = getRequiredIntParameter(request, "id");
|
||||
|
||||
Playlist playlist = playlistService.getPlaylist(id);
|
||||
org.airsonic.player.domain.Playlist playlist = playlistService.getPlaylist(id);
|
||||
if (playlist == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Playlist not found: " + id);
|
||||
return;
|
||||
@@ -847,7 +836,7 @@ public class RESTController {
|
||||
public void jukeboxControl(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request, true);
|
||||
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isJukeboxRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to use jukebox.");
|
||||
return;
|
||||
@@ -891,11 +880,11 @@ public class RESTController {
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
Player jukeboxPlayer = jukeboxService.getPlayer();
|
||||
boolean controlsJukebox = jukeboxPlayer != null && jukeboxPlayer.getId().equals(player.getId());
|
||||
PlayQueue playQueue = player.getPlayQueue();
|
||||
org.airsonic.player.domain.PlayQueue playQueue = player.getPlayQueue();
|
||||
|
||||
|
||||
int currentIndex = controlsJukebox && !playQueue.isEmpty() ? playQueue.getIndex() : -1;
|
||||
boolean playing = controlsJukebox && !playQueue.isEmpty() && playQueue.getStatus() == PlayQueue.Status.PLAYING;
|
||||
boolean playing = controlsJukebox && !playQueue.isEmpty() && playQueue.getStatus() == org.airsonic.player.domain.PlayQueue.Status.PLAYING;
|
||||
float gain = jukeboxService.getGain();
|
||||
int position = controlsJukebox && !playQueue.isEmpty() ? jukeboxService.getPosition() : 0;
|
||||
|
||||
@@ -934,7 +923,7 @@ public class RESTController {
|
||||
return;
|
||||
}
|
||||
|
||||
Playlist playlist;
|
||||
org.airsonic.player.domain.Playlist playlist;
|
||||
if (playlistId != null) {
|
||||
playlist = playlistService.getPlaylist(playlistId);
|
||||
if (playlist == null) {
|
||||
@@ -946,7 +935,7 @@ public class RESTController {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
playlist = new Playlist();
|
||||
playlist = new org.airsonic.player.domain.Playlist();
|
||||
playlist.setName(name);
|
||||
playlist.setCreated(new Date());
|
||||
playlist.setChanged(new Date());
|
||||
@@ -973,7 +962,7 @@ public class RESTController {
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
|
||||
int id = getRequiredIntParameter(request, "playlistId");
|
||||
Playlist playlist = playlistService.getPlaylist(id);
|
||||
org.airsonic.player.domain.Playlist playlist = playlistService.getPlaylist(id);
|
||||
if (playlist == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Playlist not found: " + id);
|
||||
return;
|
||||
@@ -1041,7 +1030,7 @@ public class RESTController {
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
|
||||
int id = getRequiredIntParameter(request, "id");
|
||||
Playlist playlist = playlistService.getPlaylist(id);
|
||||
org.airsonic.player.domain.Playlist playlist = playlistService.getPlaylist(id);
|
||||
if (playlist == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Playlist not found: " + id);
|
||||
return;
|
||||
@@ -1065,7 +1054,7 @@ public class RESTController {
|
||||
int offset = getIntParameter(request, "offset", 0);
|
||||
Integer musicFolderId = getIntParameter(request, "musicFolderId");
|
||||
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
|
||||
size = Math.max(0, Math.min(size, 500));
|
||||
String type = getRequiredStringParameter(request, "type");
|
||||
@@ -1116,7 +1105,7 @@ public class RESTController {
|
||||
String type = getRequiredStringParameter(request, "type");
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
Integer musicFolderId = getIntParameter(request, "musicFolderId");
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
|
||||
List<Album> albums;
|
||||
if ("frequent".equals(type)) {
|
||||
@@ -1162,7 +1151,7 @@ public class RESTController {
|
||||
Integer fromYear = getIntParameter(request, "fromYear");
|
||||
Integer toYear = getIntParameter(request, "toYear");
|
||||
Integer musicFolderId = getIntParameter(request, "musicFolderId");
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
RandomSearchCriteria criteria = new RandomSearchCriteria(size, genre, fromYear, toYear, musicFolders);
|
||||
|
||||
Songs result = new Songs();
|
||||
@@ -1182,7 +1171,7 @@ public class RESTController {
|
||||
|
||||
int size = getIntParameter(request, "size", Integer.MAX_VALUE);
|
||||
int offset = getIntParameter(request, "offset", 0);
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
|
||||
Videos result = new Videos();
|
||||
for (MediaFile mediaFile : mediaFileDao.getVideos(size, offset, musicFolders)) {
|
||||
@@ -1267,7 +1256,7 @@ public class RESTController {
|
||||
child.setIsVideo(mediaFile.isVideo());
|
||||
child.setPath(getRelativePath(mediaFile));
|
||||
|
||||
Bookmark bookmark = bookmarkCache.get(new BookmarkKey(username, mediaFile.getId()));
|
||||
org.airsonic.player.domain.Bookmark bookmark = bookmarkCache.get(new BookmarkKey(username, mediaFile.getId()));
|
||||
if (bookmark != null) {
|
||||
child.setBookmarkPosition(bookmark.getPositionMillis());
|
||||
}
|
||||
@@ -1279,7 +1268,7 @@ public class RESTController {
|
||||
}
|
||||
}
|
||||
if (mediaFile.getArtist() != null) {
|
||||
Artist artist = artistDao.getArtist(mediaFile.getArtist());
|
||||
org.airsonic.player.domain.Artist artist = artistDao.getArtist(mediaFile.getArtist());
|
||||
if (artist != null) {
|
||||
child.setArtistId(String.valueOf(artist.getId()));
|
||||
}
|
||||
@@ -1329,8 +1318,8 @@ public class RESTController {
|
||||
|
||||
String filePathLower = filePath.toLowerCase();
|
||||
|
||||
List<MusicFolder> musicFolders = settingsService.getAllMusicFolders(false, true);
|
||||
for (MusicFolder musicFolder : musicFolders) {
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getAllMusicFolders(false, true);
|
||||
for (org.airsonic.player.domain.MusicFolder musicFolder : musicFolders) {
|
||||
String folderPath = musicFolder.getPath().getPath();
|
||||
folderPath = folderPath.replace('\\', '/');
|
||||
String folderPathLower = folderPath.toLowerCase();
|
||||
@@ -1350,7 +1339,7 @@ public class RESTController {
|
||||
@RequestMapping(value = "/download")
|
||||
public ModelAndView download(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isDownloadRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to download files.");
|
||||
return null;
|
||||
@@ -1374,7 +1363,7 @@ public class RESTController {
|
||||
@RequestMapping(value = "/stream")
|
||||
public ModelAndView stream(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isStreamRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to play files.");
|
||||
return null;
|
||||
@@ -1387,7 +1376,7 @@ public class RESTController {
|
||||
@RequestMapping(value = "/hls")
|
||||
public ModelAndView hls(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isStreamRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to play files.");
|
||||
return null;
|
||||
@@ -1478,7 +1467,7 @@ public class RESTController {
|
||||
}
|
||||
}
|
||||
for (int artistId : getIntParameters(request, "artistId")) {
|
||||
Artist artist = artistDao.getArtist(artistId);
|
||||
org.airsonic.player.domain.Artist artist = artistDao.getArtist(artistId);
|
||||
if (artist == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Artist not found: " + artistId);
|
||||
return;
|
||||
@@ -1499,7 +1488,7 @@ public class RESTController {
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
Integer musicFolderId = getIntParameter(request, "musicFolderId");
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
|
||||
Starred result = new Starred();
|
||||
for (MediaFile artist : mediaFileDao.getStarredDirectories(0, Integer.MAX_VALUE, username, musicFolders)) {
|
||||
@@ -1522,10 +1511,10 @@ public class RESTController {
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
Integer musicFolderId = getIntParameter(request, "musicFolderId");
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username, musicFolderId);
|
||||
|
||||
Starred2 result = new Starred2();
|
||||
for (Artist artist : artistDao.getStarredArtists(0, Integer.MAX_VALUE, username, musicFolders)) {
|
||||
for (org.airsonic.player.domain.Artist artist : artistDao.getStarredArtists(0, Integer.MAX_VALUE, username, musicFolders)) {
|
||||
result.getArtist().add(createJaxbArtist(new ArtistID3(), artist, username));
|
||||
}
|
||||
for (Album album : albumDao.getStarredAlbums(0, Integer.MAX_VALUE, username, musicFolders)) {
|
||||
@@ -1549,7 +1538,7 @@ public class RESTController {
|
||||
|
||||
Podcasts result = new Podcasts();
|
||||
|
||||
for (PodcastChannel channel : podcastService.getAllChannels()) {
|
||||
for (org.airsonic.player.domain.PodcastChannel channel : podcastService.getAllChannels()) {
|
||||
if (channelId == null || channelId.equals(channel.getId())) {
|
||||
|
||||
org.subsonic.restapi.PodcastChannel c = new org.subsonic.restapi.PodcastChannel();
|
||||
@@ -1565,8 +1554,8 @@ public class RESTController {
|
||||
c.setErrorMessage(channel.getErrorMessage());
|
||||
|
||||
if (includeEpisodes) {
|
||||
List<PodcastEpisode> episodes = podcastService.getEpisodes(channel.getId());
|
||||
for (PodcastEpisode episode : episodes) {
|
||||
List<org.airsonic.player.domain.PodcastEpisode> episodes = podcastService.getEpisodes(channel.getId());
|
||||
for (org.airsonic.player.domain.PodcastEpisode episode : episodes) {
|
||||
c.getEpisode().add(createJaxbPodcastEpisode(player, username, episode));
|
||||
}
|
||||
}
|
||||
@@ -1586,7 +1575,7 @@ public class RESTController {
|
||||
int count = getIntParameter(request, "count", 20);
|
||||
NewestPodcasts result = new NewestPodcasts();
|
||||
|
||||
for (PodcastEpisode episode : podcastService.getNewestEpisodes(count)) {
|
||||
for (org.airsonic.player.domain.PodcastEpisode episode : podcastService.getNewestEpisodes(count)) {
|
||||
result.getEpisode().add(createJaxbPodcastEpisode(player, username, episode));
|
||||
}
|
||||
|
||||
@@ -1595,7 +1584,7 @@ public class RESTController {
|
||||
jaxbWriter.writeResponse(request, response, res);
|
||||
}
|
||||
|
||||
private org.subsonic.restapi.PodcastEpisode createJaxbPodcastEpisode(Player player, String username, PodcastEpisode episode) {
|
||||
private org.subsonic.restapi.PodcastEpisode createJaxbPodcastEpisode(Player player, String username, org.airsonic.player.domain.PodcastEpisode episode) {
|
||||
org.subsonic.restapi.PodcastEpisode e = new org.subsonic.restapi.PodcastEpisode();
|
||||
|
||||
String path = episode.getPath();
|
||||
@@ -1617,7 +1606,7 @@ public class RESTController {
|
||||
@RequestMapping(value = "/refreshPodcasts")
|
||||
public void refreshPodcasts(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isPodcastRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to administrate podcasts.");
|
||||
return;
|
||||
@@ -1629,7 +1618,7 @@ public class RESTController {
|
||||
@RequestMapping(value = "/createPodcastChannel")
|
||||
public void createPodcastChannel(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isPodcastRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to administrate podcasts.");
|
||||
return;
|
||||
@@ -1643,7 +1632,7 @@ public class RESTController {
|
||||
@RequestMapping(value = "/deletePodcastChannel")
|
||||
public void deletePodcastChannel(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isPodcastRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to administrate podcasts.");
|
||||
return;
|
||||
@@ -1657,7 +1646,7 @@ public class RESTController {
|
||||
@RequestMapping(value = "/deletePodcastEpisode")
|
||||
public void deletePodcastEpisode(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isPodcastRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to administrate podcasts.");
|
||||
return;
|
||||
@@ -1671,14 +1660,14 @@ public class RESTController {
|
||||
@RequestMapping(value = "/downloadPodcastEpisode")
|
||||
public void downloadPodcastEpisode(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isPodcastRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to administrate podcasts.");
|
||||
return;
|
||||
}
|
||||
|
||||
int id = getRequiredIntParameter(request, "id");
|
||||
PodcastEpisode episode = podcastService.getEpisode(id, true);
|
||||
org.airsonic.player.domain.PodcastEpisode episode = podcastService.getEpisode(id, true);
|
||||
if (episode == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Podcast episode " + id + " not found.");
|
||||
return;
|
||||
@@ -1713,7 +1702,7 @@ public class RESTController {
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
|
||||
Bookmarks result = new Bookmarks();
|
||||
for (Bookmark bookmark : bookmarkDao.getBookmarks(username)) {
|
||||
for (org.airsonic.player.domain.Bookmark bookmark : bookmarkDao.getBookmarks(username)) {
|
||||
org.subsonic.restapi.Bookmark b = new org.subsonic.restapi.Bookmark();
|
||||
result.getBookmark().add(b);
|
||||
b.setPosition(bookmark.getPositionMillis());
|
||||
@@ -1740,7 +1729,7 @@ public class RESTController {
|
||||
String comment = request.getParameter("comment");
|
||||
Date now = new Date();
|
||||
|
||||
Bookmark bookmark = new Bookmark(0, mediaFileId, position, username, comment, now, now);
|
||||
org.airsonic.player.domain.Bookmark bookmark = new org.airsonic.player.domain.Bookmark(0, mediaFileId, position, username, comment, now, now);
|
||||
bookmarkDao.createOrUpdateBookmark(bookmark);
|
||||
refreshBookmarkCache();
|
||||
writeEmptyResponse(request, response);
|
||||
@@ -1814,11 +1803,11 @@ public class RESTController {
|
||||
request = wrapRequest(request);
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
|
||||
Shares result = new Shares();
|
||||
for (Share share : shareService.getSharesForUser(user)) {
|
||||
for (org.airsonic.player.domain.Share share : shareService.getSharesForUser(user)) {
|
||||
org.subsonic.restapi.Share s = createJaxbShare(request, share);
|
||||
result.getShare().add(s);
|
||||
|
||||
@@ -1837,7 +1826,7 @@ public class RESTController {
|
||||
Player player = playerService.getPlayer(request, response);
|
||||
String username = securityService.getCurrentUsername(request);
|
||||
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isShareRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to share media.");
|
||||
return;
|
||||
@@ -1848,7 +1837,7 @@ public class RESTController {
|
||||
files.add(mediaFileService.getMediaFile(id));
|
||||
}
|
||||
|
||||
Share share = shareService.createShare(request, files);
|
||||
org.airsonic.player.domain.Share share = shareService.createShare(request, files);
|
||||
share.setDescription(request.getParameter("description"));
|
||||
long expires = getLongParameter(request, "expires", 0L);
|
||||
if (expires != 0) {
|
||||
@@ -1860,7 +1849,7 @@ public class RESTController {
|
||||
org.subsonic.restapi.Share s = createJaxbShare(request, share);
|
||||
result.getShare().add(s);
|
||||
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(username);
|
||||
|
||||
for (MediaFile mediaFile : shareService.getSharedFiles(share.getId(), musicFolders)) {
|
||||
s.getEntry().add(createJaxbChild(player, mediaFile, username));
|
||||
@@ -1874,10 +1863,10 @@ public class RESTController {
|
||||
@RequestMapping(value = "/deleteShare")
|
||||
public void deleteShare(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
int id = getRequiredIntParameter(request, "id");
|
||||
|
||||
Share share = shareService.getShareById(id);
|
||||
org.airsonic.player.domain.Share share = shareService.getShareById(id);
|
||||
if (share == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Shared media not found.");
|
||||
return;
|
||||
@@ -1894,10 +1883,10 @@ public class RESTController {
|
||||
@RequestMapping(value = "/updateShare")
|
||||
public void updateShare(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
int id = getRequiredIntParameter(request, "id");
|
||||
|
||||
Share share = shareService.getShareById(id);
|
||||
org.airsonic.player.domain.Share share = shareService.getShareById(id);
|
||||
if (share == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "Shared media not found.");
|
||||
return;
|
||||
@@ -1917,7 +1906,7 @@ public class RESTController {
|
||||
writeEmptyResponse(request, response);
|
||||
}
|
||||
|
||||
private org.subsonic.restapi.Share createJaxbShare(HttpServletRequest request, Share share) {
|
||||
private org.subsonic.restapi.Share createJaxbShare(HttpServletRequest request, org.airsonic.player.domain.Share share) {
|
||||
org.subsonic.restapi.Share result = new org.subsonic.restapi.Share();
|
||||
result.setId(String.valueOf(share.getId()));
|
||||
result.setUrl(shareService.getShareUrl(request, share));
|
||||
@@ -1983,7 +1972,7 @@ public class RESTController {
|
||||
String username = getRequiredStringParameter(request, "username");
|
||||
String password = decrypt(getRequiredStringParameter(request, "password"));
|
||||
|
||||
User authUser = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User authUser = securityService.getCurrentUser(request);
|
||||
|
||||
boolean allowed = authUser.isAdminRole()
|
||||
|| username.equals(authUser.getUsername()) && authUser.isSettingsRole();
|
||||
@@ -1993,7 +1982,7 @@ public class RESTController {
|
||||
return;
|
||||
}
|
||||
|
||||
User user = securityService.getUserByName(username);
|
||||
org.airsonic.player.domain.User user = securityService.getUserByName(username);
|
||||
user.setPassword(password);
|
||||
securityService.updateUser(user);
|
||||
|
||||
@@ -2006,13 +1995,13 @@ public class RESTController {
|
||||
|
||||
String username = getRequiredStringParameter(request, "username");
|
||||
|
||||
User currentUser = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User currentUser = securityService.getCurrentUser(request);
|
||||
if (!username.equals(currentUser.getUsername()) && !currentUser.isAdminRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, currentUser.getUsername() + " is not authorized to get details for other users.");
|
||||
return;
|
||||
}
|
||||
|
||||
User requestedUser = securityService.getUserByName(username);
|
||||
org.airsonic.player.domain.User requestedUser = securityService.getUserByName(username);
|
||||
if (requestedUser == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "No such user: " + username);
|
||||
return;
|
||||
@@ -2027,14 +2016,14 @@ public class RESTController {
|
||||
public void getUsers(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
|
||||
User currentUser = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User currentUser = securityService.getCurrentUser(request);
|
||||
if (!currentUser.isAdminRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, currentUser.getUsername() + " is not authorized to get details for other users.");
|
||||
return;
|
||||
}
|
||||
|
||||
Users result = new Users();
|
||||
for (User user : securityService.getAllUsers()) {
|
||||
for (org.airsonic.player.domain.User user : securityService.getAllUsers()) {
|
||||
result.getUser().add(createJaxbUser(user));
|
||||
}
|
||||
|
||||
@@ -2043,7 +2032,7 @@ public class RESTController {
|
||||
jaxbWriter.writeResponse(request, response, res);
|
||||
}
|
||||
|
||||
private org.subsonic.restapi.User createJaxbUser(User user) {
|
||||
private org.subsonic.restapi.User createJaxbUser(org.airsonic.player.domain.User user) {
|
||||
UserSettings userSettings = settingsService.getUserSettings(user.getUsername());
|
||||
|
||||
org.subsonic.restapi.User result = new org.subsonic.restapi.User();
|
||||
@@ -2061,7 +2050,7 @@ public class RESTController {
|
||||
result.setStreamRole(user.isStreamRole());
|
||||
result.setJukeboxRole(user.isJukeboxRole());
|
||||
result.setShareRole(user.isShareRole());
|
||||
// currently this role isn't supported by libresonic
|
||||
// currently this role isn't supported by airsonic
|
||||
result.setVideoConversionRole(false);
|
||||
// Useless
|
||||
result.setAvatarLastChanged(null);
|
||||
@@ -2071,8 +2060,8 @@ public class RESTController {
|
||||
result.setMaxBitRate(transcodeScheme.getMaxBitRate());
|
||||
}
|
||||
|
||||
List<MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(user.getUsername());
|
||||
for (MusicFolder musicFolder : musicFolders) {
|
||||
List<org.airsonic.player.domain.MusicFolder> musicFolders = settingsService.getMusicFoldersForUser(user.getUsername());
|
||||
for (org.airsonic.player.domain.MusicFolder musicFolder : musicFolders) {
|
||||
result.getFolder().add(musicFolder.getId());
|
||||
}
|
||||
return result;
|
||||
@@ -2081,7 +2070,7 @@ public class RESTController {
|
||||
@RequestMapping(value = "/createUser")
|
||||
public void createUser(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isAdminRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to create new users.");
|
||||
return;
|
||||
@@ -2106,7 +2095,7 @@ public class RESTController {
|
||||
|
||||
int[] folderIds = ServletRequestUtils.getIntParameters(request, "musicFolderId");
|
||||
if (folderIds.length == 0) {
|
||||
folderIds = Util.toIntArray(MusicFolder.toIdList(settingsService.getAllMusicFolders()));
|
||||
folderIds = Util.toIntArray(org.airsonic.player.domain.MusicFolder.toIdList(settingsService.getAllMusicFolders()));
|
||||
}
|
||||
command.setAllowedMusicFolderIds(folderIds);
|
||||
|
||||
@@ -2117,20 +2106,20 @@ public class RESTController {
|
||||
@RequestMapping(value = "/updateUser")
|
||||
public void updateUser(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isAdminRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to update users.");
|
||||
return;
|
||||
}
|
||||
|
||||
String username = getRequiredStringParameter(request, "username");
|
||||
User u = securityService.getUserByName(username);
|
||||
org.airsonic.player.domain.User u = securityService.getUserByName(username);
|
||||
UserSettings s = settingsService.getUserSettings(username);
|
||||
|
||||
if (u == null) {
|
||||
error(request, response, ErrorCode.NOT_FOUND, "No such user: " + username);
|
||||
return;
|
||||
} else if (User.USERNAME_ADMIN.equals(username)) {
|
||||
} else if (org.airsonic.player.domain.User.USERNAME_ADMIN.equals(username)) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, "Not allowed to change admin user");
|
||||
return;
|
||||
}
|
||||
@@ -2160,7 +2149,7 @@ public class RESTController {
|
||||
|
||||
int[] folderIds = ServletRequestUtils.getIntParameters(request, "musicFolderId");
|
||||
if (folderIds.length == 0) {
|
||||
folderIds = Util.toIntArray(MusicFolder.toIdList(settingsService.getMusicFoldersForUser(username)));
|
||||
folderIds = Util.toIntArray(org.airsonic.player.domain.MusicFolder.toIdList(settingsService.getMusicFoldersForUser(username)));
|
||||
}
|
||||
command.setAllowedMusicFolderIds(folderIds);
|
||||
|
||||
@@ -2175,14 +2164,14 @@ public class RESTController {
|
||||
@RequestMapping(value = "/deleteUser")
|
||||
public void deleteUser(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
||||
request = wrapRequest(request);
|
||||
User user = securityService.getCurrentUser(request);
|
||||
org.airsonic.player.domain.User user = securityService.getCurrentUser(request);
|
||||
if (!user.isAdminRole()) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, user.getUsername() + " is not authorized to delete users.");
|
||||
return;
|
||||
}
|
||||
|
||||
String username = getRequiredStringParameter(request, "username");
|
||||
if (User.USERNAME_ADMIN.equals(username)) {
|
||||
if (org.airsonic.player.domain.User.USERNAME_ADMIN.equals(username)) {
|
||||
error(request, response, ErrorCode.NOT_AUTHORIZED, "Not allowed to delete admin user");
|
||||
return;
|
||||
}
|
||||
@@ -2402,8 +2391,8 @@ public class RESTController {
|
||||
|
||||
GENERIC(0, "A generic error."),
|
||||
MISSING_PARAMETER(10, "Required parameter is missing."),
|
||||
PROTOCOL_MISMATCH_CLIENT_TOO_OLD(20, "Incompatible Libresonic REST protocol version. Client must upgrade."),
|
||||
PROTOCOL_MISMATCH_SERVER_TOO_OLD(30, "Incompatible Libresonic REST protocol version. Server must upgrade."),
|
||||
PROTOCOL_MISMATCH_CLIENT_TOO_OLD(20, "Incompatible Airsonic REST protocol version. Client must upgrade."),
|
||||
PROTOCOL_MISMATCH_SERVER_TOO_OLD(30, "Incompatible Airsonic REST protocol version. Server must upgrade."),
|
||||
NOT_AUTHENTICATED(40, "Wrong username or password."),
|
||||
NOT_AUTHORIZED(50, "User is not authorized for the given operation."),
|
||||
NOT_FOUND(70, "Requested data was not found.");
|
||||
@@ -2430,7 +2419,7 @@ public class RESTController {
|
||||
super(username, mediaFileId);
|
||||
}
|
||||
|
||||
static BookmarkKey forBookmark(Bookmark b) {
|
||||
static BookmarkKey forBookmark(org.airsonic.player.domain.Bookmark b) {
|
||||
return new BookmarkKey(b.getUsername(), b.getMediaFileId());
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.PlayerService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.*;
|
||||
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.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import net.tanesha.recaptcha.ReCaptcha;
|
||||
import net.tanesha.recaptcha.ReCaptchaFactory;
|
||||
import net.tanesha.recaptcha.ReCaptchaResponse;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.apache.commons.lang.RandomStringUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -132,14 +132,14 @@ public class RecoverController {
|
||||
Message message = new MimeMessage(session);
|
||||
message.setFrom(new InternetAddress(settingsService.getSmtpFrom()));
|
||||
message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(email));
|
||||
message.setSubject("Libresonic Password");
|
||||
message.setSubject("Airsonic Password");
|
||||
message.setText("Hi there!\n\n" +
|
||||
"You have requested to reset your Libresonic password. Please find your new login details below.\n\n" +
|
||||
"You have requested to reset your Airsonic password. Please find your new login details below.\n\n" +
|
||||
"Username: " + username + "\n" +
|
||||
"Password: " + password + "\n\n" +
|
||||
"--\n" +
|
||||
"Your Libresonic server\n" +
|
||||
"libresonic.org");
|
||||
"Your Airsonic server\n" +
|
||||
"airsonic.org");
|
||||
message.setSentDate(new Date());
|
||||
|
||||
Transport trans = session.getTransport(prot);
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
/**
|
||||
* Used in libresonic-servlet.xml to specify frame reloading.
|
||||
* Used in servlet.xml to specify frame reloading.
|
||||
*
|
||||
* @author Sindre Mehus
|
||||
*/
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.UserSettings;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.service.VersionService;
|
||||
import org.airsonic.player.domain.UserSettings;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.service.VersionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.command.SearchCommand;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.PlayerService;
|
||||
import org.airsonic.player.service.SearchService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.command.SearchCommand;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.service.PlayerService;
|
||||
import org.libresonic.player.service.SearchService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
+9
-9
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
+10
-10
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.libresonic.player.service.RatingService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.RatingService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestUtils;
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
+11
-11
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.domain.PlayQueue;
|
||||
import org.libresonic.player.domain.Player;
|
||||
import org.libresonic.player.domain.Share;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.domain.PlayQueue;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.domain.Share;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.ServletRequestBindingException;
|
||||
|
||||
+14
-14
@@ -1,33 +1,33 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.MediaFile;
|
||||
import org.airsonic.player.domain.MusicFolder;
|
||||
import org.airsonic.player.domain.Share;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.service.ShareService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.MediaFile;
|
||||
import org.libresonic.player.domain.MusicFolder;
|
||||
import org.libresonic.player.domain.Share;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.service.MediaFileService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.service.ShareService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
+9
-9
@@ -1,27 +1,27 @@
|
||||
/*
|
||||
* This file is part of Libresonic.
|
||||
* This file is part of Airsonic.
|
||||
*
|
||||
* Libresonic is free software: you can redistribute it and/or modify
|
||||
* Airsonic 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,
|
||||
* Airsonic 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/>.
|
||||
* along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Copyright 2015 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.service.NetworkService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.service.SonosService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.service.NetworkService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.service.SonosService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
@@ -74,7 +74,7 @@ public class SonosSettingsController {
|
||||
boolean sonosEnabled = ServletRequestUtils.getBooleanParameter(request, "sonosEnabled", false);
|
||||
String sonosServiceName = StringUtils.trimToNull(request.getParameter("sonosServiceName"));
|
||||
if (sonosServiceName == null) {
|
||||
sonosServiceName = "Libresonic";
|
||||
sonosServiceName = "Airsonic";
|
||||
}
|
||||
|
||||
settingsService.setSonosEnabled(sonosEnabled);
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.dao.MediaFileDao;
|
||||
import org.libresonic.player.domain.*;
|
||||
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.airsonic.player.dao.MediaFileDao;
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.service.MediaFileService;
|
||||
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;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
+8
-8
@@ -1,24 +1,26 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.TransferStatus;
|
||||
import org.airsonic.player.service.StatusService;
|
||||
import org.jfree.chart.ChartFactory;
|
||||
import org.jfree.chart.ChartUtilities;
|
||||
import org.jfree.chart.JFreeChart;
|
||||
@@ -28,8 +30,6 @@ import org.jfree.chart.plot.XYPlot;
|
||||
import org.jfree.chart.renderer.xy.XYItemRenderer;
|
||||
import org.jfree.data.Range;
|
||||
import org.jfree.data.time.*;
|
||||
import org.libresonic.player.domain.TransferStatus;
|
||||
import org.libresonic.player.service.StatusService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.Player;
|
||||
import org.libresonic.player.domain.TransferStatus;
|
||||
import org.libresonic.player.service.StatusService;
|
||||
import org.libresonic.player.util.FileUtil;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.airsonic.player.domain.Player;
|
||||
import org.airsonic.player.domain.TransferStatus;
|
||||
import org.airsonic.player.service.StatusService;
|
||||
import org.airsonic.player.util.FileUtil;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.*;
|
||||
import org.airsonic.player.io.PlayQueueInputStream;
|
||||
import org.airsonic.player.io.RangeOutputStream;
|
||||
import org.airsonic.player.io.ShoutCastOutputStream;
|
||||
import org.airsonic.player.security.JWTAuthenticationToken;
|
||||
import org.airsonic.player.service.*;
|
||||
import org.airsonic.player.service.sonos.SonosHelper;
|
||||
import org.airsonic.player.util.HttpRange;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.airsonic.player.util.Util;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.libresonic.player.domain.*;
|
||||
import org.libresonic.player.io.PlayQueueInputStream;
|
||||
import org.libresonic.player.io.RangeOutputStream;
|
||||
import org.libresonic.player.io.ShoutCastOutputStream;
|
||||
import org.libresonic.player.security.JWTAuthenticationToken;
|
||||
import org.libresonic.player.service.*;
|
||||
import org.libresonic.player.service.sonos.SonosHelper;
|
||||
import org.libresonic.player.util.HttpRange;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.libresonic.player.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -53,7 +53,7 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* A controller which streams the content of a {@link org.libresonic.player.domain.PlayQueue} to a remote
|
||||
* A controller which streams the content of a {@link PlayQueue} to a remote
|
||||
* {@link Player}.
|
||||
*
|
||||
* @author Sindre Mehus
|
||||
@@ -178,7 +178,7 @@ public class StreamController {
|
||||
response.setContentType(StringUtil.getMimeType("ts")); // HLS is always MPEG TS.
|
||||
} else {
|
||||
String transcodedSuffix = transcodingService.getSuffix(player, file, preferredTargetFormat);
|
||||
boolean sonos = SonosHelper.LIBRESONIC_CLIENT_ID.equals(player.getClientId());
|
||||
boolean sonos = SonosHelper.AIRSONIC_CLIENT_ID.equals(player.getClientId());
|
||||
response.setContentType(StringUtil.getMimeType(transcodedSuffix, sonos));
|
||||
setContentDuration(response, file);
|
||||
}
|
||||
@@ -211,11 +211,11 @@ public class StreamController {
|
||||
boolean isShoutCastRequested = "1".equals(request.getHeader("icy-metadata"));
|
||||
if (isShoutCastRequested && !isSingleFile) {
|
||||
response.setHeader("icy-metaint", "" + ShoutCastOutputStream.META_DATA_INTERVAL);
|
||||
response.setHeader("icy-notice1", "This stream is served using Libresonic");
|
||||
response.setHeader("icy-notice2", "Libresonic - Free media streamer - libresonic.org");
|
||||
response.setHeader("icy-name", "Libresonic");
|
||||
response.setHeader("icy-notice1", "This stream is served using Airsonic");
|
||||
response.setHeader("icy-notice2", "Airsonic - Free media streamer - airsonic.org");
|
||||
response.setHeader("icy-name", "Airsonic");
|
||||
response.setHeader("icy-genre", "Mixed");
|
||||
response.setHeader("icy-url", "http://libresonic.org/");
|
||||
response.setHeader("icy-url", "http://airsonic.org/");
|
||||
out = new ShoutCastOutputStream(out, player.getPlayQueue(), settingsService);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.libresonic.player.domain.AvatarScheme;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.domain.UserSettings;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.airsonic.player.domain.AvatarScheme;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.domain.UserSettings;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
+9
-9
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.Transcoding;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.service.TranscodingService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.libresonic.player.domain.Transcoding;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.service.TranscodingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
/*
|
||||
This file is part of Libresonic.
|
||||
This file is part of Airsonic.
|
||||
|
||||
Libresonic is free software: you can redistribute it and/or modify
|
||||
Airsonic 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,
|
||||
Airsonic 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/>.
|
||||
along with Airsonic. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2016 (C) Libresonic Authors
|
||||
Copyright 2016 (C) Airsonic Authors
|
||||
Based upon Subsonic, Copyright 2009 (C) Sindre Mehus
|
||||
*/
|
||||
package org.libresonic.player.controller;
|
||||
package org.airsonic.player.controller;
|
||||
|
||||
import org.airsonic.player.domain.TransferStatus;
|
||||
import org.airsonic.player.domain.User;
|
||||
import org.airsonic.player.service.PlayerService;
|
||||
import org.airsonic.player.service.SecurityService;
|
||||
import org.airsonic.player.service.SettingsService;
|
||||
import org.airsonic.player.service.StatusService;
|
||||
import org.airsonic.player.upload.MonitoredDiskFileItemFactory;
|
||||
import org.airsonic.player.upload.UploadListener;
|
||||
import org.airsonic.player.util.StringUtil;
|
||||
import org.apache.commons.fileupload.FileItem;
|
||||
import org.apache.commons.fileupload.FileItemFactory;
|
||||
import org.apache.commons.fileupload.servlet.ServletFileUpload;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.tools.zip.ZipEntry;
|
||||
import org.apache.tools.zip.ZipFile;
|
||||
import org.libresonic.player.domain.TransferStatus;
|
||||
import org.libresonic.player.domain.User;
|
||||
import org.libresonic.player.service.PlayerService;
|
||||
import org.libresonic.player.service.SecurityService;
|
||||
import org.libresonic.player.service.SettingsService;
|
||||
import org.libresonic.player.service.StatusService;
|
||||
import org.libresonic.player.upload.MonitoredDiskFileItemFactory;
|
||||
import org.libresonic.player.upload.UploadListener;
|
||||
import org.libresonic.player.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user