summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/system.php24
-rw-r--r--albumart.php7
-rwxr-xr-xdocs/CHANGELOG4
-rw-r--r--lib/class/catalog.class.php40
-rw-r--r--lib/class/stream.class.php47
-rw-r--r--lib/ui.lib.php139
-rw-r--r--modules/flash/FMP3.swfbin0 -> 8103 bytes
-rw-r--r--modules/flash/license.txt52
-rw-r--r--modules/flash/readme.txt49
-rw-r--r--modules/flash/swfobject.js138
-rw-r--r--modules/flash/xspf_player.swfbin57616 -> 7469 bytes
-rw-r--r--templates/show_admin_tools.inc.php5
-rw-r--r--templates/show_xspf_player.inc.php49
13 files changed, 495 insertions, 59 deletions
diff --git a/admin/system.php b/admin/system.php
index 30ad3c19..c9dad4f5 100644
--- a/admin/system.php
+++ b/admin/system.php
@@ -103,6 +103,30 @@ switch ($action) {
break;
+ /* Export Catalog to ItunesDB */
+ case 'export':
+ $catalog = new Catalog();
+ switch ($_REQUEST['export']) {
+ case 'itunes':
+ header("Cache-control: public");
+ header("Content-Disposition: filename=itunes.xml");
+ header("Content-Type: application/itunes+xml; charset=utf-8");
+ echo xml_get_header('itunes');
+ echo $catalog->export($_REQUEST['export']);
+ echo xml_get_footer('itunes');
+ break;
+ default:
+ $url = conf('web_path') . '/admin/index.php';
+ $title = _('Export Failed');
+ $body = '';
+ show_template('header');
+ show_confirmation($title,$body,$url);
+ show_template('footer');
+ break;
+ }
+
+ break;
+
default:
// Rien a faire
break;
diff --git a/albumart.php b/albumart.php
index af603a71..6905a3f2 100644
--- a/albumart.php
+++ b/albumart.php
@@ -31,6 +31,7 @@ require('lib/init.php');
/* Decide what size this image is */
switch ($_REQUEST['thumb']) {
case '1':
+ /* This is used by the now_playing stuff */
$size['height'] = '75';
$size['width'] = '75';
break;
@@ -38,6 +39,12 @@ switch ($_REQUEST['thumb']) {
$size['height'] = '128';
$size['width'] = '128';
break;
+ case '3':
+ /* This is used by the flash player */
+ $size['height'] = '80';
+ $size['width'] = '80';
+ break;
+
default:
$size['height'] = '275';
$size['width'] = '275';
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index f3c30090..c341e18d 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.3.3-Alpha2 11/12/2006
+ - Added Export to Itunes DB function (Thx PB1DFT)
+ - Added New XSPF Player that's solves all the UTF8 encoding problems (Thx Enrico Lai)
- Fixed some Ajax Issues, added Now Playing to TV page
- Fixed album art search on every Catalog Add
- Added exception to MPD controller, forces HTTP play regardless
@@ -12,6 +14,8 @@
- Tweaked default config, Ratings are enabled by default
- Added Genre link on show_songs along with some other minor UI
improvements
+ - Added Export to Itunes DB function (Thx PB1DFT)
+ - Added New XSPF Player that's solves all the UTF8 encoding problems (Thx Enrico Lai)
- Fixed Show All of Song Titles not having any data
- Fixed override of local_length to 9000 regardless of config file
- Tweaked Remeber Me Checkbox to be disabled if remember_length
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index f7f2f063..838d7325 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -2281,6 +2281,46 @@ class Catalog {
} // remove_songs
+ /*!
+ @function exports the catalog
+ @discussion it exports all songs in the database to the given export type.
+ */
+ function export($type){
+
+ if ($type=="itunes"){
+
+ $sql = "SELECT id FROM song ORDER BY album";
+ $db_results = mysql_query($sql, dbh());
+
+ while ($results = mysql_fetch_array($db_results)) {
+ $song = new Song($results['id']);
+ $song->format_song();
+
+ $xml = array();
+ $xml['key']= $results['id'];
+ $xml['dict']['Track ID']= $results['id'];
+ $xml['dict']['Name'] = utf8_encode($song->title);
+ $xml['dict']['Artist'] = utf8_encode($song->f_artist_full);
+ $xml['dict']['Album'] = utf8_encode($song->f_album_full);
+ $xml['dict']['Genre'] = $song->f_genre;
+ $xml['dict']['Total Time'] = $song->time;
+ $xml['dict']['Track Number'] = $song->track;
+ $xml['dict']['Year'] = $song->year;
+ $xml['dict']['Date Added'] = date("Y-m-d\TH:i:s\Z",$song->addition_time);
+ $xml['dict']['Bit Rate'] = intval($song->bitrate/1000);
+ $xml['dict']['Sample Rate'] = $song->rate;
+ $xml['dict']['Play Count'] = $song->played;
+ $xml['dict']['Track Type'] = "URL";
+ $xml['dict']['Location'] = $song->get_url();
+
+ $result .= xml_from_array($xml,1,'itunes');
+ }
+ return $result;
+
+ }
+
+ } // export
+
} //end of catalog class
?>
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index ca1eb0d7..503fd9bf 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -187,37 +187,30 @@ class Stream {
*/
function create_xspf() {
- $playlist = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>
- <playlist version = \"1\" xmlns=\"http://xspf.org/ns/0/\">
- <title>Ampache XSPF Playlist</title>
- <creator>" . conf('site_title') . "</creator>
- <annotation>" . conf('site_title') . "</annotation>
- <info>". conf('web_path') ."</info>
- <trackList>\n\n\n\n";
-
foreach ($this->songs as $song_id) {
- $song = new Song($song_id);
- $song->format_song();
- $url = $song->get_url();
- $song_name = $song->f_artist_full . " - " . $song->title . "." . $song->type;
- $playlist .= " <track>\n";
- $playlist .= " <location><![CDATA[$url]]></location>\n";
- $playlist .= " <identifier><![CDATA[$url]]></identifier>\n";
- $playlist .= " <title><![CDATA[" . $song->title . "]]></title>\n";
- $playlist .= " <creator><![CDATA[" . $song->f_artist_full . "]]></creator>\n";
- $playlist .= " <annotation></annotation>\n";
- $playlist .= " <info><![CDATA[" . conf('web_path') . "/albums.php?action=show&album=" . $song->album . "]]></info>\n";
- $playlist .= " <image><![CDATA[" . conf('web_path') . "/albumart.php?id=" . $song->album . "&thumb=2" . "]]></image>\n";
- $playlist .= " <album><![CDATA[" . $song->f_album_full . "]]></album>\n";
- $playlist .= " <duration>" . $song->time . "</duration>\n";
- $playlist .= " </track>\n\n\n";
+
+ $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') . "/albumart.php?id=" . $song->album . "&fast=1&thumb=3";
+ $xml['track']['album'] = $song->f_album_full;
+ $xml['track']['duration'] = $song->time;
+ $result .= xml_from_array($xml,1,'xspf');
+
} // end foreach
- $playlist .= " </trackList>\n";
- $playlist .= "</playlist>\n";
+
header("Cache-control: public");
header("Content-Disposition: filename=playlist.xspf");
header("Content-Type: application/xspf+xml; charset=utf-8");
- echo $playlist;
+ echo xml_get_header('xspf');
+ echo $result;
+ echo xml_get_footer('xspf');
} // create_xspf
@@ -251,7 +244,7 @@ class Stream {
echo "<script language=\"javascript\" type=\"text/javascript\">\n";
echo "<!-- begin\n";
echo "function PlayerPopUp(URL) {\n";
- echo "window.open(URL, 'XSPF_player', 'width=400,height=168,scrollbars=0,toolbar=0,location=0,directories=0,status=1,resizable=0');\n";
+ echo "window.open(URL, 'XSPF_player', 'width=350,height=300,scrollbars=0,toolbar=0,location=0,directories=0,status=0,resizable=0');\n";
echo "window.location = '" . return_referer() . "';\n";
echo "return false;\n";
echo "}\n";
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index 136a9584..6a20f387 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -1292,26 +1292,135 @@ function get_user_icon($name) {
* creates a XML document form it for use
* primarly by the ajax mojo
*/
-function xml_from_array($array,$callback=0) {
+function xml_from_array($array,$callback=0,$type='') {
+ switch ($type) {
- foreach ($array as $key=>$value) {
- if (is_numeric($key)) { $key = 'item'; }
- if (is_array($value)) {
- $value = xml_from_array($value,1);
- $string .= "\t<content div=\"$key\">$value</content>\n";
- }
- else {
- /* We need to escape the value */
- $string .= "\t<content div=\"$key\"><![CDATA[$value]]></content>\n";
+ case 'itunes':
+ foreach ($array as $key=>$value) {
+ if (is_array($value)) {
+ $value = xml_from_array($value,1,$type);
+ $string .= "\t\t<$key>\n$value\t\t</$key>\n";
+ }
+ else {
+ if ($key == "key"){
+ $string .= "\t\t<$key>$value</$key>\n";
+ } elseif (is_numeric($value)) {
+ $string .= "\t\t\t<key>$key</key><integer>$value</integer>\n";
+ } elseif ($key == "Date Added") {
+ $string .= "\t\t\t<key>$key</key><date>$value</date>\n";
+ } elseif (is_string($value)) {
+ /* We need to escape the value */
+ $string .= "\t\t\t<key>$key</key><string><![CDATA[$value]]></string>\n";
+ }
+ }
+
+ }
+
+ return $string;
+ break;
+ case 'xspf':
+ foreach ($array as $key=>$value) {
+ if (is_array($value)) {
+ $value = xml_from_array($value,1,$type);
+ $string .= "\t\t<$key>\n$value\t\t</$key>\n";
+ }
+ else {
+ if ($key == "key"){
+ $string .= "\t\t<$key>$value</$key>\n";
+ } elseif (is_numeric($value)) {
+ $string .= "\t\t\t<$key>$value</$key>\n";
+ } elseif (is_string($value)) {
+ /* We need to escape the value */
+ $string .= "\t\t\t<$key><![CDATA[$value]]></$key>\n";
+ }
+ }
+
+ }
+
+ return $string;
+ break;
+ default:
+ foreach ($array as $key=>$value) {
+ if (is_numeric($key)) { $key = 'item'; }
+ if (is_array($value)) {
+ $value = xml_from_array($value,1);
+ $string .= "\t<content div=\"$key\">$value</content>\n";
+ }
+ else {
+ /* We need to escape the value */
+ $string .= "\t<content div=\"$key\"><![CDATA[$value]]></content>\n";
+ }
+ // end foreach elements
+ }
+ if (!$callback) {
+ $string = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<root>\n" . $string . "</root>\n";
}
- } // end foreach elements
- if (!$callback) {
- $string = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<root>\n" . $string . "</root>\n";
+ return $string;
+ break;
}
+} // xml_from_array
- return $string;
+/**
+ * xml_get_header
+ * This takes the type and returns the correct xml header
+ */
+function xml_get_header($type){
+ switch ($type){
+ case 'itunes':
+ $header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" .
+ "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n" .
+ "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n" .
+ "<plist version=\"1.0\">\n" .
+ "<dict>\n" .
+ " <key>Major Version</key><integer>1</integer>\n" .
+ " <key>Minor Version</key><integer>1</integer>\n" .
+ " <key>Application Version</key><string>7.0.2</string>\n" .
+ " <key>Features</key><integer>1</integer>\n" .
+ " <key>Show Content Ratings</key><true/>\n" .
+ " <key>Tracks</key>\n" .
+ " <dict>\n";
+ return $header;
+ break;
+ case 'xspf':
+ $header = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" .
+ "<playlist version = \"1\" xmlns=\"http://xspf.org/ns/0/\">\n ".
+ "<title>Ampache XSPF Playlist</title>\n" .
+ "<creator>" . conf('site_title') . "</creator>\n" .
+ "<annotation>" . conf('site_title') . "</annotation>\n" .
+ "<info>". conf('web_path') ."</info>\n" .
+ "<trackList>\n\n\n\n";
+ return $header;
+ break;
+ default:
+ $header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ return $header;
+ break;
+ }
+} //xml_get_header
+
+/**
+ * xml_get_footer
+ * This takes the type and returns the correct xml footer
+ */
+function xml_get_footer($type){
+ switch ($type){
+ case 'itunes':
+ $footer = " </dict>\n" .
+ "</dict>\n" .
+ "</plist>\n";
+ return $footer;
+ break;
+ case 'xspf':
+ $footer = " </trackList>\n" .
+ "</playlist>\n";
+ return $footer;
+ break;
+ default:
+
+ break;
+ }
+} //xml_get_footer
-} // xml_from_array
?>
diff --git a/modules/flash/FMP3.swf b/modules/flash/FMP3.swf
new file mode 100644
index 00000000..c7ba021c
--- /dev/null
+++ b/modules/flash/FMP3.swf
Binary files differ
diff --git a/modules/flash/license.txt b/modules/flash/license.txt
index 12d609e1..47c76ace 100644
--- a/modules/flash/license.txt
+++ b/modules/flash/license.txt
@@ -1,10 +1,48 @@
-Copyright (c) 2005, Fabricio Zuardi
-All rights reserved.
+XSPF Player + FMP3 by Enrico Lai http://www.enricolai.com
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+XSPF & FMP3 SWF files are released under Creative Commons License:
+http://creativecommons.org/licenses/by-nc-nd/2.5/
+
+EnricoLai.com is NOT responsible of the content diffused with XSPF - FMP3 Player.
+Please check twice that you have legal rights to diffuse what you're willing to.
+
+EnricoLai.com given the permission to integrate and distribute XSPF player into http://www.ampache.org Project.
+
+So you can redistribute XSPF player only with the entire project. For other purpose please contact the author.
+
+
+ ¤ You may not:
+======================
+
+ * re-copy, decompil/disassemble, rename, change, redistribute all XSPF Player files without a direct EnricoLai.com authorization.
+ * Re-sale XSPF Player
+ * Use XSPF Player to diffuse illegal MP3 Files
+ * Use XSPF - FMP3 Player without respect the conditions specified here
+
+
+ ¤ You may:
+======================
+
+ * Install XSPF Player everywhere you need to.
+
+
+
+ ¤ PayPal donations:
+======================
+
+http://www.ampache.org/team.php
+
+http://www.enricolai.com/fmp3/xspf-flash-mp3-player.asp
+
+
+
+
+ ¤ Disclaimer
+======================
+
+For more information about Disclaimer, License and Conditions
+
+http://www.enricolai.com/FMP3/
+http://www.enricolai.com/fmp3/xspf-flash-mp3-player.asp
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/modules/flash/readme.txt b/modules/flash/readme.txt
new file mode 100644
index 00000000..50be68b3
--- /dev/null
+++ b/modules/flash/readme.txt
@@ -0,0 +1,49 @@
+XSPF Player - Extended Version
+
+This version is completely similar, like functionality, to the previous version
+but it adds the possibility to visualize the photo of album (a JPG 80x80 pixel)
+beyond that the eventual one link to the page of information.
+
+XSPF Player does not have need of no language scripting server side.
+
+XSPF Player is not open source (the .fla is not disclosed), can be unloaded and used free of charge in the Creative respect of the license Commons
+and in the respect of the Conditions of I use indicated to the end of this page. See license.txt for more information.
+
+Parameters to pass to the SWF
+
+variable value
+folder Absolute distance that it indicates where finds the rows FMP3.swf
+ (http://www.enricolai.com/FMP3/) as an example.
+ The rows that come tried must be called .fmp3.swf. therefore not rinominate the rows.
+playlist Absolute URL of the playlist in format XSPF to read.
+ As an example http://www.enricolai.com/FMP3/kahvi.xml
+ (rows XML must reside in the same domain in which the application is found).
+ In contrary case you must use one script server side that functions from Gateway.
+ The URL can also make reference to a dynamic script that gives back playlist the XSPF to the flight.
+color Hexdecimal color (as an example FFCC00) in order to change the color of the background of the player.
+loop possible values: yes | not | playlist
+ If it comes set up yes the rows mp3 comes reproduced from the every beginning which time arrives to the term.
+ If it comes no instead set up contrary of yes.
+ If it comes set up on playlist the player it passes to the successive trace once finished a trace
+ and continues therefore on the entire list of rows mp3.
+lma (loop mode active) possible values: yes | no
+ it allows to activate or less the key of the Loop mode that it allows to the customer of set or less the Loop option.
+textcolor Hexdecimal color (as an example FFCC00) in order to change the color of the text and the icon Audio.
+action possible values: play | stop
+ The player sets up so that the trace mp3 leaves endured or not.
+ In modality stop the customer must click to play in order to start the trace.
+vol (volume begins them) is possible to set up a value for the volume from 0 to 100.
+ If the value is not set up the player it reproduces the rows mp3 to maximum volume (100)
+display Example 1@. - @0@ - @. It tightens that it allows to personalize the visualization of the list.
+ Default the player it visualizes the values of the tag annotation present in playlist the XSPF.
+ The first value before the @ indicates if to visualize or less the progressive numeration for every trace (1, 2, 3 etc etc).
+ According to value it indicates tightens to use in order to separate it the numerical value of the trace from the text.
+ The third value is a numerical value that allows to choose the tag of the XML to visualize using as separatory it tightens
+ it specified in the fourth value. The possible values for the third parameter are:
+ 0 - it visualizes the values of the tag title
+ 1 - |separatore 4° valore| + visualizes the values of tag creator + title
+ 2 - |separatore 4° valore| + visualizes the values of tag title + creator
+ 3 - |separatore 4° valore| + visualizes the values of tag album + title
+ 4 - |separatore 4° valore| + visualizes the values of tag title + album
+viewinfo If set on true it visualizes push-button INFO on the photo of the album and allows to activate
+ the link to the page specified in the tag info of rows XSPF.
diff --git a/modules/flash/swfobject.js b/modules/flash/swfobject.js
new file mode 100644
index 00000000..7345ef05
--- /dev/null
+++ b/modules/flash/swfobject.js
@@ -0,0 +1,138 @@
+/**
+ * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
+ * legal reasons.
+ */
+if(typeof deconcept=="undefined"){var deconcept=new Object();}
+if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
+if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
+deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
+this.DETECT_KEY=_b?_b:"detectflash";
+this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
+this.params=new Object();
+this.variables=new Object();
+this.attributes=new Array();
+if(_1){this.setAttribute("swf",_1);}
+if(id){this.setAttribute("id",id);}
+if(w){this.setAttribute("width",w);}
+if(h){this.setAttribute("height",h);}
+if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
+this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
+if(c){this.addParam("bgcolor",c);}
+var q=_8?_8:"high";
+this.addParam("quality",q);
+this.setAttribute("useExpressInstall",_7);
+this.setAttribute("doExpressInstall",false);
+var _d=(_9)?_9:window.location;
+this.setAttribute("xiRedirectUrl",_d);
+this.setAttribute("redirectUrl","");
+if(_a){this.setAttribute("redirectUrl",_a);}};
+deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
+this.attributes[_e]=_f;
+},getAttribute:function(_10){
+return this.attributes[_10];
+},addParam:function(_11,_12){
+this.params[_11]=_12;
+},getParams:function(){
+return this.params;
+},addVariable:function(_13,_14){
+this.variables[_13]=_14;
+},getVariable:function(_15){
+return this.variables[_15];
+},getVariables:function(){
+return this.variables;
+},getVariablePairs:function(){
+var _16=new Array();
+var key;
+var _18=this.getVariables();
+for(key in _18){_16.push(key+"="+_18[key]);}
+return _16;},getSWFHTML:function(){var _19="";
+if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
+if(this.getAttribute("doExpressInstall")){
+this.addVariable("MMplayerType","PlugIn");}
+_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
+_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
+var _1a=this.getParams();
+for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
+var _1c=this.getVariablePairs().join("&");
+if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
+}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
+_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
+_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
+var _1d=this.getParams();
+for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
+var _1f=this.getVariablePairs().join("&");
+if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
+return _19;
+},write:function(_20){
+if(this.getAttribute("useExpressInstall")){
+var _21=new deconcept.PlayerVersion([6,0,65]);
+if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
+this.setAttribute("doExpressInstall",true);
+this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
+document.title=document.title.slice(0,47)+" - Flash Player Installation";
+this.addVariable("MMdoctitle",document.title);}}
+if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
+var n=(typeof _20=="string")?document.getElementById(_20):_20;
+n.innerHTML=this.getSWFHTML();return true;
+}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
+return false;}};
+deconcept.SWFObjectUtil.getPlayerVersion=function(){
+var _23=new deconcept.PlayerVersion([0,0,0]);
+if(navigator.plugins&&navigator.mimeTypes.length){
+var x=navigator.plugins["Shockwave Flash"];
+if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
+}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
+catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
+catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
+catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
+return _23;};
+deconcept.PlayerVersion=function(_27){
+this.major=_27[0]!=null?parseInt(_27[0]):0;
+this.minor=_27[1]!=null?parseInt(_27[1]):0;
+this.rev=_27[2]!=null?parseInt(_27[2]):0;
+};
+deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
+if(this.major<fv.major){return false;}
+if(this.major>fv.major){return true;}
+if(this.minor<fv.minor){return false;}
+if(this.minor>fv.minor){return true;}
+if(this.rev<fv.rev){
+return false;
+}return true;};
+deconcept.util={getRequestParameter:function(_29){
+var q=document.location.search||document.location.hash;
+if(q){var _2b=q.substring(1).split("&");
+for(var i=0;i<_2b.length;i++){
+if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
+return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
+return "";}};
+deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
+var _2d=document.getElementsByTagName("OBJECT");
+for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
+if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
+deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
+__flash_savedUnloadHandler=function(){};
+if(typeof window.onunload=="function"){
+var _30=window.onunload;
+window.onunload=function(){
+deconcept.SWFObjectUtil.cleanupSWFs();_30();};
+}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
+if(typeof window.onbeforeunload=="function"){
+var oldBeforeUnload=window.onbeforeunload;
+window.onbeforeunload=function(){
+deconcept.SWFObjectUtil.prepUnload();
+oldBeforeUnload();};
+}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
+if(Array.prototype.push==null){
+Array.prototype.push=function(_31){
+this[this.length]=_31;
+return this.length;};}
+var getQueryParamValue=deconcept.util.getRequestParameter;
+var FlashObject=deconcept.SWFObject;
+var SWFObject=deconcept.SWFObject;
diff --git a/modules/flash/xspf_player.swf b/modules/flash/xspf_player.swf
index f03790a4..da45a0d1 100644
--- a/modules/flash/xspf_player.swf
+++ b/modules/flash/xspf_player.swf
Binary files differ
diff --git a/templates/show_admin_tools.inc.php b/templates/show_admin_tools.inc.php
index 6a5ed497..3cfad0f6 100644
--- a/templates/show_admin_tools.inc.php
+++ b/templates/show_admin_tools.inc.php
@@ -78,8 +78,9 @@ $users = $GLOBALS['user']->get_recent(10);
<hr noshade="noshade" size="3" />
<a href="<?php echo $web_path; ?>/admin/system.php?action=generate_config"><?php echo _('Generate New Config'); ?></a>
<a href="<?php echo $web_path; ?>/admin/preferences.php?action=show_set_preferences"><?php echo _('Preferences Permissions'); ?></a>
-<!-- <a href="<?php echo $web_path; ?>/admin/system.php?action=check_version"><?php echo _('Check for New Version'); ?></a>
--->
+ <hr noshade="noshade" size="3" />
+ <a href="<?php echo $web_path; ?>/admin/system.php?action=export&export=itunes"><?php echo _('Export To Itunes DB'); ?></a>
+<!-- <a href="<?php echo $web_path; ?>/admin/system.php?action=check_version"><?php echo _('Check for New Version'); ?></a>-->
</div>
<?php show_box_bottom(); ?>
<?php show_box_top(_('User Activity')); ?>
diff --git a/templates/show_xspf_player.inc.php b/templates/show_xspf_player.inc.php
index 0602c4dd..179b9c61 100644
--- a/templates/show_xspf_player.inc.php
+++ b/templates/show_xspf_player.inc.php
@@ -21,13 +21,46 @@
?>
<html>
<head><title>Ampache XSPF Player</title></head>
-<body style="margin:0px; padding:0px; border:0px;">
-<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="168">
-<param name="allowScriptAccess" value="sameDomain"/>
-<param name="movie" value="<?php echo conf('web_path'); ?>/modules/flash/xspf_player.swf?playlist_url=<?php echo conf('web_path'); ?>/song.php<?php echo $play_info; ?>&autoplay=true&autoload=true"/>
-<param name="quality" value="high"/>
-<param name="bgcolor" value="#E6E6E6"/>
-<embed src="<?php echo conf('web_path'); ?>/modules/flash/xspf_player.swf?playlist_url=<?php echo conf('web_path'); ?>/modules/flash/xspf_player.php<?php echo $play_info; ?>&autoplay=true&autoload=true" quality="high" bgcolor="#E6E6E6" name="xspf_player" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="center" height="168" width="400"></embed>
-</object>
+<body style="margin:0px; padding:0px; border:0px; background-color: #000000">
+<div id="mp3player">
+<script type="text/javascript" src="<?php echo conf('web_path'); ?>/modules/flash/swfobject.js"></script>
+<script language=JavaScript>
+<!--
+//Disable right mouse click Script to hide the source url for the flash player it prevents ripping music a bit.
+//When used together with locked songs this will help just a bit more.
+function clickIE4(){
+if (event.button==2){
+return false;
+}
+}
+
+function clickNS4(e){
+if (document.layers||document.getElementById&&!document.all){
+if (e.which==2||e.which==3){
+return false;
+}
+}
+}
+
+if (document.layers){
+document.captureEvents(Event.MOUSEDOWN);
+document.onmousedown=clickNS4;
+}
+else if (document.all&&!document.getElementById){
+document.onmousedown=clickIE4;
+}
+
+document.oncontextmenu=new Function("return false")
+
+// -->
+</script>
+<script type="text/javascript">
+<!--
+var flashObj = new SWFObject ("<?php echo conf('web_path'); ?>/modules/flash/xspf_player.swf?action=play&playlist=<?php echo conf('web_path'); ?>/modules/flash/xspf_player.php<?php echo $play_info; ?>&folder=<?php echo conf('web_path'); ?>/modules/flash/&textcolor=033066&color=E6E6E6&loop=playlist&lma=yes&viewinfo=true&vol=30&display=1@. - @2@ - @", "FMP3", "350", "300", 7, "#000000", true);
+flashObj.write ("mp3player");
+// -->
+</script>
+</div>
+
</body>
</html>