Fixed #208
authorRemixDev <deezloaderremix@gmail.com>
Fri, 8 Mar 2019 21:33:32 +0000 (22:33 +0100)
committerRemixDev <deezloaderremix@gmail.com>
Fri, 8 Mar 2019 21:33:32 +0000 (22:33 +0100)
app/public/index.html
app/public/js/frontend.js

index 0a375645ffc7ceb559fa391dc434887848263352..b59fab4d832e3b8b36e934fe9076c1a96703e877 100644 (file)
 <div id="modal_trackListSelective" class="modal modal-fixed-footer modal-custom-header">
        <div class="modal-content">
     <div class="trackList-header" v-bind:style="{ 'background-image': `linear-gradient(to bottom, transparent 0%, var(--main-modal-background) 100%), url('${image}')` }">
-      <h4>{{ title }}</h4>
+      <h4>{{ title }} <i v-if="explicit" class="material-icons valignicon materialize-red-text tooltipped" data-tooltip="Explicit">explicit</i></h4>
       <h6 v-if="metadata" style="display: inline;">{{ metadata }}</h6>
       <span class="right hide-on-small-only" v-if="release_date">{{ release_date }}</span>
     </div>
index 5e6bf689d703d9dc75afb9f27f49af9bcc26bca5..f2c0f8a41af40ea37e7f8ccc9a9b9a211c2f3c59 100644 (file)
@@ -210,12 +210,12 @@ $(document).ready(function () {
        // Button download all tracks in selective modal
        $('#download_all_tracks_selective, #download_all_tracks').click(function(){
                addToQueue($(this).attr("data-link"))
+               $(this).parent().parent().modal("close")
        })
 
        // Quality Modal
        window.onclick = function(event) {
          if (event.target == modalQuality && modalQuality.open) {
-                       console.log("Closing")
                        $(modalQuality).addClass('animated fadeOut')
          }
        }
@@ -593,6 +593,7 @@ var trackListSelectiveModalApp = new Vue({
                title: "",
                metadata : "",
                release_date: "",
+               explicit: false,
                image: "",
                type: "",
                link: "",
@@ -632,6 +633,7 @@ function showTrackListSelective(link) {
        trackListSelectiveModalApp.image = ""
        trackListSelectiveModalApp.metadata = ""
        trackListSelectiveModalApp.release_date = ""
+       trackListSelectiveModalApp.explicit = false
        trackListSelectiveModalApp.type = ""
        trackListSelectiveModalApp.head = []
        trackListSelectiveModalApp.body = []
@@ -779,6 +781,7 @@ socket.on("getTrackList", function (data) {
                        trackListSelectiveModalApp.type = data.reqType
                        trackListSelectiveModalApp.link = `https://www.deezer.com/${data.reqType}/${data.id}`
                        trackListSelectiveModalApp.title = data.response.title
+                       trackListSelectiveModalApp.explicit = data.response.explicit_lyrics
                        trackListSelectiveModalApp.metadata = `${data.response.artist.name} • ${trackList.length == 1 ? "1 song" : `${trackList.length} songs`}`
                        trackListSelectiveModalApp.release_date = data.response.release_date.substring(0,10)
                        trackListSelectiveModalApp.image = data.response.cover_xl