mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-14 06:10:29 +05:30
Avoid duplicate video errors. (#300)
This commit is contained in:
parent
c8628dcf05
commit
cdd8a962d7
@ -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…
Reference in New Issue
Block a user