2.3.6 undo basic auth

This commit is contained in:
Trevor Squillario 2012-12-06 21:40:11 -05:00
parent 8643f01647
commit 53ed1bc0d4
11 changed files with 1261 additions and 1239 deletions

View file

@ -24,12 +24,12 @@
<script src="js/plugins/jquery.scrollTo-1.4.2-min.js" type="text/javascript"></script>
<script src="js/jplayer/jquery.jplayer.min.js" type="text/javascript"></script>
<script src="js/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>
<script src="js/libs/api.js" type="text/javascript"></script>
<script src="js/libs/utils.js" type="text/javascript"></script>
<script src="js/app.js" type="text/javascript"></script>
<script src="js/libs/api.js" type="text/javascript"></script>
<script src="js/libs/chat.js" type="text/javascript"></script>
<script src="js/libs/generators.js" type="text/javascript"></script>
<script src="js/libs/player.js" type="text/javascript"></script>
<script src="js/app.js" type="text/javascript"></script>
<script src="js/ui-ready.js" type="text/javascript"></script>
<script src="js/ui-load.js" type="text/javascript"></script>
</head>
@ -224,6 +224,7 @@
<div class="clear"></div>
<div class="subsection floatleft">
<h3 class="title">Options</h3>
<label class="red">* Refresh (F5) required</label><br />
<label for="Theme">Theme</label><br />
<select id="Theme" name="Theme" class="large">
<option value="default">Default</option>
@ -236,7 +237,7 @@
<input type="text" id="AutoAlbumSize" name="AutoAlbumSize" class="large" title="Number of Albums to Get on the Music Library tab"/><br />
<label for="AutoPlaylistSize">Auto Playlist Size (Default 25)</label><br />
<input type="text" id="AutoPlaylistSize" name="AutoPlaylistSize" class="large" title="Number of Songs to Get on the Playlist tab"/><br />
<label for="ApplicationName">Application Name (Default MiniSub)</label><br />
<label for="ApplicationName">Application Name (Default MiniSub)*</label><br />
<input type="text" id="ApplicationName" name="ApplicationName" class="large" title="Custom Player Name"/><br />
</div>
<div class="subsection floatleft">
@ -255,8 +256,11 @@
<div class="inputwrap"><input type="checkbox" id="Debug" name="Debug" value="1" title="Enable Debug Mode (Events will be logged to the Javascript Console)"/></div>
<label for="Debug">Debug Mode</label>
<div class="clear"></div>
<div class="inputwrap"><input type="checkbox" id="ForceFlash" name="ForceFlash" value="1" title="Force Flash (Option doesn't work with Chrome App)"/></div>
<label for="ForceFlash">Force Flash</label>
<div class="inputwrap"><input type="checkbox" id="ForceFlash" name="ForceFlash" value="1" title="Force Flash Plugin for Audio (Option doesn't work with Chrome App)"/></div>
<label for="ForceFlash">Force Flash </label>
<div class="clear"></div>
<div class="inputwrap"><input type="checkbox" id="Protocol" name="Protocol" value="1" title="Enable Cross-Domain AJAX Requests (Use if MiniSub is hosted in a different domain than Subsonic)"/></div>
<label for="Protocol">Enable JSONP*</label>
</fieldset>
<div class="clear"></div>
<fieldset>
@ -296,10 +300,15 @@
<span class="changes">- </span>
</li>
-->
<li class="log"><span class="version"> - 2.3.6</span>
<span class="changes">- Added Setting to toggle JSONP (This is for cross-domain requests, aka Subsonic is hosted on a different domain than MiniSub)</span>
<span class="changes">- Switched back to URL authentication (Including coverArt)</span>
</li>
<li class="log"><span class="version">12/3/2012 - 2.3.5</span>
<span class="changes">- Added keyboard volume controls back. Use the plus (=/+) and minus (-/_) keys</span>
<span class="changes">- Change Save Current Position to Save Progress, added an indicator next to volume</span>
<span class="changes">- Fixed Last.fm scrobble feature, this works again!</span>
<span class="changes">- Switch to Basic Authentication</span>
</li>
<li class="log"><span class="version">11/27/2012 - 2.3.4</span>
<span class="changes">- Basic Breadcrumb navigation implemented</span>

107
js/app.js
View file

@ -2,47 +2,17 @@
var debug = false;
var audio = null;
var hostURL = location.href;
var protocol = 'json';
var baseURL;
var baseParams;
var apiVersion;
var username;
var password;
var passwordenc;
var server;
var smwidth;
var currentVersion = '2.3.5';
function getCookie(value) {
if ($.cookie(value)) {
return $.cookie(value);
} else {
return false;
}
/* jQuery.cookies.js
if (browserStorageCheck) {
var item = localStorage.getItem(value);
if (item != '' && item != undefined) {
return true;
} else {
return false;
}
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
}
*/
}
function setCookie(key, value) {
$.cookie(key, value, { expires: 365 });
/* jQuery.cookies.js
try {
if (debug) { console.log('Saving : ' + key + ':' + value); }
localStorage.setItem(key, value);
} catch (e) {
if (e == QUOTA_EXCEEDED_ERR) {
alert('Quota exceeded!');
}
}
*/
}
var apiVersion = '1.6.0';
var currentVersion = '2.3.6';
// Get URL Querystring Parameters
var u = getParameterByName('u');
@ -64,9 +34,7 @@ if (u && p && s) {
}
window.location.href = getPathFromUrl(window.location);
}
if (getCookie('Server')) {
baseURL = getCookie('Server') + '/rest';
}
var applicationName;
if (getCookie('ApplicationName')) {
applicationName = getCookie('ApplicationName');
@ -87,65 +55,8 @@ if (getCookie('password')) {
setCookie('passwordenc', 'enc:' + HexEncode(getCookie('password')));
setCookie('password', null);
}
var auth = makeBaseAuth(username, password.substring(4, password.length).hexDecode());
var apiVersion = '1.6.0';
function loadTabContent(tab) {
var tabid = '#action_' + tab.substring(1, tab.length);
$("ul.tabs li a").removeClass("active"); //Remove any "active" class
$(tabid).addClass("active"); //Add "active" class to selected tab
$(".tabcontent").hide(); //Hide all tab content
window.location.hash = tab;
switch (tab) {
case '#tabLibrary':
if (debug) { console.log("TAG LIBRARY"); }
if (getCookie('MusicFolders')) {
loadArtists(getCookie('MusicFolders'), false);
} else {
loadArtists();
}
getMusicFolders();
break;
case '#tabQueue':
if (debug) { console.log("TAG QUEUE"); }
var header = generateSongHeaderHTML();
$('#CurrentPlaylistContainer thead').html(header);
var count = $('#CurrentPlaylistContainer tbody tr.song').size();
updateStatus('#status_Current', countCurrentPlaylist('#CurrentPlaylistContainer'));
if (count > 0) {
$('#currentActions a.button').removeClass('disabled');
}
var songid = $('#CurrentPlaylistContainer tbody tr.playing').attr('childid');
if (songid !== undefined) {
$('#CurrentPlaylist').scrollTo($('#' + songid), 400);
}
break;
case '#tabPlaylists':
if (debug) { console.log("TAG PLAYLIST"); }
loadPlaylists();
loadFolders();
loadAutoPlaylists();
updateStatus('#status_Playlists', countCurrentPlaylist('#TrackContainer'));
break;
case '#tabPodcasts':
if (debug) { console.log("TAG PODCAST"); }
loadPodcasts();
updateStatus('#status_Podcasts', countCurrentPlaylist('#PodcastContainer'));
break;
case '#tabVideos':
if (debug) { console.log("TAG VIDEOS"); }
loadVideos(true);
break;
case '#tabPreferences':
getGenres();
break;
default:
break;
}
$(tab).fadeIn('fast'); //Fade in the active ID content
if (getCookie('Protocol')) {
protocol = 'jsonp';
}
var auth = makeBaseAuth(username, password.substring(4, password.length).hexDecode());
baseParams = 'u=' + username + '&p=' + password + '&f=' + protocol;

View file

@ -1,17 +1,8 @@
/* Ajax Global Setup */
// Inject Basic Auth
$.ajaxSetup({
beforeSend: function (req) {
req.setRequestHeader('Authorization', auth);
}
//headers: { "Authorization": "Basic " + auth }
});
function ping() {
function ping() {
$.ajax({
url: baseURL + '/ping.view?v=1.6.0&c=' + applicationName + '&f=json',
url: baseURL + '/ping.view?' + baseParams + '&v=1.6.0&c=' + applicationName,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].status == 'ok') {
@ -27,19 +18,19 @@ function ping() {
alert('Bad Server');
}
});
}
function loadArtists(id, refresh) {
}
function loadArtists(id, refresh) {
if (debug) { console.log("LOAD ARTISTS"); }
if (refresh) {
$('#ArtistContainer').empty();
}
var url;
if (id == "all") {
url = baseURL + '/getIndexes.view?v=' + apiVersion + '&c=' + applicationName + '&f=json';
url = baseURL + '/getIndexes.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName;
} else if (id) {
url = baseURL + '/getIndexes.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&musicFolderId=' + id;
url = baseURL + '/getIndexes.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&musicFolderId=' + id;
} else {
url = baseURL + '/getIndexes.view?v=' + apiVersion + '&c=' + applicationName + '&f=json';
url = baseURL + '/getIndexes.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName;
}
if (debug) { console.log(url); }
var content = $('#ArtistContainer').html();
@ -48,7 +39,7 @@ function loadArtists(id, refresh) {
$.ajax({
url: url,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
done: function () { if (debug) { console.log("DONE!"); } },
error: function () { if (debug) { console.log("ERROR!"); } },
@ -145,16 +136,15 @@ function loadArtists(id, refresh) {
}
});
}
}
function getMusicFolders() {
}
function getMusicFolders() {
$.ajax({
url: baseURL + '/getMusicFolders.view?v=' + apiVersion + '&c=' + applicationName + '&f=json',
url: baseURL + '/getMusicFolders.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].musicFolders.musicFolder !== undefined) {
// There is a bug in the API that doesn't return a JSON array for one artist
var folders = [];
if (data["subsonic-response"].musicFolders.musicFolder.length > 0) {
folders = data["subsonic-response"].musicFolders.musicFolder;
@ -177,8 +167,8 @@ function getMusicFolders() {
}
}
});
}
function getGenres() {
}
function getGenres() {
var genres = 'Acid Rock,Acoustic,Alt Country,Alt/Indie,Alternative & Punk,Alternative Metal,Alternative,AlternRock,Awesome,Bluegrass,Blues,Blues-Rock,Classic Hard Rock,Classic Rock,Comedy,Country,Country-Rock,Dance,Dance-Rock,Deep Funk,Easy Listening,Electronic,Electronica,Electronica/Dance,Folk,Folk/Rock,Funk,Grunge,Hard Rock,Heavy Metal,Holiday,House,Improg,Indie Rock,Indie,International,Irish,Jam Band,Jam,Jazz Fusion,Jazz,Latin,Live Albums,Metal,Music,Oldies,Other,Pop,Pop/Rock,Post Rock,Progressive Rock,Psychedelic Rock,Psychedelic,Punk,R&B,Rap & Hip-Hop,Reggae,Rock & Roll,Rock,Rock/Pop,Roots,Ska,Soft Rock,Soul,Southern Rock,Thrash Metal,Unknown,Vocal,World';
var genresArr = genres.split(',');
var options = [];
@ -187,8 +177,8 @@ function getGenres() {
options.push('<option value="' + genre + '">' + genre + '</option>');
});
$('#Genres').html(options.join(''));
}
function loadAutoPlaylists(refresh) {
}
function loadAutoPlaylists(refresh) {
if (debug) { console.log("LOAD AUTO PLAYLISTS"); }
if (refresh) {
$('#AutoPlaylistContainer').empty();
@ -216,12 +206,12 @@ function loadAutoPlaylists(refresh) {
$(html).appendTo("#AutoPlaylistContainer");
});
}
}
function getAlbums(id, action, appendto) {
}
function getAlbums(id, action, appendto) {
$.ajax({
url: baseURL + '/getMusicDirectory.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + id,
url: baseURL + '/getMusicDirectory.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + id,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (action == '') {
@ -235,7 +225,6 @@ function getAlbums(id, action, appendto) {
$('#action_tabLibrary').trigger('click');
}
if (data["subsonic-response"].directory.child !== undefined) {
// There is a bug in the API that doesn't return a JSON array for one artist
var children = [];
if (data["subsonic-response"].directory.child.length > 0) {
children = data["subsonic-response"].directory.child;
@ -274,13 +263,13 @@ function getAlbums(id, action, appendto) {
}
}
});
}
/* Currently not being used */
function getArtist(id, action, appendto) {
}
/* Currently not being used */
function getArtist(id, action, appendto) {
$.ajax({
url: baseURL + '/getArtist.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + id,
url: baseURL + '/getArtist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + id,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (action == '') {
@ -294,7 +283,6 @@ function getArtist(id, action, appendto) {
$('#action_tabLibrary').trigger('click');
}
if (data["subsonic-response"].artist !== undefined) {
// There is a bug in the API that doesn't return a JSON array for one artist
var children = [];
if (data["subsonic-response"].artist.album.length > 0) {
children = data["subsonic-response"].artist.album;
@ -323,8 +311,8 @@ function getArtist(id, action, appendto) {
}
}
});
}
function getAlbumListBy(id, offset) {
}
function getAlbumListBy(id, offset) {
var size, url;
if (getCookie('AutoAlbumSize')) {
size = getCookie('AutoAlbumSize');
@ -332,14 +320,14 @@ function getAlbumListBy(id, offset) {
size = 15;
}
if (offset > 0) {
url = baseURL + '/getAlbumList.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&size=' + size + '&type=' + id + '&offset=' + offset
url = baseURL + '/getAlbumList.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=' + size + '&type=' + id + '&offset=' + offset
} else {
url = baseURL + '/getAlbumList.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&size=' + size + '&type=' + id
url = baseURL + '/getAlbumList.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=' + size + '&type=' + id
}
$.ajax({
url: url,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].status != 'failed') {
@ -347,7 +335,6 @@ function getAlbumListBy(id, offset) {
$("#AlbumContainer tbody").empty();
var header = generateAlbumHeaderHTML();
$("#AlbumContainer thead").html(header);
// There is a bug in the API that doesn't return a JSON array for one artist
var albums = [];
if (data["subsonic-response"].albumList.album.length > 0) {
albums = data["subsonic-response"].albumList.album;
@ -376,8 +363,8 @@ function getAlbumListBy(id, offset) {
}
}
});
}
function toggleAlbumListNextPrev(el, on, type, offset) {
}
function toggleAlbumListNextPrev(el, on, type, offset) {
if (el != '') {
if (on) {
$(el).addClass('on');
@ -394,8 +381,8 @@ function toggleAlbumListNextPrev(el, on, type, offset) {
$('#status_Library').data('offset', '0');
}
}
}
function getRandomSongList(action, appendto, genre, folder) {
}
function getRandomSongList(action, appendto, genre, folder) {
if (debug) { console.log('action:' + action + ', appendto:' + appendto + ', genre:' + genre + ', folder:' + folder); }
var size;
if (getCookie('AutoPlaylistSize')) {
@ -417,9 +404,9 @@ function getRandomSongList(action, appendto, genre, folder) {
getStarred(action, appendto, 'song');
} else {
$.ajax({
url: baseURL + '/getRandomSongs.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&size=' + size + genreParams + folderParams,
url: baseURL + '/getRandomSongs.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=' + size + genreParams + folderParams,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].randomSongs.song !== undefined) {
@ -432,7 +419,6 @@ function getRandomSongList(action, appendto, genre, folder) {
$("#TrackContainer tbody").empty();
$(appendto).empty();
}
// There is a bug in the API that doesn't return a JSON array for one artist
var items = [];
if (data["subsonic-response"].randomSongs.song.length > 0) {
items = data["subsonic-response"].randomSongs.song;
@ -467,8 +453,8 @@ function getRandomSongList(action, appendto, genre, folder) {
}
});
}
}
function getStarred(action, appendto, type) {
}
function getStarred(action, appendto, type) {
var size;
if (getCookie('AutoPlaylistSize')) {
size = getCookie('AutoPlaylistSize');
@ -476,9 +462,9 @@ function getStarred(action, appendto, type) {
size = 25;
}
$.ajax({
url: baseURL + '/getStarred.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&size=' + size,
url: baseURL + '/getStarred.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=' + size,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].starred !== undefined) {
@ -491,7 +477,6 @@ function getStarred(action, appendto, type) {
$("#TrackContainer tbody").empty();
$(appendto).empty();
}
// There is a bug in the API that doesn't return a JSON array for one artist
var items = [];
switch (type) {
case 'artist':
@ -560,16 +545,16 @@ function getStarred(action, appendto, type) {
}
}
});
}
var updaterNowPlaying;
var updaterNowPlayingIdList = [];
function updateNowPlaying(showPopup) {
}
var updaterNowPlaying;
var updaterNowPlayingIdList = [];
function updateNowPlaying(showPopup) {
updaterNowPlaying = $.periodic({ period: 4000, decay: 1.5, max_period: 30000 }, function () {
$.ajax({
periodic: this,
url: baseURL + '/getNowPlaying.view?v=' + apiVersion + '&c=' + applicationName + '&f=json',
url: baseURL + '/getNowPlaying.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].nowPlaying.entry === undefined) {
@ -604,7 +589,7 @@ function updateNowPlaying(showPopup) {
if (msg.coverArt === undefined) {
coverartSrc = 'images/albumdefault_50.jpg';
} else {
coverartSrc = baseURL + '/getCoverArt.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&size=50&id=' + msg.coverArt;
coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=50&id=' + msg.coverArt;
}
if (getCookie('Notification_NowPlaying')) {
var sid = msg.username + '-' + msg.id;
@ -618,16 +603,16 @@ function updateNowPlaying(showPopup) {
}
});
});
}
function stopUpdateNowPlaying() {
}
function stopUpdateNowPlaying() {
updaterNowPlaying.cancel();
}
}
function search(type, query) {
function search(type, query) {
$.ajax({
url: baseURL + '/search2.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&query=' + query,
url: baseURL + '/search2.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&query=' + query,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
$("#AlbumContainer tbody").empty();
@ -674,9 +659,9 @@ function search(type, query) {
}
}
});
}
}
function loadFolders(refresh) {
function loadFolders(refresh) {
if (debug) { console.log("LOAD FOLDERS"); }
if (refresh) {
$('#FolderContainer').empty();
@ -685,9 +670,9 @@ function loadFolders(refresh) {
if (content === "") {
// Load Folders
$.ajax({
url: baseURL + '/getMusicFolders.view?v=' + apiVersion + '&c=' + applicationName + '&f=json',
url: baseURL + '/getMusicFolders.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
var musicFolders = [];
@ -708,8 +693,8 @@ function loadFolders(refresh) {
}
});
}
}
function loadPlaylists(refresh) {
}
function loadPlaylists(refresh) {
if (debug) { console.log("LOAD PLAYLISTS"); }
if (refresh) {
$('#PlaylistContainer').empty();
@ -718,9 +703,9 @@ function loadPlaylists(refresh) {
if (content === "") {
// Load Playlists
$.ajax({
url: baseURL + '/getPlaylists.view?v=' + apiVersion + '&c=' + applicationName + '&f=json',
url: baseURL + '/getPlaylists.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
var playlists = [];
@ -747,8 +732,8 @@ function loadPlaylists(refresh) {
}
});
}
}
function savePlaylist(playlistid) {
}
function savePlaylist(playlistid) {
var songs = [];
$('#TrackContainer tr.song').each(function (index) {
songs.push($(this).attr('childid'));
@ -756,10 +741,10 @@ function savePlaylist(playlistid) {
if (songs.length > 0) {
$.ajax({
type: 'GET',
url: baseURL + '/createPlaylist.view',
dataType: 'json',
url: baseURL + '/createPlaylist.view?' + baseParams,
dataType: protocol,
timeout: 10000,
data: { v: apiVersion, c: applicationName, f: "json", playlistId: playlistid, songId: songs },
data: { v: apiVersion, c: applicationName, playlistId: playlistid, songId: songs },
success: function () {
getPlaylist(playlistid);
updateMessage('Playlist Updated!', true);
@ -767,12 +752,12 @@ function savePlaylist(playlistid) {
traditional: true // Fixes POST with an array in JQuery 1.4
});
}
}
function getPlaylist(id, action, appendto) {
}
function getPlaylist(id, action, appendto) {
$.ajax({
url: baseURL + '/getPlaylist.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + id,
url: baseURL + '/getPlaylist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + id,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].playlist.entry !== undefined) {
@ -784,7 +769,6 @@ function getPlaylist(id, action, appendto) {
if (action === 'autoplay') {
$(appendto).empty();
}
// There is a bug in the API that doesn't return a JSON array for one artist
var children = [];
var playlist = data["subsonic-response"].playlist;
if (playlist.entry.length > 0) {
@ -821,13 +805,13 @@ function getPlaylist(id, action, appendto) {
}
}
});
}
function loadPlaylistsForMenu(menu) {
}
function loadPlaylistsForMenu(menu) {
$('#' + menu).empty();
$.ajax({
url: baseURL + '/getPlaylists.view?v=' + apiVersion + '&c=' + applicationName + '&f=json',
url: baseURL + '/getPlaylists.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
var playlists = [];
@ -844,34 +828,34 @@ function loadPlaylistsForMenu(menu) {
});
}
});
}
function newPlaylist() {
}
function newPlaylist() {
var reply = prompt("Choose a name for your new playlist.", "");
if (reply != 'null' && reply != null && reply != '') {
$.ajax({
url: baseURL + '/createPlaylist.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&name=' + reply,
url: baseURL + '/createPlaylist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&name=' + reply,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
loadPlaylists(true);
}
});
}
}
function deletePlaylist(id) {
}
function deletePlaylist(id) {
$.ajax({
url: baseURL + '/deletePlaylist.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + id,
url: baseURL + '/deletePlaylist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + id,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
loadPlaylists(true);
$('#TrackContainer tbody').empty();
}
});
}
function addToPlaylist(playlistid, from) {
}
function addToPlaylist(playlistid, from) {
var selected = [];
var el;
if (from === 'current') {
@ -887,12 +871,11 @@ function addToPlaylist(playlistid, from) {
// Get songs from playlist
var currentsongs = [];
$.ajax({
url: baseURL + '/getPlaylist.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + playlistid,
url: baseURL + '/getPlaylist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + playlistid,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
// There is a bug in the API that doesn't return a JSON array for one artist
var children = [];
if (data["subsonic-response"].playlist.entry !== undefined) {
if (data["subsonic-response"].playlist.entry.length > 1) {
@ -918,10 +901,10 @@ function addToPlaylist(playlistid, from) {
if (checkVersion(runningVersion, minimumVersion)) { // is 1.8.0 or newer
$.ajax({
type: 'GET',
url: baseURL + '/updatePlaylist.view',
dataType: 'json',
url: baseURL + '/updatePlaylist.view?' + baseParams,
dataType: protocol,
timeout: 10000,
data: { v: apiVersion, c: applicationName, f: "json", playlistId: playlistid, songIdToAdd: selected },
data: { v: apiVersion, c: applicationName, playlistId: playlistid, songIdToAdd: selected },
success: function (data) {
// Add logic to show an error if the playlist update fails
// if (data["subsonic-response"].playlist.entry !== undefined) {
@ -935,10 +918,10 @@ function addToPlaylist(playlistid, from) {
} else {
$.ajax({ // Depreciated: 11/5/2012
type: 'GET',
url: baseURL + '/createPlaylist.view',
dataType: 'json',
url: baseURL + '/createPlaylist.view?' + baseParams,
dataType: protocol,
timeout: 10000,
data: { v: apiVersion, c: applicationName, f: "json", playlistId: playlistid, songId: currentsongs },
data: { v: apiVersion, c: applicationName, playlistId: playlistid, songId: currentsongs },
success: function () {
$('table.songlist tr.song').each(function () {
$(this).removeClass('selected');
@ -956,10 +939,10 @@ function addToPlaylist(playlistid, from) {
if (reply) {
$.ajax({
type: 'GET',
url: baseURL + '/createPlaylist.view',
dataType: 'json',
url: baseURL + '/createPlaylist.view?' + baseParams,
dataType: protocol,
timeout: 10000,
data: { v: apiVersion, c: applicationName, f: "json", name: "" + reply + "", songId: selected },
data: { v: apiVersion, c: applicationName, name: "" + reply + "", songId: selected },
success: function () {
$('table.songlist tr.song').each(function () {
$(this).removeClass('selected');
@ -972,8 +955,8 @@ function addToPlaylist(playlistid, from) {
}
setTimeout(function () { $('div.submenu').fadeOut(); }, 100);
}
}
function addToCurrent(addAll) {
}
function addToCurrent(addAll) {
var count;
if (addAll) {
count = $('#AlbumContainer tr.song').length;
@ -993,8 +976,8 @@ function addToCurrent(addAll) {
$('#CurrentPlaylistContainer tbody tr.song').removeClass('selected');
updateMessage(count + ' Song(s) Added', true);
}
}
function countCurrentPlaylist(container) {
}
function countCurrentPlaylist(container) {
var total = $(container + ' tr.song').size();
if (total > 0) {
var time = 0;
@ -1008,8 +991,8 @@ function countCurrentPlaylist(container) {
} else {
return '';
}
}
function saveCurrentPlaylist() {
}
function saveCurrentPlaylist() {
if (browserStorageCheck) {
var html = localStorage.getItem('CurrentPlaylist');
var current = $('#CurrentPlaylistContainer tbody').html();
@ -1026,8 +1009,8 @@ function saveCurrentPlaylist() {
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
}
}
function deleteCurrentPlaylist() {
}
function deleteCurrentPlaylist() {
if (browserStorageCheck) {
localStorage.removeItem('CurrentPlaylist');
setCookie('CurrentSong', null);
@ -1035,8 +1018,8 @@ function deleteCurrentPlaylist() {
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
}
}
function loadCurrentPlaylist() {
}
function loadCurrentPlaylist() {
if (browserStorageCheck) {
var html = localStorage.getItem('CurrentPlaylist');
if (html != '' && html !== undefined && html !== null) {
@ -1046,8 +1029,8 @@ function loadCurrentPlaylist() {
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
}
}
function saveTrackPosition() {
}
function saveTrackPosition() {
var el = $('#songdetails_song');
var songid = el.attr('childid');
if (songid !== undefined) {
@ -1065,8 +1048,8 @@ function saveTrackPosition() {
}
}
if (debug) { console.log('Saving Track Position: songid:' + songid + ', albumid:' + albumid + ', position:' + position); }
}
function downloadItem(id, type) {
}
function downloadItem(id, type) {
var url;
if (type == 'item' && id) {
reqDownload = 'id=' + id;
@ -1075,13 +1058,13 @@ function downloadItem(id, type) {
reqDownload = 'playlistUtf8Hex=' + id;
}
if (reqDownload) {
url = baseURL + '/download.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&' + reqDownload;
url = baseURL + '/download.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&' + reqDownload;
window.location = url;
}
}
}
function loadPodcasts(refresh) {
function loadPodcasts(refresh) {
if (debug) { console.log("LOAD PODCASTS"); }
if (refresh) {
$('#ChannelsContainer').empty();
@ -1090,9 +1073,9 @@ function loadPodcasts(refresh) {
if (content === "") {
// Load Podcasts
$.ajax({
url: baseURL + '/getPodcasts.view?v=' + apiVersion + '&c=' + applicationName + '&f=json',
url: baseURL + '/getPodcasts.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
var podcasts = [];
@ -1121,12 +1104,12 @@ function loadPodcasts(refresh) {
}
});
}
}
function getPodcast(id, action, appendto) {
}
function getPodcast(id, action, appendto) {
$.ajax({
url: baseURL + '/getPodcasts.view?v=' + apiVersion + '&c=' + applicationName + '&f=json',
url: baseURL + '/getPodcasts.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
var podcasts = [];
@ -1187,8 +1170,8 @@ function getPodcast(id, action, appendto) {
}
}
});
}
function loadVideos(refresh) {
}
function loadVideos(refresh) {
if (debug) { console.log("LOAD VIDEOS"); }
if (refresh) {
$('#VideosContainer').empty();
@ -1197,9 +1180,9 @@ function loadVideos(refresh) {
if (content == "") {
// Load Videos
$.ajax({
url: baseURL + '/getVideos.view?v=' + apiVersion + '&c=' + applicationName + '&f=json',
url: baseURL + '/getVideos.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].videos != '') {
@ -1217,7 +1200,7 @@ function loadVideos(refresh) {
} else {
rowcolor = 'odd';
}
var videoURL = baseURL + '/stream.view?v=' + apiVersion + '&c=' + applicationName + '&id=' + video.id;
var videoURL = baseURL + '/stream.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + video.id;
html = '<tr class=\"row video\" childid=\"' + video.id + '\" parentid=\"' + video.parent + '\" bitrate=\"' + video.bitRate + '\" userrating=\"\">';
html += '<td class=\"itemactions\">';
//html += '<a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>';
@ -1232,7 +1215,7 @@ function loadVideos(refresh) {
if (video.coverArt === undefined) {
coverartSrc = 'images/albumdefault_25.jpg';
} else {
coverartSrc = baseURL + '/getCoverArt.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&size=25&id=' + video.coverArt;
coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=25&id=' + video.coverArt;
}
var time = secondsToTime(video.duration);
html += '<td class=\"album\"><img src=\"' + coverartSrc + '\" />' + video.album + '</td>';
@ -1244,5 +1227,4 @@ function loadVideos(refresh) {
}
});
}
}
}

View file

@ -4,9 +4,9 @@ function updateChatMessages() {
updater = $.periodic({ period: 1000, decay: 1.5, max_period: 1800000 }, function () {
$.ajax({
periodic: this,
url: baseURL + '/getChatMessages.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&since=' + starttime,
url: baseURL + '/getChatMessages.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&since=' + starttime,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].chatMessages.chatMessage === undefined) {
@ -49,10 +49,10 @@ function stopUpdateChatMessages() {
function addChatMessage(msg) {
$.ajax({
type: 'GET',
url: baseURL + '/addChatMessage.view',
dataType: 'json',
url: baseURL + '/addChatMessage.view?' + baseParams,
dataType: protocol,
timeout: 10000,
data: { v: apiVersion, c: applicationName, f: "json", message: msg },
data: { v: apiVersion, c: applicationName, message: msg },
success: function () {
updater.reset();
},

View file

@ -33,7 +33,7 @@ function generateAlbumHTML(childid, parentid, coverart, title, artist, rating, s
if (coverart == undefined) {
html += '<td class=\"albumart\"><img src=\"images/albumdefault_50.jpg\" /></td>';
} else {
html += '<td class=\"albumart\"><img src=\"' + baseURL + '/getCoverArt.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&size=50&id=' + coverart + '\" /></td>';
html += '<td class=\"albumart\"><img src=\"' + baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=50&id=' + coverart + '\" /></td>';
}
html += '<td class=\"album\">' + title + '</td>';
html += '<td class=\"artist\">' + artist + '</td>';
@ -77,7 +77,7 @@ function generateSongHTML(childid, parentid, track, title, description, artist,
if (coverart == undefined) {
coverartSrc = 'images/albumdefault_25.jpg';
} else {
coverartSrc = baseURL + '/getCoverArt.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&size=25&id=' + coverart;
coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=25&id=' + coverart;
}
html += '<td class=\"album\" data-order-by=\"' + album + '\"><a href="#"><img src=\"' + coverartSrc + '\" />' + album + '</a></td>';
html += '<td class=\"time\">' + time + '</td>';

View file

@ -5,16 +5,16 @@ function getSongData(el, songid, albumid, position, loadonly) {
var minimumVersion = parseVersionString('1.8.0');
if (checkVersion(runningVersion, minimumVersion)) {
if (debug) { console.log('apiVersion at or above 1.8.0 using getSong.view'); }
ajaxUrl = baseURL + '/getSong.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + songid;
ajaxUrl = baseURL + '/getSong.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid;
} else {
if (debug) { console.log('apiVersion below 1.8.0 using getMusicDirectory.view'); }
ajaxUrl = baseURL + '/getMusicDirectory.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + albumid; // Deprecated: apiVersion 1.8.0
ajaxUrl = baseURL + '/getMusicDirectory.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + albumid; // Deprecated: apiVersion 1.8.0
}
if (debug) { console.log(ajaxUrl) }
$.ajax({
url: ajaxUrl,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function (data) {
var title, artist, album, rating, starred, contenttype, suffix;
@ -36,7 +36,6 @@ function getSongData(el, songid, albumid, position, loadonly) {
}
if (typeof data["subsonic-response"].directory != 'undefined') { // Deprecated: apiVersion 1.8.0
if (typeof data["subsonic-response"].directory.child != 'undefined') {
// There is a bug in the API that doesn't return a JSON array for one artist
var children = [];
if (data["subsonic-response"].directory.child.length > 0) {
children = data["subsonic-response"].directory.child;
@ -87,8 +86,8 @@ function playSong(el, songid, albumid, title, artist, album, coverart, rating, s
coverartSrc = 'images/albumdefault_60.jpg';
coverartFullSrc = '';
} else {
coverartSrc = baseURL + '/getCoverArt.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&size=60&id=' + coverart;
coverartFullSrc = baseURL + '/getCoverArt.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + coverart;
coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=60&id=' + coverart;
coverartFullSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + coverart;
}
$('#coverartimage').attr('href', coverartFullSrc);
$('#coverartimage img').attr('src', coverartSrc);
@ -125,11 +124,11 @@ function playSong(el, songid, albumid, title, artist, album, coverart, rating, s
ready: function () {
if (suffix == 'oga') {
$(this).jPlayer("setMedia", {
oga: baseURL + '/stream.view?v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt,
oga: baseURL + '/stream.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt,
});
} else if (suffix == 'mp3') {
$(this).jPlayer("setMedia", {
mp3: baseURL + '/stream.view?v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt,
mp3: baseURL + '/stream.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt,
});
}
if (!loadonly) {
@ -181,11 +180,11 @@ function playSong(el, songid, albumid, title, artist, album, coverart, rating, s
for (i = 0; i < data.solutions.length; i++) {
var solution = data.solutions[i];
if (data[solution].used) {
spechtml += "<strong>" + solution + "</strong> is";
spechtml += "<strong class=\"codesyntax\">" + solution + "</strong> is";
spechtml += " currently being used with<strong>";
for (format in data[solution].support) {
if (data[solution].support[format]) {
spechtml += " " + format;
spechtml += " <strong class=\"codesyntax\">" + format + "</strong>";
}
}
spechtml += "</strong> support";
@ -199,7 +198,7 @@ function playSong(el, songid, albumid, title, artist, album, coverart, rating, s
scrobbleSong(false);
scrobbled = false;
if (getCookie('Notification_Song')) {
if (getCookie('Notification_Song') && !loadonly) {
showNotification(coverartSrc, toHTML.un(title), toHTML.un(artist + ' - ' + album), 'text', '#NextTrack');
}
if (getCookie('ScrollTitle')) {
@ -242,9 +241,9 @@ function playVideo(id, bitrate) {
function scrobbleSong(submission) {
var songid = $('#songdetails_song').attr('childid');
$.ajax({
url: baseURL + '/scrobble.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + songid + "&submission=" + submission,
url: baseURL + '/scrobble.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + "&submission=" + submission,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function () {
if (submission) {
@ -255,9 +254,9 @@ function scrobbleSong(submission) {
}
function rateSong(songid, rating) {
$.ajax({
url: baseURL + '/setRating.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + songid + "&rating=" + rating,
url: baseURL + '/setRating.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + "&rating=" + rating,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function () {
updateMessage('Rating Updated!', true);
@ -268,14 +267,14 @@ function starItem(itemid, starred) {
var url;
if (itemid !== undefined) {
if (starred) {
url = baseURL + '/star.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + itemid;
url = baseURL + '/star.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + itemid;
} else {
url = baseURL + '/unstar.view?v=' + apiVersion + '&c=' + applicationName + '&f=json&id=' + itemid;
url = baseURL + '/unstar.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + itemid;
}
$.ajax({
url: url,
method: 'GET',
dataType: 'json',
dataType: protocol,
timeout: 10000,
success: function () {
updateMessage('Favorite Updated!', true);

View file

@ -1,3 +1,36 @@
function getCookie(value) {
if ($.cookie(value)) {
return $.cookie(value);
} else {
return false;
}
/* jQuery.cookies.js
if (browserStorageCheck) {
var item = localStorage.getItem(value);
if (item != '' && item != undefined) {
return true;
} else {
return false;
}
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
}
*/
}
function setCookie(key, value) {
$.cookie(key, value, { expires: 365 });
/* jQuery.cookies.js
try {
if (debug) { console.log('Saving : ' + key + ':' + value); }
localStorage.setItem(key, value);
} catch (e) {
if (e == QUOTA_EXCEEDED_ERR) {
alert('Quota exceeded!');
}
}
*/
}
/* Reusable Functions */
function clickButton(el) {
var el = $(el);

View file

@ -1,5 +1,14 @@
$(document).ready(function () {
//User config staff
// Inject Basic Auth
/*
$.ajaxSetup({
beforeSend: function (req) {
req.setRequestHeader('Authorization', auth);
}
//headers: { "Authorization": "Basic " + auth }
});
*/
// Fill Preferences from Cookies
if (getCookie('username')) { $('#Username').val(getCookie('username')); }
//$('#Password').val(getCookie('passwordenc'));
if (getCookie('AutoPlaylists')) { $('#AutoPlaylists').val(getCookie('AutoPlaylists')); }
@ -8,6 +17,10 @@
if (getCookie('Server')) { $('#Server').val(getCookie('Server')); }
if (getCookie('ApplicationName')) { $('#ApplicationName').val(getCookie('ApplicationName')); }
if (getCookie('Server')) {
baseURL = getCookie('Server') + '/rest';
}
// Set Preferences defaults
if (getCookie('Theme')) {
$('#Theme').val(getCookie('Theme'));
@ -45,6 +58,11 @@
} else {
$('#ForceFlash').attr('checked', false);
}
if (getCookie('Protocol')) {
$('#Protocol').attr('checked', true);
} else {
$('#Protocol').attr('checked', false);
}
if (getCookie('AutoPilot')) {
setCookie('AutoPilot', null)
}
@ -69,6 +87,61 @@
return false;
});
function loadTabContent(tab) {
var tabid = '#action_' + tab.substring(1, tab.length);
$("ul.tabs li a").removeClass("active"); //Remove any "active" class
$(tabid).addClass("active"); //Add "active" class to selected tab
$(".tabcontent").hide(); //Hide all tab content
window.location.hash = tab;
switch (tab) {
case '#tabLibrary':
if (debug) { console.log("TAG LIBRARY"); }
if (getCookie('MusicFolders')) {
loadArtists(getCookie('MusicFolders'), false);
} else {
loadArtists();
}
getMusicFolders();
break;
case '#tabQueue':
if (debug) { console.log("TAG QUEUE"); }
var header = generateSongHeaderHTML();
$('#CurrentPlaylistContainer thead').html(header);
var count = $('#CurrentPlaylistContainer tbody tr.song').size();
updateStatus('#status_Current', countCurrentPlaylist('#CurrentPlaylistContainer'));
if (count > 0) {
$('#currentActions a.button').removeClass('disabled');
}
var songid = $('#CurrentPlaylistContainer tbody tr.playing').attr('childid');
if (songid !== undefined) {
$('#CurrentPlaylist').scrollTo($('#' + songid), 400);
}
break;
case '#tabPlaylists':
if (debug) { console.log("TAG PLAYLIST"); }
loadPlaylists();
loadFolders();
loadAutoPlaylists();
updateStatus('#status_Playlists', countCurrentPlaylist('#TrackContainer'));
break;
case '#tabPodcasts':
if (debug) { console.log("TAG PODCAST"); }
loadPodcasts();
updateStatus('#status_Podcasts', countCurrentPlaylist('#PodcastContainer'));
break;
case '#tabVideos':
if (debug) { console.log("TAG VIDEOS"); }
loadVideos(true);
break;
case '#tabPreferences':
getGenres();
break;
default:
break;
}
$(tab).fadeIn('fast'); //Fade in the active ID content
}
// Tabs
$('.tabcontent').hide(); //Hide all content
if (!getCookie('username') && !getCookie('passwordenc') && !getCookie('Server')) { // Show Preferences
@ -913,7 +986,8 @@
if (applicationname != "") {
setCookie('ApplicationName', applicationname);
}
location.reload(true);
updateMessage('Preferences Saved...', true);
//location.reload(true);
});
$('#Theme').live('change', function () {
var theme = $(this).val();
@ -988,7 +1062,15 @@
} else {
setCookie('ForceFlash', null);
}
location.reload(true);
//location.reload(true);
});
$('#Protocol').live('click', function () {
if ($('#Protocol').is(':checked')) {
setCookie('Protocol', '1');
} else {
setCookie('Protocol', null);
}
//location.reload(true);
});
$('#SaveTrackPosition').live('click', function () {
if ($('#SaveTrackPosition').is(':checked')) {
@ -1018,7 +1100,7 @@
setCookie('Server', null);
setCookie('ApplicationName', null);
setCookie('HideAZ', null);
location.reload(true);
//location.reload(true);
});
$('#ChangeLogShowMore').live('click', function () {
$('ul#ChangeLog li.log').each(function (i, el) {

View file

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "MiniSub",
"description": "MiniSub - HTML5 Mini Player for Subsonic",
"version": "2.3.5",
"version": "2.3.6",
"app": {
"launch": {
"local_path": "index.html"

View file

@ -309,6 +309,10 @@ fieldset
{
border: 1px solid #1d1d1d;
}
label
{
color: #D6D469;
}
#donate {
background: #232323;
border: 1px solid #1D1D1D;

View file

@ -15,7 +15,7 @@ img
h3.title
{
font-weight: bold;
font-size: 14px;
font-size: 16px;
font-variant: small-caps;
padding: 0;
margin: 5px 0;
@ -48,6 +48,7 @@ span.apiversion
.even { background: #f4f4f4; }
*/
.red { color: #E64F4C; }
.codesyntax { font-family: "Courier New"; }
.italic { font-style: italic; }
.beer { font-size: 17px; }
@ -1365,6 +1366,7 @@ select#MusicFolders
label
{
font-size: 12px;
font-weight: bold;
margin: 0 5px;
}
.inputwrap