Browse Source

Anomalie #782: Url non géré: deezer

Sevajol Bastien 11 years ago
parent
commit
1ef853aeeb
1 changed files with 10 additions and 3 deletions
  1. 10 3
      src/Muzich/CoreBundle/Factory/Elements/Deezercom.php

+ 10 - 3
src/Muzich/CoreBundle/Factory/Elements/Deezercom.php View File

147
     if (($ref_id = $this->element->getData(Element::DATA_REF_ID)) 
147
     if (($ref_id = $this->element->getData(Element::DATA_REF_ID)) 
148
       && ($type = $this->element->getData(Element::DATA_TYPE))
148
       && ($type = $this->element->getData(Element::DATA_TYPE))
149
       && ($this->element->getData(Element::DATA_TYPE) == 'album' ||
149
       && ($this->element->getData(Element::DATA_TYPE) == 'album' ||
150
-         $this->element->getData(Element::DATA_TYPE) == 'playlist')
150
+         $this->element->getData(Element::DATA_TYPE) == 'playlist'||
151
+         $this->element->getData(Element::DATA_TYPE) == 'track')
151
       )
152
       )
152
     {
153
     {
154
+      if ($type == 'track')
155
+      {
156
+        $type = 'tracks';
157
+      }
158
+      
153
       $width = $this->container->getParameter('deezer_player_width');
159
       $width = $this->container->getParameter('deezer_player_width');
154
       $heigth = $this->container->getParameter('deezer_player_height');
160
       $heigth = $this->container->getParameter('deezer_player_height');
155
       $this->element->setEmbed(
161
       $this->element->setEmbed(
156
         '<iframe scrolling="no" frameborder="0" allowTransparency="true" '
162
         '<iframe scrolling="no" frameborder="0" allowTransparency="true" '
157
         .'src="http://www.deezer.com/fr/plugins/player?autoplay=true&playlist=true'
163
         .'src="http://www.deezer.com/fr/plugins/player?autoplay=true&playlist=true'
158
-        .'&width='.$width.'&height='.$heigth.'&cover=true&btn_popup=true&type='.$type.'&id='.$ref_id.'&title=" '
159
-        .'width="'.$width.'" height="'.$heigth.'"></iframe>'
164
+        .'&width='.$width.'&height='.$heigth.'&cover=true&type='.$type.'&id='.$ref_id.'&title=&app_id=undefined"'
165
+        .' width="'.$width.'" height="'.$heigth.'"></iframe>'
160
       );
166
       );
167
+      
161
     }
168
     }
162
   }
169
   }
163
   
170