Maxstupo / ydl-ui

A UI for the command-line video downloader "youtube-dl"
MIT License
352 stars 34 forks source link

Fix: Error opening video when using a short url #104

Closed MatheusOliveira-dev closed 2 years ago

MatheusOliveira-dev commented 2 years ago

When a video from the download list was inserted in short url format, the application could not open it in the browser and ended up causing an unhandled error. This PR aims to fix that.

Exemple:

❌ EmGFdalXd-w -> Causes Error ✅ https://www.youtube.com/watch?v=EmGFdalXd-w -> It works perfectly

Just treated so that if the video URL doesn't start with "https://www.youtube.com/watch?v=", this is inserted at the beginning, making it a valid Youtube link.

EmGFdalXd-w -> https://www.youtube.com/watch?v=EmGFdalXd-w

Ref. Issue: #102