Complete adding support.

This commit is contained in:
FireMasterK 2021-07-05 00:20:01 +05:30
parent 3659a43bdf
commit a8e296f200
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD
2 changed files with 7 additions and 1 deletions

View file

@ -122,6 +122,13 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher {
} catch (Exception e) {
return getErrorResponse(e);
}
})).map("/rss/playlists/:playlistId", AsyncServlet.ofBlocking(executor, request -> {
try {
return getJsonResponse(ResponseHelper.playlistRSSResponse(request.getPathParameter("playlistId")),
"public, s-maxage=600");
} catch (Exception e) {
return getErrorResponse(e);
}
})).map("/suggestions", AsyncServlet.ofBlocking(executor, request -> {
try {
return getJsonResponse(ResponseHelper.suggestionsResponse(request.getQueryParameter("query")),

View file

@ -305,7 +305,6 @@ public class ResponseHelper {
entry.setAuthor(item.getUploaderName());
entry.setUri(item.getUrl());
entry.setTitle(item.getName());
entry.setForeignMarkup(null)
entries.add(entry);
});