mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-21 05:43:20 +03:00
Merge branch 'master' of https://github.com/Tzahi12345/YoutubeDL-Material into updated-player
This commit is contained in:
@@ -34,6 +34,9 @@
|
|||||||
<div *ngFor="let file of paged_data; let i = index" class="mb-2 mt-2 d-flex justify-content-center" [ngClass]="[ postsService.card_size === 'small' ? 'col-2 small-col' : '', postsService.card_size === 'medium' ? 'col-6 col-lg-4 medium-col' : '', postsService.card_size === 'large' ? 'col-12 large-col' : '' ]">
|
<div *ngFor="let file of paged_data; let i = index" class="mb-2 mt-2 d-flex justify-content-center" [ngClass]="[ postsService.card_size === 'small' ? 'col-2 small-col' : '', postsService.card_size === 'medium' ? 'col-6 col-lg-4 medium-col' : '', postsService.card_size === 'large' ? 'col-12 large-col' : '' ]">
|
||||||
<app-unified-file-card [index]="i" [card_size]="postsService.card_size" [locale]="postsService.locale" (goToFile)="goToFile($event)" (goToSubscription)="goToSubscription($event)" [file_obj]="file" [use_youtubedl_archive]="postsService.config['Downloader']['use_youtubedl_archive']" [loading]="false" (deleteFile)="deleteFile($event)" [baseStreamPath]="postsService.path" [jwtString]="postsService.isLoggedIn ? '?jwt=' + this.postsService.token : ''"></app-unified-file-card>
|
<app-unified-file-card [index]="i" [card_size]="postsService.card_size" [locale]="postsService.locale" (goToFile)="goToFile($event)" (goToSubscription)="goToSubscription($event)" [file_obj]="file" [use_youtubedl_archive]="postsService.config['Downloader']['use_youtubedl_archive']" [loading]="false" (deleteFile)="deleteFile($event)" [baseStreamPath]="postsService.path" [jwtString]="postsService.isLoggedIn ? '?jwt=' + this.postsService.token : ''"></app-unified-file-card>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="filtered_files.length === 0">
|
||||||
|
<ng-container i18n="No videos found">No videos found.</ng-container>
|
||||||
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="!normal_files_received && loading_files && loading_files.length > 0">
|
<ng-container *ngIf="!normal_files_received && loading_files && loading_files.length > 0">
|
||||||
<div *ngFor="let file of loading_files; let i = index" class="mb-2 mt-2 d-flex justify-content-center" [ngClass]="[ postsService.card_size === 'small' ? 'col-2 small-col' : '', postsService.card_size === 'medium' ? 'col-6 col-lg-4 medium-col' : '', postsService.card_size === 'large' ? 'col-12 large-col' : '' ]">
|
<div *ngFor="let file of loading_files; let i = index" class="mb-2 mt-2 d-flex justify-content-center" [ngClass]="[ postsService.card_size === 'small' ? 'col-2 small-col' : '', postsService.card_size === 'medium' ? 'col-6 col-lg-4 medium-col' : '', postsService.card_size === 'large' ? 'col-12 large-col' : '' ]">
|
||||||
@@ -43,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<mat-paginator #paginator *ngIf="paged_data && paged_data.length > 0" (page)="pageChangeEvent($event)" [length]="100"
|
<mat-paginator class="paginator" #paginator *ngIf="filtered_files && filtered_files.length > 0" (page)="pageChangeEvent($event)" [length]="filtered_files.length"
|
||||||
[pageSize]="pageSize"
|
[pageSize]="pageSize"
|
||||||
[pageSizeOptions]="[5, 10, 25, 100, this.paged_data && this.paged_data.length > 100 ? this.paged_data.length : 250]">
|
[pageSizeOptions]="[5, 10, 25, 100, this.paged_data && this.paged_data.length > 100 ? this.paged_data.length : 250]">
|
||||||
</mat-paginator>
|
</mat-paginator>
|
||||||
|
|||||||
@@ -47,6 +47,10 @@
|
|||||||
top: 10px;
|
top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.paginator {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.my-videos-title {
|
.my-videos-title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -1,19 +1,11 @@
|
|||||||
import { Component, OnInit, ElementRef, ViewChild, ViewChildren, QueryList } from '@angular/core';
|
import { Component, OnInit, ElementRef, ViewChild, ViewChildren, QueryList } from '@angular/core';
|
||||||
import {PostsService} from '../posts.services';
|
import {PostsService} from '../posts.services';
|
||||||
import {FileCardComponent} from '../file-card/file-card.component';
|
import {FileCardComponent} from '../file-card/file-card.component';
|
||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs';
|
||||||
import {FormControl, Validators} from '@angular/forms';
|
import {FormControl, Validators} from '@angular/forms';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||||
import { saveAs } from 'file-saver';
|
import { saveAs } from 'file-saver';
|
||||||
import 'rxjs/add/observable/of';
|
|
||||||
import 'rxjs/add/operator/mapTo';
|
|
||||||
import 'rxjs/add/operator/toPromise';
|
|
||||||
import 'rxjs/add/observable/fromEvent'
|
|
||||||
import 'rxjs/add/operator/filter'
|
|
||||||
import 'rxjs/add/operator/debounceTime'
|
|
||||||
import 'rxjs/add/operator/do'
|
|
||||||
import 'rxjs/add/operator/switch'
|
|
||||||
import { YoutubeSearchService, Result } from '../youtube-search.service';
|
import { YoutubeSearchService, Result } from '../youtube-search.service';
|
||||||
import { Router, ActivatedRoute } from '@angular/router';
|
import { Router, ActivatedRoute } from '@angular/router';
|
||||||
import { CreatePlaylistComponent } from 'app/create-playlist/create-playlist.component';
|
import { CreatePlaylistComponent } from 'app/create-playlist/create-playlist.component';
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ export class SubscriptionFileCardComponent implements OnInit {
|
|||||||
image_errored = false;
|
image_errored = false;
|
||||||
image_loaded = false;
|
image_loaded = false;
|
||||||
|
|
||||||
scrollSubject;
|
|
||||||
scrollAndLoad;
|
|
||||||
|
|
||||||
formattedDuration = null;
|
formattedDuration = null;
|
||||||
|
|
||||||
@Input() file;
|
@Input() file;
|
||||||
@@ -27,13 +24,7 @@ export class SubscriptionFileCardComponent implements OnInit {
|
|||||||
@Output() goToFileEmit = new EventEmitter<any>();
|
@Output() goToFileEmit = new EventEmitter<any>();
|
||||||
@Output() reloadSubscription = new EventEmitter<boolean>();
|
@Output() reloadSubscription = new EventEmitter<boolean>();
|
||||||
|
|
||||||
constructor(private snackBar: MatSnackBar, private postsService: PostsService, private dialog: MatDialog) {
|
constructor(private snackBar: MatSnackBar, private postsService: PostsService, private dialog: MatDialog) {}
|
||||||
this.scrollSubject = new Subject();
|
|
||||||
this.scrollAndLoad = Observable.merge(
|
|
||||||
Observable.fromEvent(window, 'scroll'),
|
|
||||||
this.scrollSubject
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.file.duration) {
|
if (this.file.duration) {
|
||||||
@@ -45,10 +36,6 @@ export class SubscriptionFileCardComponent implements OnInit {
|
|||||||
this.image_errored = true;
|
this.image_errored = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onHoverResponse() {
|
|
||||||
this.scrollSubject.next();
|
|
||||||
}
|
|
||||||
|
|
||||||
imageLoaded(loaded) {
|
imageLoaded(loaded) {
|
||||||
this.image_loaded = true;
|
this.image_loaded = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user