1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00

merged all changes from doped

This commit is contained in:
John Moore 2013-11-14 21:39:16 -06:00
parent 83abf55eeb
commit 82f818ae07
5 changed files with 67 additions and 195 deletions

63
.gitattributes vendored Normal file
View file

@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

4
.gitignore vendored
View file

@ -8,5 +8,5 @@ PLUGINS
README README
*.phpproj *.phpproj
*.sln *.sln
*.v11.suo *.v11.suo
*.suo *.suo

View file

@ -1,170 +0,0 @@
/* vim:set tabstop=4 softtabstop=4 shiftwidth=4 expandtab: */
/**
*
* LICENSE: GNU General Public License, version 2 (GPLv2)
* Copyright 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.
*
*/
var current_playlist_item = null;
function play_item(event)
{
op();
current_playlist_item = event.findElement().getStorage().get('playlist_item');
play();
}
function adjust_buttons()
{
if(!current_playlist_item.player.paused) {
$('#play').addClass('inactive');
$('#pause').removeClass('inactive');
$('#stop').removeClass('inactive');
}
else {
$('#play').removeClass('inactive');
$('#pause').addClass('inactive');
$('#stop').addClass('inactive');
}
}
function stop(event)
{
if(current_playlist_item) {
current_playlist_item.player.pause();
current_playlist_item.player.currentTime = 0;
current_playlist_item.element.removeClass('playing');
adjust_buttons();
}
}
function pause(event)
{
if(current_playlist_item) {
current_playlist_item.player.pause();
adjust_buttons();
}
}
function play(event)
{
if(current_playlist_item)
{
var info = $(current_playlist_item.info_url).attr('target', '_new')
$('#title').html(info);
$('#album').text(current_playlist_item.album);
$('#artist').text(current_playlist_item.author);
$('#albumart').html($('<img />').attr('src', current_playlist_item.albumart_url));
$(current_playlist_item.player).attr('preload', 'auto');
current_playlist_item.player.play();
current_playlist_item.element.addClass('playing');
adjust_buttons();
}
}
function next(event)
{
if(current_playlist_item && current_playlist_item.next) {
stop();
var next = current_playlist_item.next;
current_playlist_item = next;
play();
}
}
function previous(event)
{
if(current_playlist_item && current_playlist_item.previous) {
stop();
current_playlist_item = current_playlist_item.previous;
play();
}
}
function seconds_to_string(seconds)
{
return Math.floor(seconds / 60) + ":" + (Math.floor(seconds % 60) < 10 ? '0' : '') + Math.floor(seconds % 60);
}
function timeupdate(event)
{
if(current_playlist_item)
{
$('#progress_text').text(seconds_to_string(current_playlist_item.player.currentTime) + "/" + seconds_to_string(current_playlist_item.time));
if(current_playlist_item.player.currentTime > current_playlist_item.time / 2) {
if(current_playlist_item.next) {
current_playlist_item.next.player.writeAttribute('preload', 'auto');
}
}
//fix for chrome where ended is not thrown properly
if(current_playlist_item.player.currentTime >= current_playlist_item.time) {
ended(event);
}
}
}
function ended(event)
{
next(event);
}
function search(event)
{
var search = new RegExp(".*" + $('#input_search').val() + ".*", "i");
$.each(playlist_items, function (index, item) {
if (!search.test(item.title)) {
item.element.hide();
}
else {
item.element.show();
}
});
}
function clear_search(event)
{
$('#input_search').val('');
search(event);
}
$(document).ready(function() {
var last_item = null, first_item = null;
for(id in playlist_items)
{
var li = $('<li>');
$('#playlist').append(li);
li.html($('<span>').append(playlist_items[id].title));
playlist_items[id].player = $('<audio>').attr('preload', 'none').attr('src', playlist_items[id].play_url)[0];
var player = $(playlist_items[id].player);
li.append(playlist_items[id].player);
li.data('playlist_item', playlist_items[id]);
li.click(play_item);
li.attr('data-tooltip', playlist_items[id].album + ' - ' + playlist_items[id].author);
player.on('ended', ended);
player.on('timeupdate', timeupdate);
playlist_items[id].element = li;
if(last_item) {
last_item.next = playlist_items[id];
}
playlist_items[id].previous = last_item;
last_item = playlist_items[id];
if(first_item == null) {
first_item = playlist_items[id];
}
}
if(first_item) {
first_item.previous = last_item;
last_item.next = first_item;
current_playlist_item = first_item;
play();
}
$('#stop').click(stop);
$('#play').click(play);
$('#pause').click(pause);
$('#next').click(next);
$('#previous').click(previous);
$('#input_search').keyup(search);
$('#input_search').focus(clear_search);
});

View file

@ -40,13 +40,11 @@ if (Config::get('use_rss')) { ?>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?php echo Config::get('site_charset'); ?>" /> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?php echo Config::get('site_charset'); ?>" />
<title><?php echo scrub_out(Config::get('site_title')); ?> - <?php echo $location['title']; ?></title> <title><?php echo scrub_out(Config::get('site_title')); ?> - <?php echo $location['title']; ?></title>
<?php require_once Config::get('prefix') . '/templates/stylesheets.inc.php'; ?> <?php require_once Config::get('prefix') . '/templates/stylesheets.inc.php'; ?>
<<<<<<< HEAD
<link rel="stylesheet" href="<?php echo $web_path; ?>/modules/jquery/jquery-ui-1.10.3.min.css" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php echo $web_path; ?>/modules/jquery/jquery-ui-1.10.3.min.css" type="text/css" media="screen" />
</head> </head>
<body> <body>
<script src="<?php echo $web_path; ?>/modules/jquery/jquery-1.9.1.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/modules/jquery/jquery-1.9.1.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/modules/jquery/jquery-ui-1.10.3.min.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/modules/jquery/jquery-ui-1.10.3.min.js" language="javascript" type="text/javascript"></script>
=======
<?php <?php
// If iframes, we check in javascript that parent container exist, otherwise we redirect to index. Otherwise HTML5 iframed Player will look broken. // If iframes, we check in javascript that parent container exist, otherwise we redirect to index. Otherwise HTML5 iframed Player will look broken.
if (Config::get('iframes')) { if (Config::get('iframes')) {
@ -63,9 +61,9 @@ function forceIframe() {
?> ?>
</head> </head>
<body <?php echo (Config::get('iframes')) ? "onLoad='forceIframe();'" : ""; ?>> <body <?php echo (Config::get('iframes')) ? "onLoad='forceIframe();'" : ""; ?>>
<script src="<?php echo $web_path; ?>/modules/prototype/prototype.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/modules/jquery/jquery-1.9.1.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/modules/jquery/jquery-ui-1.10.3.min.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/modules/tinybox/tinybox.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/modules/tinybox/tinybox.js" language="javascript" type="text/javascript"></script>
>>>>>>> 346b25516d711de989bc3877c6c372439dfa58d3
<script src="<?php echo $web_path; ?>/lib/javascript/base.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/lib/javascript/base.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo $web_path; ?>/lib/javascript/ajax.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/lib/javascript/ajax.js" language="javascript" type="text/javascript"></script>
<!-- rfc3514 implementation --> <!-- rfc3514 implementation -->

View file

@ -60,16 +60,12 @@ if ($iframed) {
?> ?>
<link rel="stylesheet" href="<?php echo Config::get('web_path'); ?>/templates/jplayer.midnight.black.css" type="text/css" /> <link rel="stylesheet" href="<?php echo Config::get('web_path'); ?>/templates/jplayer.midnight.black.css" type="text/css" />
<?php require_once Config::get('prefix') . '/templates/stylesheets.inc.php'; ?> <?php require_once Config::get('prefix') . '/templates/stylesheets.inc.php'; ?>
<<<<<<< HEAD
<script src="<?php echo $web_path; ?>/modules/jquery/jquery-1.9.1.js" language="javascript" type="text/javascript"></script>
=======
<?php <?php
} }
?> ?>
<script src="<?php echo Config::get('web_path'); ?>/modules/jplayer/jquery.min.js" language="javascript" type="text/javascript"></script> <script src="<?php echo Config::get('web_path'); ?>/modules/jplayer/jquery.min.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo Config::get('web_path'); ?>/modules/jplayer/jquery.jplayer.min.js" language="javascript" type="text/javascript"></script> <script src="<?php echo Config::get('web_path'); ?>/modules/jplayer/jquery.jplayer.min.js" language="javascript" type="text/javascript"></script>
<script src="<?php echo Config::get('web_path'); ?>/modules/jplayer/jplayer.playlist.min.js" language="javascript" type="text/javascript"></script> <script src="<?php echo Config::get('web_path'); ?>/modules/jplayer/jplayer.playlist.min.js" language="javascript" type="text/javascript"></script>
>>>>>>> 346b25516d711de989bc3877c6c372439dfa58d3
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){ $(document).ready(function(){
var myPlaylist = new jPlayerPlaylist({ var myPlaylist = new jPlayerPlaylist({
@ -228,20 +224,6 @@ if ($iframed) {
<div class="jp-play-bar"></div> <div class="jp-play-bar"></div>
</div> </div>
</div> </div>
<<<<<<< HEAD
<div id="title"><?php echo T_('Loading...') ?></div>
<div id="album"><?php echo T_('Loading...') ?></div>
<div id="artist"><?php echo T_('Loading...') ?></div>
<div id="progress_text"><?php echo T_('Loading...') ?></div>
<button id="play" accesskey="<?php echo T_dgettext('html5_player_accesskey', 'p') ?>"><?php echo T_('Play') ?></button>
<button id="pause" accesskey="<?php echo T_dgettext('html5_player_accesskey', 'p') ?>"><?php echo T_('Pause') ?></button>
<button id="previous" accesskey="<?php echo T_dgettext('html5_player_accesskey', ',') ?>"><?php echo T_('Previous') ?></button>
<button id="next" accesskey="<?php echo T_dgettext('html5_player_accesskey', '.') ?>"><?php echo T_('Next') ?></button>
<button id="stop" accesskey="<?php echo T_dgettext('html5_player_accesskey', 'o') ?>"><?php echo T_('Stop') ?></button>
</div>
<div>
<ul id="playlist">
=======
<div class="jp-volume-bar"> <div class="jp-volume-bar">
<div class="jp-volume-bar-value"></div> <div class="jp-volume-bar-value"></div>
</div> </div>
@ -252,7 +234,6 @@ if ($iframed) {
<li><a href="javascript:;" class="jp-shuffle-off" tabindex="1" title="shuffle off">shuffle off</a></li> <li><a href="javascript:;" class="jp-shuffle-off" tabindex="1" title="shuffle off">shuffle off</a></li>
<li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li> <li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
<li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li> <li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
>>>>>>> 346b25516d711de989bc3877c6c372439dfa58d3
</ul> </ul>
</div> </div>
<div class="jp-playlist"> <div class="jp-playlist">