Drifty icon indicating copy to clipboard operation
Drifty copied to clipboard

Fix: wrong YouTube playlist detection

Open Tarunkumarkanakam opened this issue 5 months ago • 4 comments

Fixes issue

Fixes #601

Changes proposed

  • Standardized the YouTube link format for both youtu.be and youtube.com domains.
  • Extracted and converted youtu.be URLs to the youtube.com/watch?v={videoID} format.
  • Improved error handling for invalid or malformed YouTube playlist links.
  • Added queryParams extraction method to help future development in playlist download feature.

Check List (Check all the applicable boxes)

  • [x] My code follows the code style of this project.
  • [ ] My change requires changes to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] This PR does not contain plagiarized content.
  • [x] The title of my pull request is a short description of the requested changes.

Screenshots

Screenshot 2024-09-09 at 10 29 26 AM

Note to reviewers

This PR ensures that YouTube links with different domain structures (youtu.be and youtube.com) are correctly standardized and handled. It also includes enhanced error handling for cases where the video ID is missing (playlist URLs) or the URL is malformed.

Summary by CodeRabbit

  • New Features

    • Enhanced CLI to support automatic formatting of YouTube links, improving user experience with video URL handling.
    • Introduced a new method for extracting query parameters from URLs, allowing users to easily retrieve specific data from links.
  • Bug Fixes

    • Improved error handling for URL processing, providing users with clearer feedback when issues arise.

Tarunkumarkanakam avatar Sep 09 '24 05:09 Tarunkumarkanakam