Merge remote-tracking branch 'origin/pr/1091'
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ public class AccessDeniedController {
|
|||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
public ModelAndView accessDenied(HttpServletRequest request, HttpServletResponse response) {
|
public ModelAndView accessDenied(HttpServletRequest request, HttpServletResponse response) {
|
||||||
LOG.info("The IP {0} tried to access the forbidden url {1}.", request.getRemoteAddr(), request.getRequestURL());
|
LOG.info("The IP {} tried to access the forbidden url {}.", request.getRemoteAddr(), request.getRequestURL());
|
||||||
return new ModelAndView("accessDenied");
|
return new ModelAndView("accessDenied");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -56,11 +56,11 @@ public class PodcastReceiverAdminController {
|
|||||||
podcastService.createChannel(url);
|
podcastService.createChannel(url);
|
||||||
return new ModelAndView(new RedirectView("podcastChannels.view"));
|
return new ModelAndView(new RedirectView("podcastChannels.view"));
|
||||||
}
|
}
|
||||||
if (request.getParameter("downloadEpisode") != null) {
|
if (request.getParameter("downloadEpisode") != null && channelId != null) {
|
||||||
download(StringUtil.parseInts(request.getParameter("downloadEpisode")));
|
download(StringUtil.parseInts(request.getParameter("downloadEpisode")));
|
||||||
return new ModelAndView(new RedirectView("podcastChannel.view?id=" + channelId));
|
return new ModelAndView(new RedirectView("podcastChannel.view?id=" + channelId));
|
||||||
}
|
}
|
||||||
if (request.getParameter("deleteChannel") != null) {
|
if (request.getParameter("deleteChannel") != null && channelId != null) {
|
||||||
podcastService.deleteChannel(channelId);
|
podcastService.deleteChannel(channelId);
|
||||||
return new ModelAndView(new RedirectView("podcastChannels.view"));
|
return new ModelAndView(new RedirectView("podcastChannels.view"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import org.springframework.web.util.UriComponentsBuilder;
|
|||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,6 +121,8 @@ public class AlbumUpnpProcessor extends UpnpContentProcessor <Album, MediaFile>
|
|||||||
albumList = ap.getChildren(ap.getItemById(album.getComment().replaceAll(ALL_BY_ARTIST + "_", "")));
|
albumList = ap.getChildren(ap.getItemById(album.getComment().replaceAll(ALL_BY_ARTIST + "_", "")));
|
||||||
} else if (album.getComment().equalsIgnoreCase(ALL_RECENT)) {
|
} else if (album.getComment().equalsIgnoreCase(ALL_RECENT)) {
|
||||||
albumList = getDispatcher().getRecentAlbumProcessor().getAllItems();
|
albumList = getDispatcher().getRecentAlbumProcessor().getAllItems();
|
||||||
|
} else {
|
||||||
|
albumList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
for (Album a: albumList) {
|
for (Album a: albumList) {
|
||||||
if (a.getId() != -1) {
|
if (a.getId() != -1) {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class HttpRange {
|
|||||||
String firstString = matcher.group(1);
|
String firstString = matcher.group(1);
|
||||||
String lastString = StringUtils.trimToNull(matcher.group(2));
|
String lastString = StringUtils.trimToNull(matcher.group(2));
|
||||||
|
|
||||||
Long first = Long.parseLong(firstString);
|
long first = Long.parseLong(firstString);
|
||||||
Long last = lastString == null ? null : Long.parseLong(lastString);
|
Long last = lastString == null ? null : Long.parseLong(lastString);
|
||||||
|
|
||||||
if (last != null && first > last) {
|
if (last != null && first > last) {
|
||||||
|
|||||||
Reference in New Issue
Block a user