diff options
-rwxr-xr-x | docs/CHANGELOG | 2 | ||||
-rw-r--r-- | lib/class/stream.class.php | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index eeb69c71..769fd5c3 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3.4-Alpha3 + - Added tweak for Wii so that Flash player opens in current window + (Thx Dgn) - Fixed bug where Ampache would incorrectly search for album art when config option was empty (Thx Karl Hungus) - Enabling a Localplay Method will now set Allow Localplay to true diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index def353d5..8fa18e81 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -417,9 +417,16 @@ 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=170,scrollbars=0,toolbar=0,location=0,directories=0,status=0,resizable=0');\n"; - echo "window.location = '" . return_referer() . "';\n"; - echo "return false;\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"; |