Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into playlist-bookmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMasterK committed Jul 11, 2024
2 parents c09acaa + 6380cea commit 4c319a8
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docker-migrations-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
30 changes: 15 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -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/.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##########################################################################
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/me/kavin/piped/utils/CollectionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ public static Streams collectStreamInfo(StreamInfo info) {
)));

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);
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/me/kavin/piped/utils/obj/Streams.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<PipedStream> audioStreams, videoStreams;

Expand All @@ -33,7 +33,7 @@ public class Streams {

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,
boolean uploaderVerified, List<PipedStream> audioStreams, List<PipedStream> videoStreams,
List<ContentItem> relatedStreams, List<Subtitle> subtitles, boolean livestream, String hls, String dash,
Expand All @@ -42,6 +42,7 @@ public Streams(String title, String description, String uploadDate, String uploa
this.title = title;
this.description = description;
this.uploadDate = uploadDate;
this.uploaded = uploaded;
this.uploader = uploader;
this.uploaderUrl = uploaderUrl;
this.uploaderAvatar = uploaderAvatar;
Expand Down

0 comments on commit 4c319a8

Please sign in to comment.