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

Use folder argument as base for album/playlist file exports. #476

Merged
merged 2 commits into from
Jan 13, 2019
Merged

Use folder argument as base for album/playlist file exports. #476

merged 2 commits into from
Jan 13, 2019

Conversation

Silverfeelin
Copy link
Contributor

@Silverfeelin Silverfeelin commented Jan 13, 2019

Use const.args.folder when using -b or -p.

Related

Context
I set up a script that uses an URI handler to call spotdl. This allows the application to be called from an URI such as spotdl:https://open.spotify.com/album/0OkJThJls8FO1lutMzMDJ0.
https://msdn.microsoft.com/en-us/windows/desktop/aa767914

The problem I faced is that the current working directory for my application is C:\Windows\System32, which results in permission issues (https://github.com/ritiek/spotify-downloader/issues/340). The output directory for songs works around this issue, but the same can not currently be said for playlists and albums.

These changes re-use the folder parameter to put the album or playlist text files in the supplied folder. From what I can tell -f is already required for both -p and -b even though the value is ignored.
The global const was not included in spotify_tools.py but because it was referenced in just about every other script I figured it wouldn't hurt to include it here as well. In particular, youtube_tools.py already uses it in the same fashion when downloading songs.

image

@ritiek
Copy link
Member

ritiek commented Jan 13, 2019

Cool stuff. Thanks for the PR!

I can merge this once you add a changelog entry in CHANGES.md. I think this would best go under Changed sub-section (You'll need to create this section under Unreleased section ).

@Silverfeelin
Copy link
Contributor Author

Like that?

@ritiek
Copy link
Member

ritiek commented Jan 13, 2019

Yep, looks good. Thanks again!

@ritiek ritiek merged commit 76906cf into spotDL:master Jan 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants