mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-30 16:40:55 +03:00
Added backend and database support for video streaming
Added UI support for video streaming. branch is now feature-complete
This commit is contained in:
@@ -29,8 +29,10 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</div>
|
||||
<div>
|
||||
<mat-checkbox [(ngModel)]="streamingOnlyMode">Streaming-only mode</mat-checkbox>
|
||||
<div class="col-12">
|
||||
<div>
|
||||
<mat-checkbox [(ngModel)]="streamingOnlyMode">Streaming-only mode</mat-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -49,8 +49,7 @@ export class SubscribeDialogComponent implements OnInit {
|
||||
if (!this.download_all) {
|
||||
timerange = 'now-' + this.timerange_amount.toString() + this.timerange_unit;
|
||||
}
|
||||
|
||||
this.postsService.createSubscription(this.url, this.name, timerange).subscribe(res => {
|
||||
this.postsService.createSubscription(this.url, this.name, timerange, this.streamingOnlyMode).subscribe(res => {
|
||||
this.subscribing = false;
|
||||
if (res['new_sub']) {
|
||||
this.dialogRef.close(res['new_sub']);
|
||||
|
||||
@@ -184,8 +184,8 @@ export class PostsService {
|
||||
return this.http.post(this.path + 'deletePlaylist', {playlistID: playlistID, type: type});
|
||||
}
|
||||
|
||||
createSubscription(url, name, timerange = null) {
|
||||
return this.http.post(this.path + 'subscribe', {url: url, name: name, timerange: timerange})
|
||||
createSubscription(url, name, timerange = null, streamingOnly = false) {
|
||||
return this.http.post(this.path + 'subscribe', {url: url, name: name, timerange: timerange, streamingOnly: streamingOnly});
|
||||
}
|
||||
|
||||
unsubscribe(sub, deleteMode = false) {
|
||||
|
||||
@@ -54,7 +54,11 @@ export class SubscriptionFileCardComponent implements OnInit {
|
||||
}
|
||||
|
||||
goToFile() {
|
||||
this.goToFileEmit.emit(this.file.id);
|
||||
const emit_obj = {
|
||||
name: this.file.id,
|
||||
url: this.file.requested_formats ? this.file.requested_formats[0].url : this.file.url
|
||||
}
|
||||
this.goToFileEmit.emit(emit_obj);
|
||||
}
|
||||
|
||||
openSubscriptionInfoDialog() {
|
||||
|
||||
@@ -84,10 +84,16 @@ export class SubscriptionComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
goToFile(name) {
|
||||
goToFile(emit_obj) {
|
||||
const name = emit_obj['name'];
|
||||
const url = emit_obj['url'];
|
||||
localStorage.setItem('player_navigator', this.router.url);
|
||||
this.router.navigate(['/player', {fileNames: name, type: 'subscription', subscriptionName: this.subscription.name,
|
||||
subPlaylist: this.subscription.isPlaylist}]);
|
||||
if (this.subscription.streamingOnly) {
|
||||
this.router.navigate(['/player', {name: name, url: url}]);
|
||||
} else {
|
||||
this.router.navigate(['/player', {fileNames: name, type: 'subscription', subscriptionName: this.subscription.name,
|
||||
subPlaylist: this.subscription.isPlaylist}]);
|
||||
}
|
||||
}
|
||||
|
||||
onSearchInputChanged(newvalue) {
|
||||
|
||||
Reference in New Issue
Block a user