mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Avoid duplicate video errors. (#300)
This commit is contained in:
parent
c8628dcf05
commit
cdd8a962d7
1 changed files with 4 additions and 2 deletions
|
@ -64,8 +64,10 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher {
|
||||||
|
|
||||||
Multithreading.runAsync(() -> {
|
Multithreading.runAsync(() -> {
|
||||||
for (var entry : feed.getEntries()) {
|
for (var entry : feed.getEntries()) {
|
||||||
ResponseHelper.handleNewVideo(entry.getLinks().get(0).getHref(),
|
String url = entry.getLinks().get(0).getHref();
|
||||||
entry.getPublishedDate().getTime(), null);
|
if (DatabaseHelper.getVideoFromId(StringUtils.substring(url, -11)) != null)
|
||||||
|
continue;
|
||||||
|
ResponseHelper.handleNewVideo(url, entry.getPublishedDate().getTime(), null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue