summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--artists.php4
-rwxr-xr-xdocs/INSTALL96
-rwxr-xr-xdocs/MIGRATION30
-rwxr-xr-xdocs/README9
-rw-r--r--lib/general.lib.php21
-rw-r--r--modules/localplay/mpd.controller.php8
-rw-r--r--templates/show_alphabet_form.inc.php5
-rw-r--r--templates/show_artist.inc3
-rw-r--r--templates/show_localplay.inc.php7
-rw-r--r--templates/show_localplay_status.inc.php46
10 files changed, 158 insertions, 71 deletions
diff --git a/artists.php b/artists.php
index 4e38c1bc..6d4191fb 100644
--- a/artists.php
+++ b/artists.php
@@ -193,11 +193,11 @@ switch($action) {
preg_match("/^(\w*)/", $match, $matches);
show_alphabet_list('artists','artists.php',$match);
if ($match === "Browse") {
- show_alphabet_form('',_("Show Artists starting with"),"artists.php?action=match");
+ show_alphabet_form('',_('Show Artists starting with'),"artists.php?action=match");
show_artists();
}
elseif ($match === "Show_all") {
- show_alphabet_form('',_("Show Artists starting with"),"artists.php?action=match");
+ show_alphabet_form('',_('Show Artists starting with'),"artists.php?action=match");
$_SESSION['view_offset_limit'] = 999999;
show_artists();
}
diff --git a/docs/INSTALL b/docs/INSTALL
index f045298d..58658d73 100755
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -26,11 +26,21 @@
directory does not contain an existing ampache.cfg
Web Install:
- Step 1 - Inserting the database, this requires you to enter
- a username/pass for MySQL that is able to create
- a brand new database and insert new tables. This does
- not have to be the user you actually run ampache as
- Step 2 - Creating the Config file, this step asks for a 'user'
+ Step 1 - Chosing your Language:
+ Ampache is translated into many different languages you
+ can pick the language that you would like to install Ampache
+ in from the drop down provided.
+
+ Step 2 - Inserting the database:
+ This requires you to enter a username/pass for MySQL that
+ is able to create a new database and insert new tables.
+ This should not be the user you actually run ampache as.
+ You can also create MySQL user at this point which will
+ have the correct permissions to the newly created Ampache
+ database.
+
+ Step 3 - Creating the Config file:
+ This step asks for a 'user'
level account for MySQL that has full access over
the newly created ampache database, this can be the
same as the last step, but it is not recommended.
@@ -38,12 +48,18 @@
to the /config directory, if it isn't able to it
should prompt you to download the ampache.cfg simply
put it into /config and then visit the login page.
- Step 3 - Creating the Initial User Account, you will be asked
- for a username and password for the administrator
- account.
+
+ Step 4 - Creating the Initial User Account:
+ You will be asked for a username and password for the
+ initial administrator account. If at any time you
+ forget your admin password you can simply turn of
+ authentication by editing your /config/ampache.cfg.php
+ and setting use_auth = "false". This will allow you
+ to get into your ampache install to reset your admin
+ password.
Enjoy! If you have any problems with the web installer please report them
- to vollmerk@ampache.org Thanks!
+ to vollmer@ampache.org Thanks!
2. The Long of Setting Up Ampache
@@ -97,9 +113,41 @@
Edit this file however you like, with either php code or straight html.
The output will be displayed below the login box on login.php.
+ 2.3.2 Configuring the Ampache (config.php.inc)
+
+ Copy /config/ampache.cfg.php.dist to /config/ampache.cfg.php
+
+ You will need to manually enter the following variables before ampache
+ will work.
+
+ web_path
+ local_host
+ local_db
+ local_username
+ local_pass
+
+ It is strongly recommended that you read through the entire Ampache config
+ file as there are many different options that you may want to change. By
+ defualt Ampache attempts to present you with a secure, yet useable
+ configuration. If you have and recommendations in regards to the defaults
+ provided in Ampache.cfg.php.dist please let us know.
+
+ 2.3.3 Creating your First User
+
+ If you don't use the web installer your Ampache installation comes
+ without a default administrator. You will need to edit your
+ /config/ampache.cfg.php and set use_auth = "false" then visit your
+ ampache installation, you will not be prompted for a username/password.
+ Go to admin --> users and create a Admin level user. Make sure that you
+ set use_auth = "true" otherwise your Ampache install will be open to
+ the world.
+
3. Running Ampache For The First Time
+ * If you have performed a manual installation you can skip to 3.1,
+ setting up the catalog.
+
Point your browser at your new ampache webpage and you should get
the installation page. It will run you through inserting your
database, creating your config file and setting up your first user
@@ -107,9 +155,9 @@
Grab A Beer....
3.1 Setting up a catalog
- First, create your local catalogs. Do this my first clicking
+ First, create your local catalogs. Do this by first clicking
`Add a catalog', and entering the path for the root of your
- collection of MP3 files. There is no need to enter sub directories
+ collection of audio files. There is no need to enter sub directories
since the update tool will recursively catalog all subdirectories.
You can enter multiple paths, so this means that you can access
@@ -160,30 +208,8 @@
When these fields are populated a periodic update may be performed by scheduling
the fileupdate.pl program to run at timed intervals. This program will query the
- database and attempt any requested updates. Before fileupdate.pl can be run, the
- Ampache.pm file must be edited to reflect your archive information.
-
- Usage of fileupdate.pl is as follows:
-
- fileupdate [--id3|--rename|--sort|--all] [--help] [--pretend] [--verbose]
- --pretend Display command taken, without actually doing anything.
- --id3 Update id3 tags for all files flagged with 'id3'
- --rename Rename files flagged with 'rename'
- --sort Sort files flagged with 'sort'
- --all Performs id3 update, rename, and sort
- for all files flagged with 'id3'
- --verbose Shows detailed information about what's happening.
- --help This message
-
+ database and attempt to sort and rename your files based on the patterns you have
+ specified and the tag information in the database.
-
- An example usage would be to schedule a cron tab which will run fileupdate.pl with
- the appropriate arguments which runs every 6 hours.
-
- EXAMPLE:
- If you were to place the following line in your crontab:
- * 24 * * * /apache/bin/fileupdate.pl -all
-
- any updates applied to the database would be applied at midnight everyday
diff --git a/docs/MIGRATION b/docs/MIGRATION
index 42449308..a28ba887 100755
--- a/docs/MIGRATION
+++ b/docs/MIGRATION
@@ -2,6 +2,11 @@
--------- MIGRATION - Ampache v.3.3 -----------
-------------------------------------------------------------------------------
+- Migrating from Ampache 3.3 --> 3.X+
+
+ After running /update.php check /test.php to make sure that you
+ still meet all the requirements, and that your config file is up to
+ date.
- Migrating from Ampache 3.3 --> 3.3.X+
@@ -15,25 +20,12 @@
Please visit $yourwebsite/update.php to update the genre table.
If you are updating from Alpha2 to Alpha3 or higher.
- This will invalidate your current catalog.
+ This will invalidate your current catalog.
- Migrating from Ampache-3.0 --> Ampache3.1
- There are currently a few tools to help migrate your Users and your
- playlists from Ampache 3.0 to Ampache 3.1.
-
- * Note these tools will _NOT_ work against 3.2 or 3.3 they are no
- longer maintained.
-
- 1. Install and setup Ampache3.1 in a new Database.
-
- 2. Edit the approiate parameters in the following files
-
- /bin/migrate_user.pl
- /bin/export_playlist.pl
- /bin/import_playlist.pl
-
- 3. Run the desired script.
-
- These perl scripts were created by Andy Morgan
-
+ The tools to migrate Ampache 3.0 to 3.1 Are no longer supported
+ and will not work against the newest versions of the software.
+ Sorry for any inconvience. If you would like to upgrade from 3.0
+ to 3.1 without losing your data please download Ampache 3.1
+ http://www.ampache.org/downloads/ampache.3.1.tar.gz
diff --git a/docs/README b/docs/README
index 631b62d2..aad2cabf 100755
--- a/docs/README
+++ b/docs/README
@@ -60,9 +60,10 @@ Contents:
- Realtime Downsampled
- Automatic Downsampling based on load
- On the Fly Transcoding
- - Localplay using Moosic
- - Localplay using MPD
- - Icecast2 Stream
+ - Localplay
+ - Music Player Daemon (MPD)
+ - Xbox Media Center (XMBC)
+ - Icecast2
C) Current Translations
@@ -79,7 +80,7 @@ Contents:
- Chinese (zh_CN)
- UK English (en_GB)
- Italian (it_IT)
- - French (fr_FR) *Partial
+ - French (fr_FR)
D) A Special Thanks:
Thanx to those who've helped us make Ampache so useable:
diff --git a/lib/general.lib.php b/lib/general.lib.php
index c3c1e061..654bc5ac 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -956,4 +956,25 @@ function translate_pattern_code($code) {
} // translate_pattern_code
+
+/**
+ * print_boolean
+ * This function takes a boolean value and then print out a friendly
+ * text message, usefull if you have a 0/1 that you need to turn into
+ * a "Off" "On"
+ */
+function print_boolean($value) {
+
+
+ if ($value) {
+ $string = '<span class="item_on">' . _('On') . '</span>';
+ }
+ else {
+ $string = '<span class="item_off">' . _('Off') . '</span>';
+ }
+
+ return $string;
+
+} // print_boolean
+
?>
diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php
index 1cd8fec9..cd07e92e 100644
--- a/modules/localplay/mpd.controller.php
+++ b/modules/localplay/mpd.controller.php
@@ -353,7 +353,13 @@ class AmpacheMpd {
$array['repeat'] = $this->_mpd->repeat;
$array['random'] = $this->_mpd->random;
$array['track'] = $track;
- $array['track_title'] = $this->_mpd->playlist[$track]['Title'];
+
+ preg_match("/song=(\d+)\&/",$this->_mpd->playlist[$track]['file'],$matches);
+ $song_id = $matches['1'];
+ $song = new Song($song_id);
+ $array['track_title'] = $song->title;
+ $array['track_artist'] = $song->get_artist_name();
+ $array['track_album'] = $song->get_album_name();
return $array;
diff --git a/templates/show_alphabet_form.inc.php b/templates/show_alphabet_form.inc.php
index d5eb9fb2..f7476bee 100644
--- a/templates/show_alphabet_form.inc.php
+++ b/templates/show_alphabet_form.inc.php
@@ -20,9 +20,8 @@
*/
?>
-<form name="f" method="get" action="<?php echo conf('web_path') . "/$action"; ?>" enctype="multipart/form-data">
+<form style="display:inline;" name="f" method="get" action="<?php echo conf('web_path') . "/$action"; ?>" enctype="multipart/form-data">
<label for="match" accesskey="S"><?php echo $text; ?></label>
- <input type="text" size="3" id="match" name="match" value="<?php echo $match; ?>" />
+ <input type="text" size="1" id="match" name="match" value="<?php echo $match; ?>" />
<input type="hidden" name="action" value="match" />
</form>
-<br />
diff --git a/templates/show_artist.inc b/templates/show_artist.inc
index 7c7420da..0048c84e 100644
--- a/templates/show_artist.inc
+++ b/templates/show_artist.inc
@@ -21,10 +21,11 @@
*/
//FIXME: I don't like having to re-create this friggin object.. :(
-global $user;
$artist_id = $artist->id;
$web_path = conf('web_path');
?>
+<?php show_alphabet_form('',_('Artists'),'artists.php?action=match'); ?>
+<?php show_alphabet_form('',_('Albums'),'albums.php?aciont=mathc'); ?>
<br />
<?php require (conf('prefix') . '/templates/show_artist_box.inc.php'); ?>
<!-- *** Multi-Album Art Display Thx MrBlahh Updated by clader *** -->
diff --git a/templates/show_localplay.inc.php b/templates/show_localplay.inc.php
index aa124503..8abc788a 100644
--- a/templates/show_localplay.inc.php
+++ b/templates/show_localplay.inc.php
@@ -34,12 +34,7 @@ $songs = $localplay->get();
</ul>
</div>
<br />
-<div class="text-box">
-<h2>Debug Status Information (Temp!)</h2>
-<pre>
-<?php print_r($localplay->status()); ?>
-</pre>
-</div>
+<?php require_once(conf('prefix') . '/templates/show_localplay_status.inc.php'); ?>
<br />
<div class="text-box">
<table class="border" cellspacing="0" border="0">
diff --git a/templates/show_localplay_status.inc.php b/templates/show_localplay_status.inc.php
new file mode 100644
index 00000000..df7857dc
--- /dev/null
+++ b/templates/show_localplay_status.inc.php
@@ -0,0 +1,46 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2006 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+$web_path = conf('web_path');
+$localplay = init_localplay();
+
+$required_info = "&amp;user_id=" . $GLOBALS['user']->id . "&amp;sessid=" . session_id();
+$ajax_url = $web_path . '/server/ajax.server.php';
+$status = $localplay->status();
+
+/* Format the track name */
+$track_name = $status['track_artist'] . ' - ' . $status['track_album'] . ' - ' . $status['track_title'];
+
+/* This is a cheezball fix for when we were unable to find a
+ * artist/album (or one wasn't provided)
+ */
+$track_name = ltrim(ltrim($track_name,' - '));
+
+?>
+<div class="text-box">
+<?php echo _('State') .": ". ucfirst($status['state']); ?><br />
+<?php echo _('Repeat') . ":" . print_boolean($status['repeat']); ?>&nbsp;|&nbsp;
+<?php echo _('Random') . ":" . print_boolean($status['random']); ?><br />
+<?php echo _('Volume') . ":" . $status['volume']; ?><br />
+<br />
+<span class="header2"><?php echo _('Now Playing') . '</span><br />[' . $status['track'] . '] - ' . $track_name . '<br />'; ?>
+</div>