Commit 086c3215 authored by attila.fekete's avatar attila.fekete
Browse files

Issue #1766184 by Chappo, attila.fekete: support artist pages

parent bccd23af
...@@ -361,22 +361,22 @@ function soundcloudfield_field_formatter_view($entity_type, $entity, $field, $in ...@@ -361,22 +361,22 @@ function soundcloudfield_field_formatter_view($entity_type, $entity, $field, $in
$splitted_url = explode("/", $parsed_url['path']); $splitted_url = explode("/", $parsed_url['path']);
// If this is a track.. // If this is an artist page, or a set.
if ($splitted_url[2] != 'sets') { if (!isset($splitted_url[2]) || $splitted_url[2] == 'sets') {
$height = $settings['flash_player']['height']; $height = $settings['flash_player']['height_sets'];
$params = 'url=' . $encoded_url . $params = 'url=' . $encoded_url .
'&show_comments=' . $showcomments . '&show_comments=' . $showcomments .
'&auto_play=' . $autoplay . '&auto_play=' . $autoplay .
'&show_playcount=' . $showplaycount .
'&show_artwork=' . $showartwork .
'&color=' . $color; '&color=' . $color;
} }
// Otherwise it's a set. // Otherwise it's a track.
else { else {
$height = $settings['flash_player']['height_sets']; $height = $settings['flash_player']['height'];
$params = 'url=' . $encoded_url . $params = 'url=' . $encoded_url .
'&show_comments=' . $showcomments . '&show_comments=' . $showcomments .
'&auto_play=' . $autoplay . '&auto_play=' . $autoplay .
'&show_playcount=' . $showplaycount .
'&show_artwork=' . $showartwork .
'&color=' . $color; '&color=' . $color;
} }
...@@ -408,8 +408,8 @@ function soundcloudfield_field_formatter_view($entity_type, $entity, $field, $in ...@@ -408,8 +408,8 @@ function soundcloudfield_field_formatter_view($entity_type, $entity, $field, $in
else { else {
$parsed_url = parse_url($item['url']); $parsed_url = parse_url($item['url']);
$splitted_url = explode("/", $parsed_url['path']); $splitted_url = explode("/", $parsed_url['path']);
// Track or set? // An artist page or a set or a track?
$iframe_height = ($splitted_url[2] != 'sets') ? $html5_player_height : $html5_player_height_sets; $iframe_height = (!isset($splitted_url[2]) || $splitted_url[2] == 'sets') ? $html5_player_height_sets : $html5_player_height;
} }
// Create the URL // Create the URL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment