mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-13 22:00: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(() -> {
|
||||
for (var entry : feed.getEntries()) {
|
||||
ResponseHelper.handleNewVideo(entry.getLinks().get(0).getHref(),
|
||||
entry.getPublishedDate().getTime(), null);
|
||||
String url = entry.getLinks().get(0).getHref();
|
||||
if (DatabaseHelper.getVideoFromId(StringUtils.substring(url, -11)) != null)
|
||||
continue;
|
||||
ResponseHelper.handleNewVideo(url, entry.getPublishedDate().getTime(), null);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user