From 1a164ba699716b5a6d71cdadf64fe9db4a4ed89b Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Mon, 28 Jan 2013 13:06:47 -0500 Subject: Yank out the Flash player by the roots. --- docs/CHANGELOG | 1 + docs/man/man1/ampache.1 | 6 --- lib/class/stream.class.php | 3 -- lib/class/stream_playlist.class.php | 47 -------------------- lib/preferences.php | 3 -- modules/flash/LICENSE | 25 ----------- modules/flash/Original/skin.xml | 37 --------------- modules/flash/crossdomain.xml | 22 --------- modules/flash/xspf_jukebox.fla | Bin 681984 -> 0 bytes modules/flash/xspf_jukebox.swf | Bin 28427 -> 0 bytes modules/flash/xspf_player.php | 49 -------------------- server/stream.ajax.php | 12 ++--- stream.php | 2 +- templates/show_playtype_switch.inc.php | 3 +- templates/show_xspf_player.inc.php | 79 --------------------------------- 15 files changed, 7 insertions(+), 282 deletions(-) delete mode 100644 modules/flash/LICENSE delete mode 100644 modules/flash/Original/skin.xml delete mode 100644 modules/flash/crossdomain.xml delete mode 100644 modules/flash/xspf_jukebox.fla delete mode 100644 modules/flash/xspf_jukebox.swf delete mode 100644 modules/flash/xspf_player.php delete mode 100644 templates/show_xspf_player.inc.php 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; @@ -350,52 +349,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 "\n"; - echo "" . Config::get('site_title') . "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - } - } // create_xspf_player - /** * create_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 "\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 @@ - -400 -170 - -Original -Lacy Morrow - -gojukebox@gmail.com -http://www.lacymorrow.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ 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 @@ - - - - - - diff --git a/modules/flash/xspf_jukebox.fla b/modules/flash/xspf_jukebox.fla deleted file mode 100644 index 3e9fe873..00000000 Binary files a/modules/flash/xspf_jukebox.fla and /dev/null differ diff --git a/modules/flash/xspf_jukebox.swf b/modules/flash/xspf_jukebox.swf deleted file mode 100644 index 8ca4aa77..00000000 Binary files a/modules/flash/xspf_jukebox.swf and /dev/null differ 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 @@ -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']); diff --git a/stream.php b/stream.php index 0b418509..1deab0c0 100644 --- a/stream.php +++ b/stream.php @@ -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')) { - @@ -44,6 +43,6 @@ if (Preference::has_access('play_type')) { 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 @@ - - -Ampache XSPF Player - - -
- - - - - - - - - - - - - - - -

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.

- -
- - - -- cgit