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
$splitted_url = explode("/", $parsed_url['path']);
// If this is a track..
if ($splitted_url[2] != 'sets') {
$height = $settings['flash_player']['height'];
// If this is an artist page, or a set.
if (!isset($splitted_url[2]) || $splitted_url[2] == 'sets') {
$height = $settings['flash_player']['height_sets'];
$params = 'url=' . $encoded_url .
'&show_comments=' . $showcomments .
'&auto_play=' . $autoplay .
'&show_playcount=' . $showplaycount .
'&show_artwork=' . $showartwork .
'&color=' . $color;
}
// Otherwise it's a set.
// Otherwise it's a track.
else {
$height = $settings['flash_player']['height_sets'];
$height = $settings['flash_player']['height'];
$params = 'url=' . $encoded_url .
'&show_comments=' . $showcomments .
'&auto_play=' . $autoplay .
'&show_playcount=' . $showplaycount .
'&show_artwork=' . $showartwork .
'&color=' . $color;
}
......@@ -408,8 +408,8 @@ function soundcloudfield_field_formatter_view($entity_type, $entity, $field, $in
else {
$parsed_url = parse_url($item['url']);
$splitted_url = explode("/", $parsed_url['path']);
// Track or set?
$iframe_height = ($splitted_url[2] != 'sets') ? $html5_player_height : $html5_player_height_sets;
// An artist page or a set or a track?
$iframe_height = (!isset($splitted_url[2]) || $splitted_url[2] == 'sets') ? $html5_player_height_sets : $html5_player_height;
}
// 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