1 Commits

Author SHA1 Message Date
890aedd380 typescript generator 2026-02-09 07:00:20 +01:00
4 changed files with 22 additions and 37 deletions

View File

@@ -1,8 +0,0 @@
FROM eclipse-temurin:21-jdk
WORKDIR /app
COPY yt-dlp /app
COPY target/video_downloader-0.0.1-SNAPSHOT.jar /app
CMD ["java", "-jar", "/app/video_downloader-0.0.1-SNAPSHOT.jar"]

22
pom.xml
View File

@@ -75,7 +75,29 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>cz.habarta.typescript-generator</groupId>
<artifactId>typescript-generator-maven-plugin</artifactId>
<version>3.2.1263</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<jsonLibrary>jackson2</jsonLibrary>
<classes>
<class>com.example.video_downloader.dto.SaveNewVideoRequest</class>
</classes>
<outputKind>module</outputKind>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,29 +0,0 @@
package com.example.video_downloader.services;
import jakarta.annotation.PostConstruct;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@Service
public class ProcessService {
@PostConstruct
public void init() throws InterruptedException, IOException {
System.out.println("Init...");
ProcessBuilder builder = new ProcessBuilder("/app/yt-dlp");
Process process = builder.start();
process.waitFor();
String text = new String(process.getInputStream().readAllBytes(), StandardCharsets.UTF_8);
String text2 = new String(process.getErrorStream().readAllBytes(), StandardCharsets.UTF_8);
System.out.println(text);
System.out.println(text2);
System.out.println("Marker...");
}
}

BIN
yt-dlp

Binary file not shown.