diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-28 13:06:47 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-28 13:26:11 -0500 |
commit | 1a164ba699716b5a6d71cdadf64fe9db4a4ed89b (patch) | |
tree | 566bc5c32c8b0b0e33a4082eda102659f4143b43 | |
parent | 17613d090558dc2cd5e28e97917fe873c631e3ba (diff) | |
download | ampache-1a164ba699716b5a6d71cdadf64fe9db4a4ed89b.tar.gz ampache-1a164ba699716b5a6d71cdadf64fe9db4a4ed89b.tar.bz2 ampache-1a164ba699716b5a6d71cdadf64fe9db4a4ed89b.zip |
Yank out the Flash player by the roots.
-rwxr-xr-x | docs/CHANGELOG | 1 | ||||
-rw-r--r-- | docs/man/man1/ampache.1 | 6 | ||||
-rw-r--r-- | lib/class/stream.class.php | 3 | ||||
-rw-r--r-- | lib/class/stream_playlist.class.php | 47 | ||||
-rw-r--r-- | lib/preferences.php | 3 | ||||
-rw-r--r-- | modules/flash/LICENSE | 25 | ||||
-rw-r--r-- | modules/flash/Original/skin.xml | 37 | ||||
-rw-r--r-- | modules/flash/crossdomain.xml | 22 | ||||
-rw-r--r-- | modules/flash/xspf_jukebox.fla | bin | 681984 -> 0 bytes | |||
-rw-r--r-- | modules/flash/xspf_jukebox.swf | bin | 28427 -> 0 bytes | |||
-rw-r--r-- | modules/flash/xspf_player.php | 49 | ||||
-rw-r--r-- | server/stream.ajax.php | 12 | ||||
-rw-r--r-- | stream.php | 2 | ||||
-rw-r--r-- | templates/show_playtype_switch.inc.php | 3 | ||||
-rw-r--r-- | templates/show_xspf_player.inc.php | 79 |
15 files changed, 7 insertions, 282 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index aedf7c9d..743dbd92 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,7 @@ -------------------------------------------------------------------------- v.3.6-FUTURE + - Removed the Flash player - Added an HTML5 player (patch by Holger Brunn) - Changed the way themes handle RTL languages - Fixed a display problem with the Penguin theme by adding a new CSS class diff --git a/docs/man/man1/ampache.1 b/docs/man/man1/ampache.1 index ca8de929..ea5ea523 100644 --- a/docs/man/man1/ampache.1 +++ b/docs/man/man1/ampache.1 @@ -32,12 +32,6 @@ full translation of many languages. The following scripts are included in Ampache and can be used to automate some aspects of Ampache. -grab_xspf.sh - -Due to no free tools being available in Debian and Ubuntu policy required the -removal of xspf_jukebox.swf. This script downloads the source from Lacy Morrows -website and places it into the proper location. - catalog_update.inc You can automate the update of all, or some of your local catalogs by using the diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 7304891c..c2d77e95 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -373,9 +373,6 @@ class Stream { // If this wasn't ajax included run away if (!defined('AJAX_INCLUDE')) { return false; } - // If we're doin the flash magic then run away as well - if (Config::get('play_type') == 'xspf_player') { return false; } - switch (Config::get('playlist_method')) { default: case 'clear': diff --git a/lib/class/stream_playlist.class.php b/lib/class/stream_playlist.class.php index 1f8b4b88..6ddb158e 100644 --- a/lib/class/stream_playlist.class.php +++ b/lib/class/stream_playlist.class.php @@ -159,7 +159,6 @@ class Stream_Playlist { switch($type) { case 'democratic': case 'localplay': - case 'xspf_player': case 'html5_player': // These are valid, but witchy $redirect = false; @@ -351,52 +350,6 @@ class Stream_Playlist { } // create_xspf /** - * create_xspf_player - * Due to the fact that this is an integrated player (flash) we actually - * have to do a little 'cheating' to make this work. - * We are going to take advantage of tmp_playlists to do all of this - * hotness - */ - public function create_xspf_player() { - debug_event('stream_playlist', 'Creating XSPF player', 5); - /* Build the extra info we need to have it pass */ - $play_info = "?action=show&tmpplaylist_id=" . $GLOBALS['user']->playlist->id; - - // start ugly evil javascript code - //FIXME: This needs to go in a template, here for now though - //FIXME: This preference doesn't even exists, we'll eventually - //FIXME: just make it the default - if (Config::get('embed_xspf') == 1 ){ - header("Location: ".Config::get('web_path')."/index.php?xspf&play_info=".$GLOBALS['user']->playlist->id); - } - else { - echo "<html><head>\n"; - echo "<title>" . Config::get('site_title') . "</title>\n"; - echo "<script language=\"javascript\" type=\"text/javascript\">\n"; - echo "<!-- begin\n"; - echo "function PlayerPopUp(URL) {\n"; - // We do a little check here to see if it's a Wii! - if (false !== stristr($_SERVER['HTTP_USER_AGENT'], 'Nintendo Wii')) { - echo "window.location=URL;\n"; - } - // Else go ahead and do the normal stuff - else { - echo "window.open(URL, 'XSPF_player', 'width=400,height=170,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"; - echo "// end -->\n"; - echo "</script>\n"; - echo "</head>\n"; - - echo "<body onLoad=\"javascript:PlayerPopUp('" . Config::get('web_path') . "/modules/flash/xspf_player.php" . $play_info . "')\">\n"; - echo "</body>\n"; - echo "</html>\n"; - } - } // create_xspf_player - - /** * create_html5_player * * Creates an html5 player. diff --git a/lib/preferences.php b/lib/preferences.php index eeef5646..b59025c7 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -165,7 +165,6 @@ function create_preference_input($name,$value) { case 'condPL': case 'rio_track_stats': case 'rio_global_stats': - case 'embed_xspf': case 'direct_link': if ($value == '1') { $is_true = "selected=\"selected\""; } else { $is_false = "selected=\"selected\""; } @@ -177,7 +176,6 @@ function create_preference_input($name,$value) { case 'play_type': if ($value == 'localplay') { $is_local = 'selected="selected"'; } elseif ($value == 'democratic') { $is_vote = 'selected="selected"'; } - elseif ($value == 'xspf_player') { $is_xspf_player = 'selected="selected"'; } elseif ($value == 'html5_player') { $is_html5_player = 'selected="selected"'; } else { $is_stream = "selected=\"selected\""; } echo "<select name=\"$name\">\n"; @@ -191,7 +189,6 @@ function create_preference_input($name,$value) { if (Config::get('allow_localplay_playback')) { echo "\t<option value=\"localplay\" $is_local>" . T_('Localplay') . "</option>\n"; } - echo "\t<option value=\"xspf_player\" $is_xspf_player>" . T_('Flash Player') . "</option>\n"; echo "\t<option value=\"html5_player\" $is_html5_player>" . _('HTML5 Player') . "</option>\n"; echo "</select>\n"; break; diff --git a/modules/flash/LICENSE b/modules/flash/LICENSE deleted file mode 100644 index bacd9c39..00000000 --- a/modules/flash/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2007, Lacy Morrow -All rights reserved. - -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. - -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/Original/skin.xml b/modules/flash/Original/skin.xml deleted file mode 100644 index 519ff103..00000000 --- a/modules/flash/Original/skin.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
<skin version="0" xmlns="http://xsml.org/ns/0/">
-<width>400</width> -<height>170</height> -<name> -Original
</name>
<author> -Lacy Morrow
</author> -<email> -gojukebox@gmail.com
</email>
<website> -http://www.lacymorrow.com
</website>
<objects> -<shape shape="rectangle" width="400" height="15" color="EAEAEA" /> -<shape shape="rectangle" width="248" height="138" x="138" y="17" color="EAEAEA" /> -<shape shape="rectangle" width="10" height="144" x="388" y="17" color="EAEAEA" /> -<shape shape="rectangle" width="134" height="134" x="2.4" y="17.4" color="EAEAEA" /> -<shape shape="rectangle" width="44" height="14" x="5" y="154" color="EAEAEA" /> -<shape shape="rectangle" width="50.2" height="13" x="56" y="155" border="2" borderColor="999999" color="EAEAEA" /> -<shape shape="rectangle" width="25.8" height="13" x="110" y="155" border="2" borderColor="999999" color="EAEAEA" /> -<object label="playButton" x="19" y="3" width="9" height="9" color="999999" /> -<object label="stopButton" x="32" y="3" width="8" height="9" color="999999" /> -<object label="prevButton" x="3" y="3" width="11" height="9" color="999999" /> -<object label="fwdButton" x="46" y="3" width="11" height="9" color="999999" /> -<object label="loadBar" x="62" y="2" width="335" height="11" alpha="80" color="BBBBBB" /> -<object label="timeBar" x="62" y="2" width="335" height="11" alpha="70" color="999999" /> -<object label="trackDisplay" x="64" y="" width="280" size="10" font="Arial" color="333333" align="left" /> -<object label="timeDisplay" x="350" y="" size="10" font="Arial" color="333333" /> -<object label="volumeDisplay" x="380" y="4" width="15" height="7" color="444444" /> -<object label="shuffleButton" x="7" y="155" width="20.7" height="11.7" color="333333" hoverMessage="Shuffle" /> -<object label="repeatButton" x="34" y="156" width="15.7" height="11.7" color="333333" hoverMessage="Repeat" /> -<object label="infoButton" x="112" y="154" size="-2" color="333333" text="info" font="Arial" hoverMessage="Info" /> -<object label="purchaseButton" x="58" y="153" size="-2" color="333333" text="purchase" font="Arial" hoverMessage="Purchase" /> -<object label="downloadButton" x="56" y="153.5" size="-2" color="333333" text="Download" font="Arial" /> -<object label="scrollupButton" x="391" y="22" width="6" height="6" color="888888" />
<object label="scrolldownButton" x="391" y="31" width="6" height="6" color="888888" />
<object label="scrollButton" x="391.2" y="40" width="6" height="120" color="888888" bgAlpha="0" /> -<object label="imageDisplay" x="4" y="20" width="130" height="130" /> -<object label="videoDisplay" x="4" y="20" width="130" height="130" /> -<playlist x="140" y="17" width="243" height="136" size="10" font="Arial" color="333333" /> -<text x="374" y="142" size="10" text="@" bold="1" color="333333" hoverMessage="About the Jukebox..." url="http://blog.lacymorrow.com" />
-<object label="startButton" width="400" height="170" alpha="0" /> -</objects>
</skin>
\ No newline at end of file diff --git a/modules/flash/crossdomain.xml b/modules/flash/crossdomain.xml deleted file mode 100644 index 6bd7a671..00000000 --- a/modules/flash/crossdomain.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0"?> -<!-- Copyright (c) 2001 - 2008 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. --> -<!DOCTYPE cross-domain-policy - SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> -<cross-domain-policy> - <allow-access-from domain="*" /> -</cross-domain-policy> diff --git a/modules/flash/xspf_jukebox.fla b/modules/flash/xspf_jukebox.fla Binary files differdeleted file mode 100644 index 3e9fe873..00000000 --- a/modules/flash/xspf_jukebox.fla +++ /dev/null diff --git a/modules/flash/xspf_jukebox.swf b/modules/flash/xspf_jukebox.swf Binary files differdeleted file mode 100644 index 8ca4aa77..00000000 --- a/modules/flash/xspf_jukebox.swf +++ /dev/null diff --git a/modules/flash/xspf_player.php b/modules/flash/xspf_player.php deleted file mode 100644 index 9f9dde2e..00000000 --- a/modules/flash/xspf_player.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */ -/** - * XSPF Player - * - * - * LICENSE: GNU General Public License, version 2 (GPLv2) - * Copyright (c) 2001 - 2011 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 v2 - * as published by the Free Software Foundation. - * - * 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. - * - * @package Ampache - * @copyright 2001 - 2011 Ampache.org - * @license http://opensource.org/licenses/gpl-2.0 GPLv2 - * @link http://www.ampache.org/ - */ - -require_once '../../lib/init.php'; - -// Switch on actions -switch ($_REQUEST['action']) { - default: - case 'tmp_playlist': - // Set for hackage! - $_REQUEST['flash_hack'] = 1; - $objects = $GLOBALS['user']->playlist->get_items(); - $stream = new Stream_Playlist(); - $stream->add($objects); - $stream->generate_playlist('xspf', false); - break; - case 'show': - $play_url = Config::get('web_path') . '/modules/flash/xspf_player.php'; - require_once Config::get('prefix') . '/templates/show_xspf_player.inc.php'; - break; -} // end switch - - -?> diff --git a/server/stream.ajax.php b/server/stream.ajax.php index 1ad0b237..a573a448 100644 --- a/server/stream.ajax.php +++ b/server/stream.ajax.php @@ -44,7 +44,6 @@ switch ($_REQUEST['action']) { } $new = $_POST['type']; break; - case 'xspf_player': case 'html5_player': $new = $_POST['type']; // Rien a faire @@ -71,17 +70,14 @@ switch ($_REQUEST['action']) { break; case 'basket': - - // Go ahead and see if we should clear the playlist here or not, we might not actually clear it in the session - // we'll just have to feed it bad data. - // FIXME: This is sad, will be fixed when I switch how streaming works. - // Check to see if 'clear' was passed if it was then we need to reset the basket - if ( ($_REQUEST['playlist_method'] == 'clear' || Config::get('playlist_method') == 'clear') AND Config::get('play_type') != 'xspf_player') { + // Go ahead and see if we should clear the playlist here or not, + // we might not actually clear it in the session. + if ( ($_REQUEST['playlist_method'] == 'clear' || Config::get('playlist_method') == 'clear')) { define('NO_SONGS','1'); ob_start(); require_once Config::get('prefix') . '/templates/rightbar.inc.php'; $results['rightbar'] = ob_get_clean(); - } + } // We need to set the basket up! $_SESSION['iframe']['target'] = Config::get('web_path') . '/stream.php?action=basket&playlist_method=' . scrub_out($_REQUEST['playlist_method']); @@ -40,7 +40,7 @@ switch ($_REQUEST['action']) { $media_ids = $GLOBALS['user']->playlist->get_items(); // Check to see if 'clear' was passed if it was then we need to reset the basket - if ( ($_REQUEST['playlist_method'] == 'clear' || Config::get('playlist_method') == 'clear') AND Config::get('play_type') != 'xspf_player') { + if ( ($_REQUEST['playlist_method'] == 'clear' || Config::get('playlist_method') == 'clear')) { $GLOBALS['user']->playlist->clear(); } diff --git a/templates/show_playtype_switch.inc.php b/templates/show_playtype_switch.inc.php index ce30bac2..9debe89b 100644 --- a/templates/show_playtype_switch.inc.php +++ b/templates/show_playtype_switch.inc.php @@ -36,7 +36,6 @@ if (Preference::has_access('play_type')) { <?php } if (Config::get('allow_democratic_playback')) { ?> <option value="democratic" <?php echo $is_democratic; ?>><?php echo T_('Democratic'); ?></option> <?php } ?> - <option value="xspf_player" <?php echo $is_xspf_player; ?>><?php echo T_('Flash Player'); ?></option> <option value="html5_player" <?php echo $is_html5_player; ?>><?php echo _('HTML5 Player'); ?></option> </select> <?php echo Ajax::observe('play_type_select','change',Ajax::action('?page=stream&action=set_play_type','play_type_select','play_type_form'),'1'); ?> @@ -44,6 +43,6 @@ if (Preference::has_access('play_type')) { <?php } // if they have access // Else just show what it currently is -else { echo ucwords(Config::get('play_type')); } +else { echo T_(ucwords(Config::get('play_type'))); } ?> </div> diff --git a/templates/show_xspf_player.inc.php b/templates/show_xspf_player.inc.php deleted file mode 100644 index 5cfb52d1..00000000 --- a/templates/show_xspf_player.inc.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php -/* vim:set softtabstop=4 shiftwidth=4 expandtab: */ -/** - * - * LICENSE: GNU General Public License, version 2 (GPLv2) - * Copyright 2001 - 2013 Ampache.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License v2 - * as published by the Free Software Foundation. - * - * 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. - * - */ -?> -<html> -<head><title>Ampache XSPF Player</title></head> -<body style="margin:0px; padding:0px; border:0px; background-color: #000000"> -<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> -<div id="mp3player"> -<?php -if (file_exists(Config::get('prefix')."/modules/flash/xspf_jukebox.swf")) { - $player_url = sprintf("%s/modules/flash/xspf_jukebox.swf?autoplay=true&repeat_playlist=true&crossFade=false&shuffle=false&skin_url=%s/modules/flash/Original/&playlist_url=%s",Config::get('web_path'),Config::get('web_path'),$play_url); -?> -<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="170" id="xspf_player" align="middle"> - <param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" /> - <param name="allowScriptAccess" value="sameDomain" /> - <param name="movie" value="<?php echo $player_url; ?>" /> - <param name="quality" value="high" /> - <param name="bgcolor" value="#ffffff" /> - <param name="type" value="application/x-shockwave-flash" /> - <param name="width" value="400" /> - <param name="height" value="170" /> - <param name="name" value="xspf_player" /> - <param name="align" value="middle" /> - <embed src="<?php echo $player_url; ?>" quality="high" bgcolor="#ffffff" width="400" height="170" name="xspf_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> -</object> -<?php } else { ?> -<p style="color:#ffffff;">Debian Policy requires the removal of the XSPF Flash Player, please see /usr/share/doc/ampache/README.Debian.gz for details and a work around.</p> -<?php } ?> -</div> - -</body> -</html> |