Skip to content

Commit

Permalink
Merge branch 'Chocobozzz:develop' into hbaudesson/remote-runner-uploa…
Browse files Browse the repository at this point in the history
…d-external-url
  • Loading branch information
polyhb authored Jan 18, 2024
2 parents 29af130 + 0d89f63 commit 48e6f6c
Show file tree
Hide file tree
Showing 140 changed files with 23,066 additions and 21,948 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## v6.0.3

### IMPORTANT NOTES

* If you upgrade from PeerTube **< v6.0.0**, please follow v6.0.0 IMPORTANT NOTES
* If you upgrade from PeerTube **v6.0.0**, please follow v6.0.1 IMPORTANT NOTES

### SECURITY

* Prevent nginx from serving private/internal/password protected HLS video static files
* You must update your nginx configuration like in [this commit](https://github.com/Chocobozzz/PeerTube/commit/12ea8f0dd11e3fb5fbb8955f5b7d52f27332d619#diff-be9f96b9b1de67284047e610821493f9a5bec86bfcdf81a7d8d6e7904474c186) (line `202` replace `location ~ ^(/static/(webseed|web-videos|streaming-playlists)/private/)|^/download {` by `location ~ ^(/static/(webseed|web-videos|streaming-playlists/hls)/private/)|^/download {`)

### Bug fixes

* Fix HTML meta tags with attributes that contain quotes
* Fix time parsing resulting in broken video start time in some cases
* Fix WebTorrent video import crash
* Reload *Discover* page on logout
* Fix privacy error when updating a live, even if the privacy has not changed
* Fix invalid remote live state change notification that causes the player to reload
* Don't apply big play button skin to settings menu
* Fix downloading video files from object storage with some video names (that include emojis, quotes etc)
* Fix thumbnail generation when ffmpeg cannot seek the input
* Fix theme colors on stats page
* Fix input mask (used for chapters, playlist timecodes...) with 10h+ videos
* Fix chapter *position* width consistency
* Fix player ratio with audio only videos
* Also update video playlist URLs when using `update-host` script
* Fix upload/import/update of videos that contain multiple chapters with the same timecode


## v6.0.2

### IMPORTANT NOTES
Expand Down
12 changes: 6 additions & 6 deletions client/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,25 +279,25 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "PeerTube:build",
"proxyConfig": "proxy.config.json"
"proxyConfig": "proxy.config.json",
"buildTarget": "PeerTube:build"
},
"configurations": {
"production": {
"browserTarget": "PeerTube:build:production"
"buildTarget": "PeerTube:build:production"
},
"hmr": {
"browserTarget": "PeerTube:build:hmr"
"buildTarget": "PeerTube:build:hmr"
},
"ar-locale": {
"browserTarget": "PeerTube:build:ar-locale"
"buildTarget": "PeerTube:build:ar-locale"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "PeerTube:build"
"buildTarget": "PeerTube:build"
}
},
"lint": {
Expand Down
53 changes: 27 additions & 26 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "peertube-client",
"version": "6.0.2",
"version": "6.0.3",
"private": true,
"license": "AGPL-3.0",
"author": {
Expand Down Expand Up @@ -29,31 +29,31 @@
],
"typings": "*.d.ts",
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.2",
"@angular-eslint/builder": "^16.0.2",
"@angular-eslint/eslint-plugin": "^16.0.2",
"@angular-eslint/eslint-plugin-template": "^16.0.2",
"@angular-eslint/schematics": "^16.0.2",
"@angular-eslint/template-parser": "^16.0.2",
"@angular/animations": "^16.0.2",
"@angular/cdk": "^16.0.1",
"@angular/cli": "^16.0.2",
"@angular/common": "^16.0.2",
"@angular/compiler": "^16.0.2",
"@angular/compiler-cli": "^16.0.2",
"@angular/core": "^16.0.2",
"@angular/forms": "^16.0.2",
"@angular/localize": "^16.0.2",
"@angular/platform-browser": "^16.0.2",
"@angular/platform-browser-dynamic": "^16.0.2",
"@angular/router": "^16.0.2",
"@angular/service-worker": "^16.0.2",
"@angular-devkit/build-angular": "^17.0.9",
"@angular-eslint/builder": "^17.1.1",
"@angular-eslint/eslint-plugin": "^17.1.1",
"@angular-eslint/eslint-plugin-template": "^17.1.1",
"@angular-eslint/schematics": "^17.1.1",
"@angular-eslint/template-parser": "^17.1.1",
"@angular/animations": "^17.0.8",
"@angular/cdk": "^17.0.4",
"@angular/cli": "^17.0.9",
"@angular/common": "^17.0.8",
"@angular/compiler": "^17.0.8",
"@angular/compiler-cli": "^17.0.8",
"@angular/core": "^17.0.8",
"@angular/forms": "^17.0.8",
"@angular/localize": "^17.0.8",
"@angular/platform-browser": "^17.0.8",
"@angular/platform-browser-dynamic": "^17.0.8",
"@angular/router": "^17.0.8",
"@angular/service-worker": "^17.0.8",
"@babel/core": "^7.18.5",
"@babel/preset-env": "^7.18.2",
"@formatjs/intl-locale": "^3.3.1",
"@formatjs/intl-pluralrules": "^5.2.2",
"@ng-bootstrap/ng-bootstrap": "^15.1.1",
"@ng-select/ng-select": "^11.2.0",
"@ng-bootstrap/ng-bootstrap": "^16.0.0",
"@ng-select/ng-select": "^12.0.4",
"@ngx-loading-bar/core": "^6.0.0",
"@ngx-loading-bar/http-client": "^6.0.0",
"@ngx-loading-bar/router": "^6.0.0",
Expand All @@ -73,6 +73,7 @@
"@types/lodash-es": "^4.17.0",
"@types/markdown-it": "^13.0.2",
"@types/node": "^18.13.0",
"@types/qrcode": "^1.5.5",
"@types/sanitize-html": "2.9.2",
"@types/sha.js": "^2.4.0",
"@types/video.js": "^7.3.40",
Expand All @@ -84,7 +85,7 @@
"@wdio/mocha-framework": "^8.10.4",
"@wdio/shared-store-service": "^8.10.5",
"@wdio/spec-reporter": "^8.10.5",
"angularx-qrcode": "16.0.0",
"angularx-qrcode": "17.0.0",
"babel-loader": "^9.1.0",
"bootstrap": "^5.1.3",
"buffer": "^6.0.3",
Expand Down Expand Up @@ -112,7 +113,7 @@
"ngx-uploadx": "^6.1.0",
"path-browserify": "^1.0.0",
"postcss": "^8.4.14",
"primeng": "^16.0.0-rc.2",
"primeng": "^17.3.1",
"raw-loader": "^4.0.2",
"rxjs": "^7.3.0",
"sanitize-html": "^2.1.2",
Expand All @@ -126,12 +127,12 @@
"ts-loader": "^9.3.0",
"ts-node": "^10.9.1",
"tslib": "^2.4.0",
"typescript": "~5.1.0",
"typescript": "~5.2",
"video.js": "^7.19.2",
"webpack": "^5.73.0",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^5.0.1",
"zone.js": "~0.13.0"
"zone.js": "~0.14.2"
},
"dependencies": {}
}
2 changes: 1 addition & 1 deletion client/src/app/+accounts/accounts.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1 i18n-title [title]="'Created on ' + (account.createdAt | date)">{{ account.d
</div>

<div class="actor-handle">
<span>@{{ account.nameWithHost }}</span>
<span>&#64;{{ account.nameWithHost }}</span>

<my-copy-button
[value]="account.nameWithHostForced" i18n-notification notification="Username copied"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,20 @@ <h2 i18n class="inner-form-title">VIDEOS</h2>
</ng-container>
</ng-container>

<ng-container formGroupName="storyboards">

<div class="form-group">
<my-peertube-checkbox
inputName="storyboardsEnabled" formControlName="enabled"
i18n-labelText labelText="Enable video storyboards"
>
<ng-container ngProjectAs="description">
<span i18n>Generate storyboards of local videos using ffmpeg so users can see the video preview in the player while scrubbing the video</span>
</ng-container>
</my-peertube-checkbox>
</div>

</ng-container>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {

instanceCustomHomepage: {
content: null
},

storyboards: {
enabled: null
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
type="text" id="name" i18n-placeholder placeholder="Example: my_channel"
formControlName="name" [ngClass]="{ 'input-error': formErrors['name'] }" class="form-control w-auto flex-grow-1 d-block"
>
<div class="input-group-text">@{{ instanceHost }}</div>
<div class="input-group-text">&#64;{{ instanceHost }}</div>
</div>
<div *ngIf="formErrors['name']" class="form-error" role="alert">
{{ formErrors['name'] }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
formControlName="username" readonly
>
<div class="form-group-description" i18n>
People can find you using @{{ user.username }}@{{ instanceHost }}
People can find you using &#64;{{ user.username }}&#64;{{ instanceHost }}
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ <h1>
<span class="text-nowrap me-2">
<my-global-icon iconName="channel" aria-hidden="true"></my-global-icon>
<ng-container i18n>My channels</ng-container>
<span *ngIf="totalItems" class="pt-badge badge-secondary">{{ totalItems }}</span>
<span *ngIf="this.pagination.totalItems" class="pt-badge badge-secondary">{{ this.pagination.totalItems }}</span>
</span>

<div>
Expand All @@ -24,7 +24,7 @@ <h1>
</a>
</div>

<div class="no-results" i18n *ngIf="totalItems === 0">No channel found.</div>
<div class="no-results" i18n *ngIf="this.pagination.totalItems === 0">No channel found.</div>

<div class="video-channels" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [dataObservable]="onChannelDataSubject.asObservable()">
<div *ngFor="let videoChannel of videoChannels; let i = index" class="video-channel">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChartData, ChartOptions, TooltipItem, TooltipModel } from 'chart.js'
import { max, maxBy, min, minBy } from 'lodash-es'
import { Subject } from 'rxjs'
import { Subject, first, map, switchMap } from 'rxjs'
import { Component } from '@angular/core'
import { AuthService, ComponentPagination, ConfirmService, hasMoreItems, Notifier, ScreenService } from '@app/core'
import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
Expand All @@ -11,8 +11,6 @@ import { formatICU } from '@app/helpers'
styleUrls: [ './my-video-channels.component.scss' ]
})
export class MyVideoChannelsComponent {
totalItems: number

videoChannels: VideoChannel[] = []

videoChannelsChartData: ChartData[]
Expand All @@ -29,6 +27,8 @@ export class MyVideoChannelsComponent {
totalItems: null
}

private pagesDone = new Set<number>()

constructor (
private authService: AuthService,
private notifier: Notifier,
Expand All @@ -47,8 +47,7 @@ export class MyVideoChannelsComponent {
this.pagination.currentPage = 1
this.videoChannels = []

this.authService.userInformationLoaded
.subscribe(() => this.loadMoreVideoChannels())
this.loadMoreVideoChannels()
}

async deleteVideoChannel (videoChannel: VideoChannel) {
Expand Down Expand Up @@ -89,19 +88,24 @@ export class MyVideoChannelsComponent {
}

private loadMoreVideoChannels () {
const user = this.authService.getUser()
const options = {
account: user.account,
withStats: true,
search: this.search,
componentPagination: this.pagination,
sort: '-updatedAt'
}

return this.videoChannelService.listAccountVideoChannels(options)
if (this.pagesDone.has(this.pagination.currentPage)) return
this.pagesDone.add(this.pagination.currentPage)

return this.authService.userInformationLoaded
.pipe(
first(),
map(() => ({
account: this.authService.getUser().account,
withStats: true,
search: this.search,
componentPagination: this.pagination,
sort: '-updatedAt'
})),
switchMap(options => this.videoChannelService.listAccountVideoChannels(options))
)
.subscribe(res => {
this.videoChannels = this.videoChannels.concat(res.data)
this.totalItems = res.total
this.pagination.totalItems = res.total

// chart data
this.videoChannelsChartData = this.videoChannels.map(v => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class MyVideosComponent implements OnInit, DisableForReuseHook {
}
videoDropdownDisplayOptions: VideoActionsDisplayType = {
playlist: false,
download: false,
download: true,
update: false,
blacklist: false,
delete: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
type="text" id="name" i18n-placeholder placeholder="Example: sweetmelodies24"
formControlName="name" [ngClass]="{ 'input-error': formErrors['name'] }"
>
<div class="input-group-text">@{{ instanceHost }}</div>
<div class="input-group-text">&#64;{{ instanceHost }}</div>
</div>

<div *ngIf="formErrors.name" class="form-error" role="alert">{{ formErrors.name }}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
formControlName="username" class="form-control" [ngClass]="{ 'input-error': formErrors['username'] }"
autocomplete="username"
>
<span class="input-group-text">@{{ instanceHost }}</span>
<span class="input-group-text">&#64;{{ instanceHost }}</span>
</div>

<div *ngIf="formErrors.username" class="form-error" role="alert">{{ formErrors.username }}</div>
Expand Down
Loading

0 comments on commit 48e6f6c

Please sign in to comment.