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

[downloader] plugin overhaul #1054

Merged
merged 22 commits into from Mar 19, 2023
Merged

[downloader] plugin overhaul #1054

merged 22 commits into from Mar 19, 2023

Conversation

Araxeus
Copy link
Collaborator

@Araxeus Araxeus commented Mar 3, 2023

Replace ytdl-core with YouTube.js

  • Increase download speed to max (for me it's a 10x increase, can be potentially a much bigger increase based on net speed)
    fix Download speed slowed down #1051

  • Add album to id3 when available

  • Add trackId to id3 when downloading an album

  • Add skip existing files option
    fix [Feature request] Make playlist download not download already downloaded songs #319

  • Make download button show up only if there is a radio or shuffle button in the same menu

  • add helpful error when trying to download a private or “Mixed for you” playlist

  • Make the options synced between back.js and menu.js (Remove the need to restart the app to apply plugin settings)

  • Remove chokidar dependency and handle the progress reporting in a more fluid way
    (progress now also report on the FFmpeg conversion progress, and also the playlist download progress updates based on the percentage of the current downloading item)

fix #1010, fix #768, fix #453, fix #903, fix #297, fix #636, fix #818, fix #622, fix #570, fix #610, fix #556, fix #882

now downloading and converting happens on the main process instead of the renderer, allowed by: nodejs/node#45074

also as before - allow opus instead of mp3 with the drawback of having no id3 metadata

TIP: Try setting the codec option to opus, then download a playlist, it's 20x times faster than encoding to mp3 - and the progress bar looks really smooth because of increasePlaylistProgress() 😉

@Araxeus Araxeus changed the title download using youtubei,js instead of ytdl-core download using youtubei.js instead of ytdl-core Mar 4, 2023
@Araxeus Araxeus marked this pull request as ready for review March 4, 2023 10:30
@Araxeus Araxeus changed the title download using youtubei.js instead of ytdl-core [downloader] plugin overhaul Mar 4, 2023
@MulverineX
Copy link
Contributor

MulverineX commented Mar 5, 2023

add helpful error when trying to download a private or “Mixed for you” playlist

Ideally youtube.js gets auth support eventually, this is quite a pain

Great work on this!

@Araxeus
Copy link
Collaborator Author

Araxeus commented Mar 5, 2023

@th-ch I don't know what it did exactly, but I assume the fix from https://github.com/th-ch/youtube-music/pull/854/files isn't needed anymore since we are on back.js right?

@Araxeus
Copy link
Collaborator Author

Araxeus commented Mar 9, 2023

@th-ch @MulverineX @Zo-Bro-23 @DereC4 did any of you test this on a non-windows machine?

@DereC4
Copy link
Contributor

DereC4 commented Mar 9, 2023

@th-ch @MulverineX @Zo-Bro-23 @DereC4 did any of you test this on a non-windows machine?

Let me load this up on the lab computers at our department and give it a try

when downloading an album, will no longer re-download an encode identical cover images
Copy link
Owner

@th-ch th-ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! It just seems a function is not exported and should be

plugins/downloader/back.js Outdated Show resolved Hide resolved
plugins/downloader/back.js Outdated Show resolved Hide resolved
plugins/downloader/menu.js Show resolved Hide resolved
@Araxeus
Copy link
Collaborator Author

Araxeus commented Mar 19, 2023

Fixed, thank you for the review :)

@th-ch th-ch merged commit 62e2e8a into th-ch:master Mar 19, 2023
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment