Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple downloads with multiple URLs #14

Merged
merged 4 commits into from
Jul 24, 2024

Conversation

mitsuki31
Copy link
Owner

Overview

This pull request introduces significant enhancements to the project, including support for multiple downloads via command line arguments, cache management functionality, and various internal code improvements.

Notable Changes

  • Introduced the temppath module, developed in-house, which simplifies the creation of temporary directories or files. This module streamlines processes that require temporary storage, providing an uncomplicated and efficient solution.

  • Implemented functionality allowing users to supply multiple YouTube URLs directly via command line arguments, eliminating the need for a temporary file containing URLs. This feature enhances flexibility and convenience for users who prefer CLI-based operations. For example:

    $ ytmp3 -o downloads --convertAudio --codec libmp3lame --format mp3 \
    > https://www.youtube.com/watch?v=<VIDEO_ID> https://www.youtube.com/watch?v=<VIDEO_ID>

    This update resolves task in Boosting CLI Capabilities: New options and robust configuration in main module #11, which aimed to simplify the multi-download process.

  • Replaced the deprecated substr function with substring to ensure compatibility with modern JavaScript standards and improve code readability.

Summary

These updates significantly enhance the project's capabilities, particularly by adding support for multiple downloads. The introduction of the temppath module, along with the cache management functions for caching the given multiple URLs from command line, provides a more efficient and streamlined experience for users. Additionally, the internal code improvements ensure better maintainability and alignment with modern coding practices.

This module was developed by me, and will help create a temporary directory or file for the project with ease and uncomplicated.
* Added the `createCache` function to create the cache file in the system's temporary directory
* Added the `deleteCache` function to delete the cache file if it exists
Users can now supply multiple YouTube URLs in command line arguments without having to create a temporary file containing those URLs. This change gives more further flexibility and convenience for CLI-based users. For instance:

  $ ytmp3 -o downloads --convertAudio --codec libmp3lame --format mp3 \
  > https://www.youtube.com/watch?v=<VIDEO_ID> https://www.youtube.com/watch?v=<VIDEO_ID>

Resolves #11 task.
* Replaced use of deprecated function `substr` with `substring`
* Refined the logic of configuration file imports on `filterOptions` function
@mitsuki31 mitsuki31 added the refactor Refactor and enhancement changes label Jul 24, 2024
@mitsuki31 mitsuki31 self-assigned this Jul 24, 2024
@mitsuki31 mitsuki31 merged commit 4be8a1e into master Jul 24, 2024
1 check passed
@mitsuki31 mitsuki31 deleted the feature/add-support-for-multiple-downloads branch July 24, 2024 07:04
@mitsuki31 mitsuki31 added the feature Bring new features label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Bring new features refactor Refactor and enhancement changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant