|
|
@ -19,34 +19,39 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.libresonic.player.controller; |
|
|
|
package org.libresonic.player.controller; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import org.libresonic.player.service.PodcastService; |
|
|
|
import java.util.Map; |
|
|
|
import org.libresonic.player.service.SecurityService; |
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.web.bind.ServletRequestUtils; |
|
|
|
import org.springframework.web.bind.ServletRequestUtils; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod; |
|
|
|
import org.springframework.web.servlet.ModelAndView; |
|
|
|
import org.springframework.web.servlet.ModelAndView; |
|
|
|
import org.springframework.web.servlet.mvc.ParameterizableViewController; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.libresonic.player.service.PodcastService; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import org.libresonic.player.service.SecurityService; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Controller for the "Podcast channel" page. |
|
|
|
* Controller for the "Podcast channel" page. |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Sindre Mehus |
|
|
|
* @author Sindre Mehus |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class PodcastChannelController extends ParameterizableViewController { |
|
|
|
@Controller |
|
|
|
|
|
|
|
@RequestMapping("/podcastChannel") |
|
|
|
|
|
|
|
public class PodcastChannelController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
private PodcastService podcastService; |
|
|
|
private PodcastService podcastService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private SecurityService securityService; |
|
|
|
private SecurityService securityService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@RequestMapping(method = RequestMethod.GET) |
|
|
|
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { |
|
|
|
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<String, Object>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
ModelAndView result = super.handleRequestInternal(request, response); |
|
|
|
ModelAndView result = new ModelAndView(); |
|
|
|
result.addObject("model", map); |
|
|
|
result.addObject("model", map); |
|
|
|
|
|
|
|
|
|
|
|
int channelId = ServletRequestUtils.getRequiredIntParameter(request, "id"); |
|
|
|
int channelId = ServletRequestUtils.getRequiredIntParameter(request, "id"); |
|
|
@ -57,11 +62,4 @@ public class PodcastChannelController extends ParameterizableViewController { |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setPodcastService(PodcastService podcastService) { |
|
|
|
|
|
|
|
this.podcastService = podcastService; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setSecurityService(SecurityService securityService) { |
|
|
|
|
|
|
|
this.securityService = securityService; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|