mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-22 08:13:19 +03:00
Minor update to support alternate youtube links
This commit is contained in:
@@ -30,7 +30,7 @@ export class DownloadItemComponent implements OnInit {
|
|||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.download && this.download.url && this.download.url.includes('youtube')) {
|
if (this.download && this.download.url && this.download.url.includes('youtu')) {
|
||||||
const string_id = (this.download.is_playlist ? '?list=' : '?v=')
|
const string_id = (this.download.is_playlist ? '?list=' : '?v=')
|
||||||
const index_offset = (this.download.is_playlist ? 6 : 3);
|
const index_offset = (this.download.is_playlist ? 6 : 3);
|
||||||
const end_index = this.download.url.indexOf(string_id) + index_offset;
|
const end_index = this.download.url.indexOf(string_id) + index_offset;
|
||||||
|
|||||||
Reference in New Issue
Block a user