mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-04 03:21:30 +03:00
Created unified file card component, recent videos component (not done) and started scaffolding work on the backend
This commit is contained in:
@@ -108,4 +108,4 @@ function fancyTimeFormat(time) {
|
||||
ret += '' + mins + ':' + (secs < 10 ? '0' : '');
|
||||
ret += '' + secs;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { PostsService } from 'app/posts.services';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router, ParamMap } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-subscription',
|
||||
@@ -43,9 +43,26 @@ export class SubscriptionComponent implements OnInit {
|
||||
filterProperty = this.filterProperties['upload_date'];
|
||||
downloading = false;
|
||||
|
||||
initialized = false;
|
||||
|
||||
constructor(private postsService: PostsService, private route: ActivatedRoute, private router: Router) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.route.paramMap.subscribe((params: ParamMap) => {
|
||||
this.id = params.get('id');
|
||||
this.postsService.service_initialized.subscribe(init => {
|
||||
if (init) {
|
||||
this.initialized = true;
|
||||
this.getConfig();
|
||||
this.getSubscription();
|
||||
}
|
||||
});
|
||||
|
||||
if (!this.initialized) {
|
||||
this.getConfig();
|
||||
this.getSubscription();
|
||||
}
|
||||
});
|
||||
if (this.route.snapshot.paramMap.get('id')) {
|
||||
this.id = this.route.snapshot.paramMap.get('id');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user