Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deezer_downloader/web/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ def spotify_playlist_download():
@validate_schema("user_id", "add_to_playlist", "create_zip")
def deezer_favorites_download():
"""
downloads favorite songs of a Deezer user (looks like this in the brwoser:
downloads favorite songs of a Deezer user (looks like this in the browser:
https://www.deezer.com/us/profile/%%user_id%%/loved)
a subdirecotry with the name of the user_id will be created.
a subdirectory with the name of the user_id will be created.
para:
user_id: deezer user_id
add_to_playlist: True|False (add to mpd playlist)
Expand Down
19 changes: 19 additions & 0 deletions deezer_downloader/web/static/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,25 @@ $(document).ready(function() {
});
// END DEEZER FAVORITE SONGS

// BEGIN DEEZER SONG
$("#deezer_song_download").click(function() {
deezer_download($('#deezer-song-id').val(), "track", false, false);
});

$("#deezer_song_zip").click(function() {
deezer_download($('#deezer-song-id').val(), "track", false, true);
});
// END DEEZER SONG

// BEGIN DEEZER album
$("#deezer_album_download").click(function() {
deezer_download($('#deezer-album-id').val(), "album", false, false);
});

$("#deezer_album_zip").click(function() {
deezer_download($('#deezer-album-id').val(), "album", false, true);
});
// END DEEZER album

function show_tab(id_nav, id_content) {
// nav
Expand Down
32 changes: 30 additions & 2 deletions deezer_downloader/web/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ <h3>Download Deezer playlist</h3>
<br>
<h3>Download Deezer favorite songs</h3>
<div class="input-group">
<input type="text" class="form-control" id="deezer-favorites-userid" placeholder="user id of Deezer user"songs />
<input type="text" class="form-control" id="deezer-favorites-userid" placeholder="user id of Deezer user"/>
&nbsp;
</div>
<br>
Expand All @@ -179,7 +179,35 @@ <h3>Download Deezer favorite songs</h3>
<button type="button" class="btn btn-info" onclick="$('#deezer-favorites-userid').val('')" >Clear</button>
</span>
</div>

<br>
<h3>Download a song</h3>
<div class="input-group">
<input type="text" class="form-control" id="deezer-song-id" placeholder="song id"/>
&nbsp;
</div>
<br>
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-info" id="deezer_song_download">Download Song</button>
<button type="button" class="btn btn-info" id="deezer_song_zip">Give me a zip</button>
<button type="button" class="btn btn-info" onclick="$('#deezer-favorites-userid').val('')" >Clear</button>
</span>
</div>

<br>
<h3>Download an album</h3>
<div class="input-group">
<input type="text" class="form-control" id="deezer-album-id" placeholder="album id" />
&nbsp;
</div>
<br>
<div class="input-group">
<span class="input-group-btn">
<button type="button" class="btn btn-info" id="deezer_album_download">Download Album</button>
<button type="button" class="btn btn-info" id="deezer_album_zip">Give me a zip</button>
<button type="button" class="btn btn-info" onclick="$('#deezer-favorites-userid').val('')" >Clear</button>
</span>
</div>
</div> <!-- end div tab deezer playlists -->


Expand Down