summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG2
-rwxr-xr-ximages/localplay/stop.gifbin1050 -> 635 bytes
-rw-r--r--images/localplay/voldn.gifbin0 -> 1062 bytes
-rw-r--r--images/localplay/volup.gifbin0 -> 1063 bytes
-rw-r--r--lib/class/catalog.class.php4
-rw-r--r--lib/class/update.class.php11
-rw-r--r--lib/general.lib.php2
-rw-r--r--localplay.php80
-rw-r--r--templates/header.inc5
-rw-r--r--templates/show_localplay.inc46
10 files changed, 40 insertions, 110 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index b431095a..8325883c 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.3.2-Beta3
+ - Fixed a glitch that was causing m3u's to be build on every
+ catalog add, rather then just on creation
- Full re-write of Localplay, MPD controller added
- Tweaked Preferences once more
- Added Modules Page
diff --git a/images/localplay/stop.gif b/images/localplay/stop.gif
index e4454b45..440d6a02 100755
--- a/images/localplay/stop.gif
+++ b/images/localplay/stop.gif
Binary files differ
diff --git a/images/localplay/voldn.gif b/images/localplay/voldn.gif
new file mode 100644
index 00000000..760c7d41
--- /dev/null
+++ b/images/localplay/voldn.gif
Binary files differ
diff --git a/images/localplay/volup.gif b/images/localplay/volup.gif
new file mode 100644
index 00000000..05fc56b4
--- /dev/null
+++ b/images/localplay/volup.gif
Binary files differ
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 125fc4f5..43becdac 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -377,7 +377,7 @@ class Catalog {
if (is_readable($full_file)) {
- if (substr($file,-3,3) == 'm3u') {
+ if (substr($file,-3,3) == 'm3u' AND $parse_m3u) {
$this->_playlists[] = $full_file;
} // if it's an m3u
@@ -774,7 +774,7 @@ class Catalog {
$this->catalog_type = $type;
/* Fluf */
- echo _("Starting Catalog Build") . " [$name]<br />\n";
+ echo _('Starting Catalog Build') . " [$name]<br />\n";
if ($this->catalog_type == 'remote') {
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index 1fb90350..a8da5062 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -1585,6 +1585,17 @@ class Update {
$user->fix_preferences($r['username']);
} // while results
+ /* Last but not least revert play types to downsample or stream */
+ $sql = "SELECT id FROM preferences WHERE name='play_type'";
+ $db_results = mysql_query($sql, dbh());
+
+ $results = mysql_fetch_assoc($db_results);
+
+ $pref_id = $results['id'];
+
+ $sql = "UPDATE user_preference SET value='stream' WHERE preference='$pref_id' AND value != 'downsample' AND value != 'stream'";
+ $db_results = mysql_query($sql, dbh());
+
$this->set_version('db_version','332010');
} // update_332010
diff --git a/lib/general.lib.php b/lib/general.lib.php
index 82b0c38f..a1a83c95 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -803,7 +803,7 @@ function check_username($username) {
$db_results = mysql_query($sql, dbh());
if (mysql_fetch_row($db_results)) {
- return fakse;
+ return false;
}
return true;
diff --git a/localplay.php b/localplay.php
index 4e9b66d0..816f40c4 100644
--- a/localplay.php
+++ b/localplay.php
@@ -20,15 +20,9 @@
*/
-/*!
- @header Song Document
- @discussion Actually play files from albums, artists or just given
- a bunch of id's.
- Special thanx goes to Mike Payson and Jon Disnard for the means
- to do this.
-*/
require('modules/init.php');
+
/* If we are running a demo, quick while you still can! */
if (conf('demo_mode')) {
exit();
@@ -36,59 +30,29 @@ if (conf('demo_mode')) {
$web_path = conf('web_path');
-if($user->prefs['play_type'] != 'local_play') {
- show_template('header');
- echo "<span align=\"center\" class=\"fatalerror\">Localplay Currently Disabled</span>";
- show_footer();
- exit;
+if($GLOBALS['user']->prefs['localplay_level'] < 1) {
+ access_denied();
+ exit();
}
-switch($_REQUEST['submit'])
-{
- case ' X ':
- $action = "stop";
- break;
- case ' > ':
- $action = "play";
- break;
- case ' = ':
- $action = "pause";
- break;
- case '|< ':
- $action = "prev";
- break;
- case ' >|':
- $action = "next";
- break;
- case (substr_count($_REQUEST['submit'],"+") == '1'):
- $amount = trim(substr($_REQUEST['submit'],2,strlen($_REQUEST['submit']-2)));
- $action = "volplus";
+/* Scrub in the action */
+$action = scrub_in($_REQUEST['action']);
+
+show_template('header');
+
+
+switch ($action) {
+ case 'delete_songs':
+
+
break;
- case (substr_count($_REQUEST['submit'],"-") == '1'):
- $amount = trim(substr($_REQUEST['submit'],2,strlen($_REQUEST['submit']-2)));
- $action = "volminus";
- break;
- case 'clear':
- $action = "clear";
- break;
- case 'start':
- $action = "start";
- break;
- case 'kill':
- $action = "kill";
- break;
- default:
- echo _("Unknown action requested") . ": '$_REQUEST[submit]'<br />";
- exit;
-}
-$systr = conf('localplay_'.$action);
-$systr = str_replace("%AMOUNT%",$amount,$systr);
-if (conf('debug')) { log_event($user->username,'localplay',"Exec: $systr"); }
-@exec($systr, $output);
-$web_path = conf('web_path');
-if($output)
- print_r($output);
-else
- header("Location: $web_path");
+ default:
+ require_once (conf('prefix') . '/templates/show_localplay.inc.php');
+ break;
+} // end switch action
+
+
+
+show_footer();
?>
diff --git a/templates/header.inc b/templates/header.inc
index b2839fec..a6928b2b 100644
--- a/templates/header.inc
+++ b/templates/header.inc
@@ -47,14 +47,9 @@ if (conf('use_rss')) { ?>
</a>
</div><!--End topbarleft -->
<div id="topbarright">
- <?php if (($user->prefs['play_type']=='mpd') && ($location['page'] != 'mpd.php')) {
- $myMpd = init_mpd();
- show_template ('show_mpdminicontrol');
- } else { ?>
<a href="http://www.ampache.org/index.php">Ampache v.<?php echo conf('version'); ?></a><br />
<b><?php echo _("You are currently logged in as") . " " . $GLOBALS['user']->fullname; ?></b>
<br />
- <?php } ?>
</div> <!-- End topbarright -->
</div><!-- End topbar -->
<div id="sidebar"><!-- This is the sidebar -->
diff --git a/templates/show_localplay.inc b/templates/show_localplay.inc
index 936f6090..ece7ecde 100644
--- a/templates/show_localplay.inc
+++ b/templates/show_localplay.inc
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2004 Ampache.org
+ Copyright (c) 2001 - 2006 Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -20,48 +20,6 @@
*/
-/*!
- @header Show localplay form
-*/
$web_path = conf('web_path');
+
?>
-<table class="border" cellspacing="1" cellpadding="3" width="100%" border="0"><!--Localplay Table-->
-<tr class="table-header">
- <td colspan="2"><?php echo _("Local Play Control"); ?></td>
-</tr>
-<tr class="even">
- <td>
- <table border="0" cellpadding="0" cellspacing="0"><!--Localplayer Table-->
- <tr>
- <td><?php echo _("Playback") . ":"; ?></td>
- <td>
- <form action="<?php echo $web_path; ?>/localplay.php" method="post" name="playcontrol" style="display:inline;">
- <input type="submit" title="<?php echo _("Prev"); ?>" name="submit" value="|&lt; " />
- <input type="submit" title="<?php echo _("Stop"); ?>" name="submit" value=" X " />
- <input type="submit" title="<?php echo _("Play"); ?>" name="submit" value=" &gt; " />
- <input type="submit" title="<?php echo _("Pause"); ?>" name="submit" value=" = " />
- <input type="submit" title="<?php echo _("Next"); ?>" name="submit" value=" &gt;|" />
- </form>
- </td>
- </tr>
- <tr class="even">
- <td><?php echo _("Volume") . ":"; ?></td>
- <td>
- <form action="<?php echo $web_path; ?>/localplay.php" method="post" name="playcontrol" style="display:inline;">
- <input type="submit" title="<?php echo _("Increase Volume"); ?>" name="submit" value=" +1 " />
- <input type="submit" title="<?php echo _("Increase Volume"); ?>" name="submit" value=" +5 " />
- <input type="submit" title="<?php echo _("Decrease Volume"); ?>" name="submit" value=" -1 " />
- <input type="submit" title="<?php echo _("Decrease Volume"); ?>" name="submit" value=" -5 " />
- </form>
- </td>
- </tr>
- <tr class="even">
- <td colspan="2">
- <a href="<?php echo $web_path; ?>/localplay.php?submit=clear"><?php echo _("Clear queue"); ?></a><br />
- <?php @system(conf('localplay_status')) ?>
- </td>
- </tr>
- </table><!--End Localplayer Table-->
- </td>
-</tr>
-</table><!--End Localplay Table-->