playlist_service #2
Reference in New Issue
Block a user
Delete Branch "playlist_service"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@@ -23,3 +20,3 @@@Dataprivate class Response {private static class Response {Move this to a new File
dto package-be SaveNewVideoResponse.java
@@ -12,1 +23,4 @@@Autowiredprivate VideoRepository videoRepository;@PostConstructHozz letre egy YtDlpService-t a VideoService mintajara es oda keruljon at a validateVideos() methodus.
Es nevezd at downloadNewVideos-ra
@@ -15,0 +27,4 @@public void validateVideos() throws HttpClientErrorException, IOException, InterruptedException {List<Video> response = videoRepository.findUrlByStatus(StatusEnum.NEW);for(Video video : response) {if(video.getStatus().equals(StatusEnum.NEW)){Az adatbazisbol mar csak azokat a videokat akarjuk lekerdezni ahol a status new szoval itt folosleges megegyszer ellenorizni.
Amennyiben olyan videokat is vissza ad amiben a status nem new, ott akkor a lekerdezesd kell javitani nem pedig ujra ellenorizni.
Valszeg findByStatus(StatusEnum.NEW) az mukodik, a findUrlByStatus ugy hangzik mint ha a tablabol csak az URL oszlopot akarnad lekerdezni, de az egesz videot kered vissza. Szoval itt felre vezeto a methodus elnevezese es nem is biztos hogy azt csinalja amit kene.