mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-13 22:00:29 +05:30
Merge remote-tracking branch 'origin/master' into playlist-bookmarks
This commit is contained in:
commit
4c319a8434
6
.github/workflows/docker-build-test.yml
vendored
6
.github/workflows/docker-build-test.yml
vendored
@ -42,16 +42,16 @@ jobs:
|
|||||||
- name: Create Version File
|
- name: Create Version File
|
||||||
run: echo $(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD) > VERSION
|
run: echo $(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD) > VERSION
|
||||||
- name: Build Image Locally
|
- name: Build Image Locally
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
load: true
|
load: true
|
||||||
file: ${{ matrix.dockerfile }}
|
file: ${{ matrix.dockerfile }}
|
||||||
tags: 1337kavin/piped:latest
|
tags: 1337kavin/piped:latest
|
||||||
- name: Start Docker-Compose services
|
- 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
|
- name: Run tests
|
||||||
run: ./testing/api-test.sh
|
run: ./testing/api-test.sh
|
||||||
- name: Collect services logs
|
- name: Collect services logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: docker-compose -f ${{ matrix.docker-compose-file }} logs
|
run: docker compose -f ${{ matrix.docker-compose-file }} logs
|
||||||
|
2
.github/workflows/docker-build.yml
vendored
2
.github/workflows/docker-build.yml
vendored
@ -47,7 +47,7 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ${{ matrix.dockerfile }}
|
file: ${{ matrix.dockerfile }}
|
||||||
|
@ -54,29 +54,29 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: piped-old.jar
|
name: piped-old.jar
|
||||||
- name: Build Old Image Locally
|
- name: Build Old Image Locally
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
load: true
|
load: true
|
||||||
file: ${{ matrix.dockerfile }}
|
file: ${{ matrix.dockerfile }}
|
||||||
tags: 1337kavin/piped:latest
|
tags: 1337kavin/piped:latest
|
||||||
- name: Start Docker-Compose services
|
- 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
|
- run: rm piped.jar
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: piped.jar
|
name: piped.jar
|
||||||
- name: Build New Image Locally
|
- name: Build New Image Locally
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
load: true
|
load: true
|
||||||
file: ${{ matrix.dockerfile }}
|
file: ${{ matrix.dockerfile }}
|
||||||
tags: 1337kavin/piped:latest
|
tags: 1337kavin/piped:latest
|
||||||
- name: Start Docker-Compose services
|
- 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
|
- name: Run tests
|
||||||
run: ./testing/api-test.sh
|
run: ./testing/api-test.sh
|
||||||
- name: Collect services logs
|
- name: Collect services logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: docker-compose -f ${{ matrix.docker-compose-file }} logs
|
run: docker compose -f ${{ matrix.docker-compose-file }} logs
|
||||||
|
30
build.gradle
30
build.gradle
@ -14,38 +14,38 @@ dependencies {
|
|||||||
implementation 'org.apache.commons:commons-text:1.12.0'
|
implementation 'org.apache.commons:commons-text:1.12.0'
|
||||||
implementation 'commons-io:commons-io:2.16.1'
|
implementation 'commons-io:commons-io:2.16.1'
|
||||||
implementation 'it.unimi.dsi:fastutil-core:8.5.13'
|
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 '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.github.FireMasterK:nanojson:9f4af3b739cc13f3d0d9d4b758bbe2b2ae7119d7'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-core:2.17.0'
|
implementation 'com.fasterxml.jackson.core:jackson-core:2.17.2'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.17.0'
|
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.17.2'
|
||||||
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
|
||||||
implementation 'com.rometools:rome:2.1.0'
|
implementation 'com.rometools:rome:2.1.0'
|
||||||
implementation 'com.rometools:rome-modules: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-common:5.5'
|
||||||
implementation 'io.activej:activej-http:5.5'
|
implementation 'io.activej:activej-http:5.5'
|
||||||
implementation 'io.activej:activej-boot:5.5'
|
implementation 'io.activej:activej-boot:5.5'
|
||||||
implementation 'io.activej:activej-specializer:5.5'
|
implementation 'io.activej:activej-specializer:5.5'
|
||||||
implementation 'io.activej:activej-launchers-http: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.postgresql:postgresql:42.7.3'
|
||||||
implementation 'org.hibernate:hibernate-core:6.4.1.Final'
|
implementation 'org.hibernate:hibernate-core:6.4.1.Final'
|
||||||
implementation 'org.hibernate:hibernate-hikaricp:6.4.1.Final'
|
implementation 'org.hibernate:hibernate-hikaricp:6.4.1.Final'
|
||||||
implementation 'org.liquibase:liquibase-core:4.27.0'
|
implementation 'org.liquibase:liquibase-core:4.28.0'
|
||||||
implementation('org.liquibase.ext:liquibase-yugabytedb:4.27.0') { exclude group: 'org.liquibase' }
|
implementation('org.liquibase.ext:liquibase-yugabytedb:4.28.0') { exclude group: 'org.liquibase' }
|
||||||
implementation 'com.zaxxer:HikariCP:5.1.0'
|
implementation 'com.zaxxer:HikariCP:5.1.0'
|
||||||
implementation 'org.springframework.security:spring-security-crypto:6.2.4'
|
implementation 'org.springframework.security:spring-security-crypto:6.3.1'
|
||||||
implementation 'commons-logging:commons-logging:1.3.1'
|
implementation 'commons-logging:commons-logging:1.3.3'
|
||||||
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.12.0"))
|
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.12.0"))
|
||||||
implementation 'com.squareup.okhttp3:okhttp'
|
implementation 'com.squareup.okhttp3:okhttp'
|
||||||
implementation 'com.squareup.okhttp3:okhttp-brotli'
|
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 'rocks.kavin:reqwest4j:1.0.14'
|
||||||
implementation 'io.minio:minio:8.5.10'
|
implementation 'io.minio:minio:8.5.11'
|
||||||
compileOnly 'org.projectlombok:lombok:1.18.32'
|
compileOnly 'org.projectlombok:lombok:1.18.34'
|
||||||
annotationProcessor 'org.projectlombok:lombok:1.18.32'
|
annotationProcessor 'org.projectlombok:lombok:1.18.34'
|
||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
7
gradlew
vendored
7
gradlew
vendored
@ -15,6 +15,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@ -55,7 +57,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (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.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@ -84,7 +86,8 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# 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.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
2
gradlew.bat
vendored
2
gradlew.bat
vendored
@ -13,6 +13,8 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
@ -76,9 +76,10 @@ public class CollectionUtils {
|
|||||||
)));
|
)));
|
||||||
|
|
||||||
return new Streams(info.getName(), info.getDescription().getContent(),
|
return new Streams(info.getName(), info.getDescription().getContent(),
|
||||||
info.getTextualUploadDate(), info.getUploaderName(), substringYouTube(info.getUploaderUrl()),
|
info.getTextualUploadDate(), info.getUploadDate() != null ? info.getUploadDate().offsetDateTime().toInstant().toEpochMilli() : -1,
|
||||||
getLastThumbnail(info.getUploaderAvatars()), getLastThumbnail(info.getThumbnails()), info.getDuration(),
|
info.getUploaderName(), substringYouTube(info.getUploaderUrl()), getLastThumbnail(info.getUploaderAvatars()),
|
||||||
info.getViewCount(), info.getLikeCount(), info.getDislikeCount(), info.getUploaderSubscriberCount(), info.isUploaderVerified(),
|
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()),
|
audioStreams, videoStreams, relatedStreams, subtitles, livestream, rewriteVideoURL(info.getHlsUrl(), Map.of()),
|
||||||
rewriteVideoURL(info.getDashMpdUrl(), Map.of()), null, info.getCategory(), info.getLicence(),
|
rewriteVideoURL(info.getDashMpdUrl(), Map.of()), null, info.getCategory(), info.getLicence(),
|
||||||
info.getPrivacy().name().toLowerCase(), info.getTags(), metaInfo, chapters, previewFrames);
|
info.getPrivacy().name().toLowerCase(), info.getTags(), metaInfo, chapters, previewFrames);
|
||||||
|
@ -17,7 +17,7 @@ public class Streams {
|
|||||||
|
|
||||||
public boolean uploaderVerified;
|
public boolean uploaderVerified;
|
||||||
|
|
||||||
public long duration, views, likes, dislikes, uploaderSubscriberCount;
|
public long duration, views, likes, dislikes, uploaderSubscriberCount, uploaded;
|
||||||
|
|
||||||
public List<PipedStream> audioStreams, videoStreams;
|
public List<PipedStream> audioStreams, videoStreams;
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ public class Streams {
|
|||||||
|
|
||||||
public List<PreviewFrames> previewFrames;
|
public List<PreviewFrames> 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,
|
String uploaderAvatar, String thumbnailUrl, long duration, long views, long likes, long dislikes, long uploaderSubscriberCount,
|
||||||
boolean uploaderVerified, List<PipedStream> audioStreams, List<PipedStream> videoStreams,
|
boolean uploaderVerified, List<PipedStream> audioStreams, List<PipedStream> videoStreams,
|
||||||
List<ContentItem> relatedStreams, List<Subtitle> subtitles, boolean livestream, String hls, String dash,
|
List<ContentItem> relatedStreams, List<Subtitle> subtitles, boolean livestream, String hls, String dash,
|
||||||
@ -42,6 +42,7 @@ public class Streams {
|
|||||||
this.title = title;
|
this.title = title;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this.uploadDate = uploadDate;
|
this.uploadDate = uploadDate;
|
||||||
|
this.uploaded = uploaded;
|
||||||
this.uploader = uploader;
|
this.uploader = uploader;
|
||||||
this.uploaderUrl = uploaderUrl;
|
this.uploaderUrl = uploaderUrl;
|
||||||
this.uploaderAvatar = uploaderAvatar;
|
this.uploaderAvatar = uploaderAvatar;
|
||||||
|
Loading…
Reference in New Issue
Block a user