diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..1ff0c423 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore index 0ee5f7a0..994f7ddd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,5 @@ PLUGINS README *.phpproj *.sln -*.v11.suo -*.suo +*.v11.suo +*.suo diff --git a/lib/javascript/html5_player.js b/lib/javascript/html5_player.js deleted file mode 100644 index 45d0dc6e..00000000 --- a/lib/javascript/html5_player.js +++ /dev/null @@ -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($('').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 = $('
  • '); - $('#playlist').append(li); - li.html($('').append(playlist_items[id].title)); - playlist_items[id].player = $('