mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-22 03:33:19 +03:00
Fixed bug where file indices were incorrectly assigned
This commit is contained in:
@@ -127,12 +127,12 @@ export class RecentVideosComponent implements OnInit {
|
|||||||
this.normal_files_received = false;
|
this.normal_files_received = false;
|
||||||
this.postsService.getAllFiles().subscribe(res => {
|
this.postsService.getAllFiles().subscribe(res => {
|
||||||
this.files = res['files'];
|
this.files = res['files'];
|
||||||
|
this.files.sort(this.sortFiles);
|
||||||
for (let i = 0; i < this.files.length; i++) {
|
for (let i = 0; i < this.files.length; i++) {
|
||||||
const file = this.files[i];
|
const file = this.files[i];
|
||||||
file.duration = typeof file.duration !== 'string' ? file.duration : this.durationStringToNumber(file.duration);
|
file.duration = typeof file.duration !== 'string' ? file.duration : this.durationStringToNumber(file.duration);
|
||||||
file.index = i;
|
file.index = i;
|
||||||
}
|
}
|
||||||
this.files.sort(this.sortFiles);
|
|
||||||
if (this.search_mode) {
|
if (this.search_mode) {
|
||||||
this.filterFiles(this.search_text);
|
this.filterFiles(this.search_text);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user