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

feat(downloader): New option to download on finish #1964

Merged

Conversation

Johannes7k75
Copy link
Contributor

This adds an option to the downloader menu.
When the option is activated it tracks the time that is elapsed and then if the rest time of the song is below 20 seconds it downloads the song.

The range is 20 seconds for when you skip the last bit of the song.

src/plugins/downloader/main/index.ts Outdated Show resolved Hide resolved
src/plugins/downloader/main/index.ts Outdated Show resolved Hide resolved
@JellyBrick JellyBrick added the enhancement New feature or request label Apr 13, 2024
@ArjixWasTaken
Copy link
Contributor

What happens on songs with a length of 40 seconds?

20 seconds would be the half, and not the "last bit"

Either make it configurable based on how big a song is, or make it a percentage (like 99%)

@Johannes7k75
Copy link
Contributor Author

What happens on songs with a length of 40 seconds?

20 seconds would be the half, and not the "last bit"

Either make it configurable based on how big a song is, or make it a percentage (like 99%)

If made it so that you can configure "last x seconds" and "after x percent".
The you have the choice between these to options
image

And here the window where you can configure the two options (if clicked on "Advanced")
image

@ArjixWasTaken
Copy link
Contributor

I will test and review this later today.

@ArjixWasTaken
Copy link
Contributor

ArjixWasTaken commented Apr 30, 2024

Why does your PR touch things unrelated to the download plugin?
My bad, the only unrelated file is the workflow file.

@ArjixWasTaken
Copy link
Contributor

ArjixWasTaken commented Apr 30, 2024

Ok, it seems to work fine on my machine.

The only issue that I noticed is kinda unrelated to this plugin, but the song change callbacks are not called for the auto-play song on start-up. (which is totally not the responsibility of this plugin to fix)

Also, maybe it would be a good idea to allow a separate folder for the auto-downloaded tracks.

@Johannes7k75
Copy link
Contributor Author

Also, maybe it would be a good idea to allow a separate folder for the auto-downloaded tracks.

I try to add it in the next days

@Johannes7k75
Copy link
Contributor Author

Also, maybe it would be a good idea to allow a separate folder for the auto-downloaded tracks.

I try to add it in the next days

Option added
image

I also fixed a bug where the paths were not changed after selecting a new path.

plugins/scroll-down/front.js Outdated Show resolved Hide resolved
@JellyBrick
Copy link
Collaborator

I'm busy with my job, so I can't review it right now.
I'll check this out in a couple days.

Thanks for your contribution!

@JellyBrick JellyBrick merged commit 30848b7 into th-ch:master Jul 14, 2024
6 checks passed
@Johannes7k75 Johannes7k75 deleted the downloader-download_finished_song branch July 14, 2024 14:57
@MulverineX
Copy link
Contributor

MulverineX commented Jul 15, 2024

Awesome feature. Does this actually use the cached audio Blob? Or does it effectively download the song twice?

@MulverineX
Copy link
Contributor

@Johannes7k75

@Johannes7k75
Copy link
Contributor Author

It just calls the downloadSong function

@Johannes7k75
Copy link
Contributor Author

So i think it downloads the song twice

@MulverineX
Copy link
Contributor

would be really awesome if this somehow didn't use that

@Johannes7k75
Copy link
Contributor Author

Would it really benefit from using the cached audio blob?
And beyond that, I don't know enough about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants