fix(FileService): update User-Agent header for ComicVine to let the Parser through (#1880)
* fix(FileService): update User-Agent header for improved metadata fetching Signed-off-by: Balázs Szücs <bszucs1209@gmail.com> * fix(ComicvineBookParser): update User-Agent header for enhanced metadata fetching Signed-off-by: Balázs Szücs <bszucs1209@gmail.com> --------- Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@ public class ComicvineBookParser implements BookParser {
|
||||
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(uri)
|
||||
.header("User-Agent", "Booklore/1.0")
|
||||
.header("User-Agent", "BookLore/1.0 (Book and Comic Metadata Fetcher; +https://github.com/booklore-app/booklore)")
|
||||
.GET()
|
||||
.build();
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ public class FileService {
|
||||
public BufferedImage downloadImageFromUrl(String imageUrl) throws IOException {
|
||||
try {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set(HttpHeaders.USER_AGENT, "BookLore/1.0 (Metadata Fetcher)");
|
||||
headers.set(HttpHeaders.USER_AGENT, "BookLore/1.0 (Book and Comic Metadata Fetcher; +https://github.com/booklore-app/booklore)");
|
||||
headers.set(HttpHeaders.ACCEPT, "image/*");
|
||||
|
||||
HttpEntity<String> entity = new HttpEntity<>(headers);
|
||||
|
||||
Reference in New Issue
Block a user