summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG1
-rw-r--r--images/icon_random.pngbin164 -> 367 bytes
-rw-r--r--lib/class/album.class.php2
-rw-r--r--lib/class/stream.class.php34
-rw-r--r--lib/init.php2
-rw-r--r--lib/stream.lib.php5
-rw-r--r--modules/flash/xspf_player.php2
-rw-r--r--templates/show_box.inc.php2
-rw-r--r--templates/show_index.inc.php2
-rw-r--r--templates/show_random_albums.inc.php7
10 files changed, 34 insertions, 23 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 9901b6f9..9676cbc7 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,7 @@
--------------------------------------------------------------------------
v.3.3.3
+ - Fixed Flash Player now playing issue
- Fixed a img resize logic error that could cause no art to
display if resize was on and resize failed
- Added Albums of the Moment to the Front page and removed the
diff --git a/images/icon_random.png b/images/icon_random.png
index 90d5766d..1b7b6d87 100644
--- a/images/icon_random.png
+++ b/images/icon_random.png
Binary files differ
diff --git a/lib/class/album.class.php b/lib/class/album.class.php
index 6358f489..31a4f54e 100644
--- a/lib/class/album.class.php
+++ b/lib/class/album.class.php
@@ -155,7 +155,7 @@ class Album {
$this->f_name = "<a href=\"$web_path/albums.php?action=show&amp;album=" . $this->id . "\" title=\"" . scrub_out($this->name) . "\">" . $name . "</a>";
$this->f_link = "<a href=\"$web_path/albums.php?action=show&amp;album=" . scrub_out($this->id) . "\" title=\"" . scrub_out($this->name) . "\">" . $name . "</a>";
$this->f_songs = "<div align=\"center\">" . $this->songs . "</div>";
-
+ $this->f_title = $name;
if ($this->artist_count == '1') {
$this->f_artist = "<a href=\"$web_path/artists.php?action=show&amp;artist=" . $this->artist_id . "\">" . $artist . "</a>";
}
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index c505b380..c27ef17a 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -236,21 +236,29 @@ class Stream {
*/
function create_xspf() {
+ $flash_hack = '';
+
+ if (isset($_REQUEST['flash_hack'])) {
+ $flash_hack = '&flash_hack=' . $_REQUEST['flash_hack'];
+ if (!conf('require_session')) { $flash_hack .= '&sid=' . session_id(); }
+ }
+
+ // Itterate through the songs
foreach ($this->songs as $song_id) {
- $song = new Song($song_id);
- $song->format_song();
-
- $xml = array();
- $xml['track']['location'] = $song->get_url();
- $xml['track']['identifier'] = $xml['track']['location'];
- $xml['track']['title'] = $song->title;
- $xml['track']['creator'] = $song->f_artist_full;
- $xml['track']['info'] = conf('web_path') . "/albums.php?action=show&album=" . $song->album;
- $xml['track']['image'] = conf('web_path') . "/image.php?id=" . $song->album . "&&thumb=3&sid=" . session_id();
- $xml['track']['album'] = $song->f_album_full;
- $xml['track']['duration'] = $song->time;
- $result .= xml_from_array($xml,1,'xspf');
+ $song = new Song($song_id);
+ $song->format_song();
+
+ $xml = array();
+ $xml['track']['location'] = $song->get_url() . $flash_hack;
+ $xml['track']['identifier'] = $xml['track']['location'];
+ $xml['track']['title'] = $song->title;
+ $xml['track']['creator'] = $song->f_artist_full;
+ $xml['track']['info'] = conf('web_path') . "/albums.php?action=show&album=" . $song->album;
+ $xml['track']['image'] = conf('web_path') . "/image.php?id=" . $song->album . "&thumb=3&sid=" . session_id();
+ $xml['track']['album'] = $song->f_album_full;
+ $xml['track']['duration'] = $song->time;
+ $result .= xml_from_array($xml,1,'xspf');
} // end foreach
diff --git a/lib/init.php b/lib/init.php
index 58454ec2..02b54184 100644
--- a/lib/init.php
+++ b/lib/init.php
@@ -67,7 +67,7 @@ if (!$results = read_config($configfile,0)) {
}
/** This is the version.... fluf nothing more... **/
-$results['version'] = '3.3.3 Build (001)';
+$results['version'] = '3.3.3 Build (002)';
$results['raw_web_path'] = $results['web_path'];
$results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path'];
diff --git a/lib/stream.lib.php b/lib/stream.lib.php
index cb935aaf..3cdb4ccf 100644
--- a/lib/stream.lib.php
+++ b/lib/stream.lib.php
@@ -31,7 +31,8 @@ function delete_now_playing($insert_id) {
$user_agent = $_SERVER['HTTP_USER_AGENT'];
- if (stristr($user_agent,"NSPlayer")) {
+ // Account for WMP and the Flash Player
+ if (stristr($user_agent,"NSPlayer") || $_REQUEST['flash_hack'] == 1) {
// Commented out until I can figure out the
// trick to making this work
return true;
@@ -89,7 +90,7 @@ function insert_now_playing($song_id,$uid,$song_length) {
/* Set the Expire Time */
// If they are using Windows media player
- if (stristr($user_agent,"NSPlayer")) {
+ if (stristr($user_agent,"NSPlayer") || $_REQUEST['flash_hack'] == 1) {
// WMP does keep the session open so we need to cheat a little here
$session_id = sql_escape($_REQUEST['sid']);
}
diff --git a/modules/flash/xspf_player.php b/modules/flash/xspf_player.php
index c88999c5..33a7108f 100644
--- a/modules/flash/xspf_player.php
+++ b/modules/flash/xspf_player.php
@@ -31,6 +31,8 @@ $action = scrub_in($_REQUEST['action']);
switch ($action) {
default:
case 'tmp_playlist':
+ // Set for hackage!
+ $_REQUEST['flash_hack'] = 1;
$tmp_playlist = new tmpPlaylist($_REQUEST['tmp_id']);
$items = $tmp_playlist->get_items();
$stream = new Stream('xspf',$items);
diff --git a/templates/show_box.inc.php b/templates/show_box.inc.php
index 0682a9c4..6be8f960 100644
--- a/templates/show_box.inc.php
+++ b/templates/show_box.inc.php
@@ -22,9 +22,11 @@
?>
<span class="box-title"><?php echo $title; ?></span>
<ol>
+ <?php if (count($items)) { ?>
<?php
foreach ($items as $item) {
echo $item;
}
?>
+ <?php } else { echo '<span class="error">' . _('Not Enough Data') . '</span>'; } ?>
</ol>
diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php
index bc782046..37ce8246 100644
--- a/templates/show_index.inc.php
+++ b/templates/show_index.inc.php
@@ -31,7 +31,7 @@
</div>
<div id="random_selection">
<?php
- $albums = get_random_albums('5');
+ $albums = get_random_albums('6');
if (count($albums)) { require_once(conf('prefix') . '/templates/show_random_albums.inc.php'); }
?>
</div>
diff --git a/templates/show_random_albums.inc.php b/templates/show_random_albums.inc.php
index 04280235..4f8ebb41 100644
--- a/templates/show_random_albums.inc.php
+++ b/templates/show_random_albums.inc.php
@@ -29,12 +29,9 @@ $web_path = conf('web_path');
$album->format();
?>
<td>
- <a target="_blank" href="<?php echo $web_path; ?>/image.php?type=popup&amp;id=<?php echo $album_id; ?>">
- <img src="<?php echo $web_path; ?>/image.php?thumb=1&amp;id=<?php echo $album_id; ?>" width="75" height="75" border="0">
+ <a href="<?php echo $web_path; ?>/albums.php?action=show&amp;album=<?php echo $album_id; ?>">
+ <img src="<?php echo $web_path; ?>/image.php?thumb=1&amp;id=<?php echo $album_id; ?>" width="75" height="75" border="0" title="<?php echo $album->f_title; ?>">
</a>
-
- <br />
- <?php echo $album->f_link; ?>
</td>
<?php } ?>
</tr>