Przeglądaj źródła

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

Sevajol Bastien 11 lat temu
rodzic
commit
1ef853aeeb

+ 10 - 3
src/Muzich/CoreBundle/Factory/Elements/Deezercom.php Wyświetl plik

@@ -147,17 +147,24 @@ class Deezercom extends ElementFactory
147 147
     if (($ref_id = $this->element->getData(Element::DATA_REF_ID)) 
148 148
       && ($type = $this->element->getData(Element::DATA_TYPE))
149 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 159
       $width = $this->container->getParameter('deezer_player_width');
154 160
       $heigth = $this->container->getParameter('deezer_player_height');
155 161
       $this->element->setEmbed(
156 162
         '<iframe scrolling="no" frameborder="0" allowTransparency="true" '
157 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