diff --git a/README b/README
index 86e7816..1dc5b12 100644
--- a/README
+++ b/README
@@ -8,12 +8,13 @@ External Subsonic Music Player
8/25/2011 .006 flexible layout, added buttons to player
9/17/2011 .007 display tweaks for tablet, chat feature added
9/17/2011 .008 pause/play button tweak
-9/30/2011 .009 now playing support, added back button to track list
+9/30/2011 .009 now playing support, added back button to track list, other tweaks
+10/1/2011 .010 fix for subdirectory custom installs
+10/2/2011 .011 added play button from album list
TO DO: (In no particular order...)
- Jukebox Control
- Download Links
-- What Other Are Listening To support
- Ratings
- Chrome App???
- Add notification when trial license has expired
\ No newline at end of file
diff --git a/images/play_gl_6x8.png b/images/play_gl_6x8.png
new file mode 100644
index 0000000..f88955d
Binary files /dev/null and b/images/play_gl_6x8.png differ
diff --git a/index.html b/index.html
index 03aa47f..22d8824 100644
--- a/index.html
+++ b/index.html
@@ -121,6 +121,13 @@
}
lastChecked = this;
});
+ // Albums
+ $('li.album a.play').live('click', function (e) {
+ var albumid = $(this).parent().parent().attr('childid');
+ var artistid = $(this).parent().parent().attr('parentid');
+ getAlbums(albumid, artistid, true);
+ return false;
+ });
// Play Track - Global Click Event
$('ul.songlist li.song').live('dblclick', function (e) {
@@ -292,13 +299,21 @@
$.cookie('username', null);
$.cookie('password', null);
});
+ $('#SaveSubDirectory').live('click', function () {
+ var subdirectory = $('#SubDirectory').val();
+ if (subdirectory != "") {
+ $.cookie('subdirectory', subdirectory, { expires: 365 });
+ location.reload(true);
+ }
+ return false;
+ });
$('#StyleSwitcher').live('change', function () {
var style = $(this).val();
$('link').attr('href', style);
$.cookie('css', style, { expires: 365, path: '/' });
location.reload(true);
});
- }); // End document.ready
+ }); // End document.ready
$(window).load(function () {
// Set Default Height
@@ -369,7 +384,7 @@
-
+ Playlist 
+
+ Playlist
All
None
@@ -416,6 +431,7 @@
$(document).ready(function () {
$('#Username').val($.cookie('username'));
$('#Password').val($.cookie('password'));
+ $('#SubDirectory').val($.cookie('subdirectory'));
});
@@ -428,6 +444,13 @@
Reset
+
+
+
*For custom installations
+
+
Save
+
+
- Keyboard Shortcuts
diff --git a/js/app.js b/js/app.js
index efc9786..c191864 100644
--- a/js/app.js
+++ b/js/app.js
@@ -1,10 +1,14 @@
// Global Variables
var hostURL = location.href;
-var baseURL = location.protocol + '//' + location.host + '/rest';
+var baseURL;
+if ($.cookie('subdirectory')) {
+ baseURL = location.protocol + '//' + location.host + '/' + $.cookie('subdirectory') + '/rest';
+} else {
+ baseURL = location.protocol + '//' + location.host + '/rest';
+}
var username = $.cookie('username');
var password = $.cookie('password');
var auth = makeBaseAuth(username, password);
-
function loadTabContent(tab) {
switch (tab) {
case '#tabLibrary':
@@ -79,7 +83,7 @@ function loadArtists(refresh) {
});
}
}
-function getAlbums(id, albumid) {
+function getAlbums(id, artistid, autoplay) {
$.ajax({
url: baseURL + '/getMusicDirectory.view?v=1.6.0&c=subweb&f=json&id=' + id,
method: 'GET',
@@ -108,16 +112,17 @@ function getAlbums(id, albumid) {
}
if (child.isDir == true) {
- albumhtml = '- ';
+ albumhtml = '
- ';
+ albumhtml += '';
albumhtml += '';
- albumhtml += '' + child.title + '';
+ albumhtml += '' + child.title + '';
albumhtml += '
';
$(albumhtml).appendTo("#AlbumContainer");
} else {
var track;
if (child.track === undefined) { track = " "; } else { track = child.track; }
if (i == 0) {
- var backhtml = '- « Back
';
+ var backhtml = '- « Back
';
$(backhtml).appendTo("#AlbumContainer");
}
var time = secondsToTime(child.duration);
@@ -130,6 +135,12 @@ function getAlbums(id, albumid) {
$(albumhtml).appendTo("#AlbumContainer");
}
});
+ if (autoplay) {
+ var firstsong = $('ul.songlist li.song:first');
+ var songid = $(firstsong).attr('childid');
+ var albumid = $(firstsong).attr('parentid');
+ playSong('', firstsong, songid, albumid);
+ }
}
}
});
diff --git a/style/Style.css b/style/Style.css
index 37acdc8..80c9f77 100644
--- a/style/Style.css
+++ b/style/Style.css
@@ -124,6 +124,11 @@ img
{
margin: 5px 10px;
}
+.subsection small
+{
+ font-size: 10px;
+ margin: 0 5px;
+}
.indexlist
{
float: right;
@@ -223,10 +228,10 @@ ul.songlist li.album
height: 50px;
border-bottom: 1px solid #f0f0f0;
}
-ul.songlist li.album a
+ul.songlist li.album a.title
{
display: block;
- padding: 16px 60px;
+ padding: 16px 90px;
}
ul.songlist .albumart
{
@@ -235,6 +240,22 @@ ul.songlist .albumart
overflow: hidden;
float: left;
}
+ul.songlist .albumplay
+{
+ float: left;
+}
+ul.songlist li.album a.play
+{
+ width: 20px;
+ height: 50px;
+ display: block;
+ margin: 0 5px 0 0;
+ background: url('../images/play_gl_6x8.png') no-repeat 6px center;
+}
+ul.songlist li.album a.play:hover
+{
+ background: url('../images/play_6x8.png') no-repeat 6px center #DEECFB;
+}
ul.songlist li.song
{
font-size: 13px;
@@ -334,16 +355,16 @@ ul.songlist li.selected
{
margin: 0 0 5px 0;
}
-#ChatMsgs .msg span.msg
+#ChatMsgs span.msg
{
font-size: 12px;
}
-#ChatMsgs .msg span.user
+#ChatMsgs span.user
{
font-size: 10px;
color: #B3B8BE;
}
-#ChatMsgs .msg span.time
+#ChatMsgs span.time
{
font-size: 9px;
color: #CAD0D7;