diff --git a/.github/workflows/docker-build-test.yml b/.github/workflows/docker-build-test.yml index b534b7f..8ccbd58 100644 --- a/.github/workflows/docker-build-test.yml +++ b/.github/workflows/docker-build-test.yml @@ -42,16 +42,16 @@ jobs: - name: Create Version File run: echo $(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD) > VERSION - name: Build Image Locally - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . load: true file: ${{ matrix.dockerfile }} tags: 1337kavin/piped:latest - name: Start Docker-Compose services - run: docker-compose -f ${{ matrix.docker-compose-file }} up -d && sleep ${{ matrix.sleep }} + run: docker compose -f ${{ matrix.docker-compose-file }} up -d && sleep ${{ matrix.sleep }} - name: Run tests run: ./testing/api-test.sh - name: Collect services logs if: failure() - run: docker-compose -f ${{ matrix.docker-compose-file }} logs + run: docker compose -f ${{ matrix.docker-compose-file }} logs diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index ee26e45..8d72614 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -47,7 +47,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . file: ${{ matrix.dockerfile }} diff --git a/.github/workflows/docker-migrations-build-test.yml b/.github/workflows/docker-migrations-build-test.yml index ca18b97..d344b92 100644 --- a/.github/workflows/docker-migrations-build-test.yml +++ b/.github/workflows/docker-migrations-build-test.yml @@ -54,29 +54,29 @@ jobs: with: name: piped-old.jar - name: Build Old Image Locally - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . load: true file: ${{ matrix.dockerfile }} tags: 1337kavin/piped:latest - name: Start Docker-Compose services - run: docker-compose -f ${{ matrix.docker-compose-file }} up -d && sleep ${{ matrix.sleep }} + run: docker compose -f ${{ matrix.docker-compose-file }} up -d && sleep ${{ matrix.sleep }} - run: rm piped.jar - uses: actions/download-artifact@v4 with: name: piped.jar - name: Build New Image Locally - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . load: true file: ${{ matrix.dockerfile }} tags: 1337kavin/piped:latest - name: Start Docker-Compose services - run: docker-compose -f ${{ matrix.docker-compose-file }} up -d && sleep ${{ matrix.sleep }} + run: docker compose -f ${{ matrix.docker-compose-file }} up -d && sleep ${{ matrix.sleep }} - name: Run tests run: ./testing/api-test.sh - name: Collect services logs if: failure() - run: docker-compose -f ${{ matrix.docker-compose-file }} logs + run: docker compose -f ${{ matrix.docker-compose-file }} logs diff --git a/build.gradle b/build.gradle index b1409f8..78a6f3d 100644 --- a/build.gradle +++ b/build.gradle @@ -14,38 +14,38 @@ dependencies { implementation 'org.apache.commons:commons-text:1.12.0' implementation 'commons-io:commons-io:2.16.1' implementation 'it.unimi.dsi:fastutil-core:8.5.13' - implementation 'commons-codec:commons-codec:1.16.1' + implementation 'commons-codec:commons-codec:1.17.0' implementation 'org.bouncycastle:bcprov-jdk18on:1.78.1' - implementation 'com.github.FireMasterK.NewPipeExtractor:NewPipeExtractor:fcb1d28f5b7c5c2dd74f54b047c4978cc672a66c' + implementation 'com.github.FireMasterK.NewPipeExtractor:NewPipeExtractor:d486c3f4220c5b3fd045e614cd1662cdee437d13' implementation 'com.github.FireMasterK:nanojson:9f4af3b739cc13f3d0d9d4b758bbe2b2ae7119d7' - implementation 'com.fasterxml.jackson.core:jackson-core:2.17.0' - implementation 'com.fasterxml.jackson.core:jackson-annotations:2.17.0' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0' + implementation 'com.fasterxml.jackson.core:jackson-core:2.17.2' + implementation 'com.fasterxml.jackson.core:jackson-annotations:2.17.2' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2' implementation 'com.rometools:rome:2.1.0' implementation 'com.rometools:rome-modules:2.1.0' - implementation 'org.jsoup:jsoup:1.17.2' + implementation 'org.jsoup:jsoup:1.18.1' implementation 'io.activej:activej-common:5.5' implementation 'io.activej:activej-http:5.5' implementation 'io.activej:activej-boot:5.5' implementation 'io.activej:activej-specializer:5.5' implementation 'io.activej:activej-launchers-http:5.5' - implementation 'org.hsqldb:hsqldb:2.7.2' + implementation 'org.hsqldb:hsqldb:2.7.3' implementation 'org.postgresql:postgresql:42.7.3' implementation 'org.hibernate:hibernate-core:6.4.1.Final' implementation 'org.hibernate:hibernate-hikaricp:6.4.1.Final' - implementation 'org.liquibase:liquibase-core:4.27.0' - implementation('org.liquibase.ext:liquibase-yugabytedb:4.27.0') { exclude group: 'org.liquibase' } + implementation 'org.liquibase:liquibase-core:4.28.0' + implementation('org.liquibase.ext:liquibase-yugabytedb:4.28.0') { exclude group: 'org.liquibase' } implementation 'com.zaxxer:HikariCP:5.1.0' - implementation 'org.springframework.security:spring-security-crypto:6.2.4' - implementation 'commons-logging:commons-logging:1.3.1' + implementation 'org.springframework.security:spring-security-crypto:6.3.1' + implementation 'commons-logging:commons-logging:1.3.3' implementation(platform("com.squareup.okhttp3:okhttp-bom:4.12.0")) implementation 'com.squareup.okhttp3:okhttp' implementation 'com.squareup.okhttp3:okhttp-brotli' - implementation 'io.sentry:sentry:7.8.0' + implementation 'io.sentry:sentry:7.11.0' implementation 'rocks.kavin:reqwest4j:1.0.14' - implementation 'io.minio:minio:8.5.10' - compileOnly 'org.projectlombok:lombok:1.18.32' - annotationProcessor 'org.projectlombok:lombok:1.18.32' + implementation 'io.minio:minio:8.5.11' + compileOnly 'org.projectlombok:lombok:1.18.34' + annotationProcessor 'org.projectlombok:lombok:1.18.34' } shadowJar { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e644113..2c35211 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5c0c423..6699604 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://downloads.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://downloads.gradle.org/distributions/gradle-8.9-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a4..f5feea6 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 7101f8e..9b42019 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## diff --git a/src/main/java/me/kavin/piped/utils/CollectionUtils.java b/src/main/java/me/kavin/piped/utils/CollectionUtils.java index ded6c24..97726c8 100644 --- a/src/main/java/me/kavin/piped/utils/CollectionUtils.java +++ b/src/main/java/me/kavin/piped/utils/CollectionUtils.java @@ -76,9 +76,10 @@ public class CollectionUtils { ))); return new Streams(info.getName(), info.getDescription().getContent(), - info.getTextualUploadDate(), info.getUploaderName(), substringYouTube(info.getUploaderUrl()), - getLastThumbnail(info.getUploaderAvatars()), getLastThumbnail(info.getThumbnails()), info.getDuration(), - info.getViewCount(), info.getLikeCount(), info.getDislikeCount(), info.getUploaderSubscriberCount(), info.isUploaderVerified(), + info.getTextualUploadDate(), info.getUploadDate() != null ? info.getUploadDate().offsetDateTime().toInstant().toEpochMilli() : -1, + info.getUploaderName(), substringYouTube(info.getUploaderUrl()), getLastThumbnail(info.getUploaderAvatars()), + getLastThumbnail(info.getThumbnails()), info.getDuration(), info.getViewCount(), info.getLikeCount(), info.getDislikeCount(), + info.getUploaderSubscriberCount(), info.isUploaderVerified(), audioStreams, videoStreams, relatedStreams, subtitles, livestream, rewriteVideoURL(info.getHlsUrl(), Map.of()), rewriteVideoURL(info.getDashMpdUrl(), Map.of()), null, info.getCategory(), info.getLicence(), info.getPrivacy().name().toLowerCase(), info.getTags(), metaInfo, chapters, previewFrames); diff --git a/src/main/java/me/kavin/piped/utils/obj/Streams.java b/src/main/java/me/kavin/piped/utils/obj/Streams.java index 478a37b..e0c2dd6 100644 --- a/src/main/java/me/kavin/piped/utils/obj/Streams.java +++ b/src/main/java/me/kavin/piped/utils/obj/Streams.java @@ -17,7 +17,7 @@ public class Streams { public boolean uploaderVerified; - public long duration, views, likes, dislikes, uploaderSubscriberCount; + public long duration, views, likes, dislikes, uploaderSubscriberCount, uploaded; public List audioStreams, videoStreams; @@ -33,7 +33,7 @@ public class Streams { public List previewFrames; - public Streams(String title, String description, String uploadDate, String uploader, String uploaderUrl, + public Streams(String title, String description, String uploadDate, long uploaded, String uploader, String uploaderUrl, String uploaderAvatar, String thumbnailUrl, long duration, long views, long likes, long dislikes, long uploaderSubscriberCount, boolean uploaderVerified, List audioStreams, List videoStreams, List relatedStreams, List subtitles, boolean livestream, String hls, String dash, @@ -42,6 +42,7 @@ public class Streams { this.title = title; this.description = description; this.uploadDate = uploadDate; + this.uploaded = uploaded; this.uploader = uploader; this.uploaderUrl = uploaderUrl; this.uploaderAvatar = uploaderAvatar;