2.3.7 horizontal nav, media keys

This commit is contained in:
Trevor Squillario 2012-12-21 00:42:39 -05:00
parent 53ed1bc0d4
commit 77831e1ef6
17 changed files with 1914 additions and 1553 deletions

View file

@ -10,7 +10,7 @@ https://github.com/tsquillario/MiniSub/issues
Features Features
* HTML5 Audio with Flash fallback (provided by the SoundManager2 library) * HTML5 Audio with Flash fallback (provided by the SoundManager2 library)
* Flexible Layout (will scale to whatever size your browser window is) * Flexible Layout (will scale to whatever size your browser window is)
* Keyboard shortcuts (back, forward, play/pause, skip to artist) * Keyboard shortcuts (back, forward, play/pause, skip to artist, media keys)
* Playlist support (create new, add to existing, delete) * Playlist support (create new, add to existing, delete)
* Podcast support (includes description field on hover) * Podcast support (includes description field on hover)
* Favorite/Starred support for Albums & Songs * Favorite/Starred support for Albums & Songs

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

View file

@ -24,6 +24,7 @@
<script src="js/plugins/jquery.scrollTo-1.4.2-min.js" type="text/javascript"></script> <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/jplayer/jquery.jplayer.min.js" type="text/javascript"></script>
<script src="js/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script> <script src="js/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>
<script src="js/plugins/UnityShim.js" type="text/javascript"></script>
<script src="js/libs/utils.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/app.js" type="text/javascript"></script>
<script src="js/libs/api.js" type="text/javascript"></script> <script src="js/libs/api.js" type="text/javascript"></script>
@ -45,26 +46,11 @@
<li><a href="#tabPlaylists" id="action_tabPlaylists" title="Playlists"><img src="images/list_gd_16x14.png" /></a></li> <li><a href="#tabPlaylists" id="action_tabPlaylists" title="Playlists"><img src="images/list_gd_16x14.png" /></a></li>
<li><a href="#tabPodcasts" id="action_tabPodcasts" title="Podcasts"><img src="images/rss_16x16.png" /></a></li> <li><a href="#tabPodcasts" id="action_tabPodcasts" title="Podcasts"><img src="images/rss_16x16.png" /></a></li>
<!--<li><a href="#tabVideos" id="action_tabVideos" title="Videos"><img src="images/movie_gd_16x16.png" /></a></li>--> <!--<li><a href="#tabVideos" id="action_tabVideos" title="Videos"><img src="images/movie_gd_16x16.png" /></a></li>-->
<li><a href="#tabPreferences" id="action_tabPreferences" class="last" title="Preferences"><img src="images/cog_16x16.png" /></a></li> <li><a href="#tabSettings" id="action_tabSettings" class="last" title="Settings"><img src="images/cog_16x16.png" /></a></li>
</ul> </ul>
<div id="toploading"></div> <div id="toploading"></div>
</div> </div>
<div id="content"> <div id="search">
<div id="tabLibrary" class="tabcontent">
<div class="actions floatleft">
<a href="#" class="button" id="action_RefreshArtists" title="Refresh Artist List"><img class="pad" src="images/reload_9x11.png" /></a>
<a href="#" class="button" id="action_DecreaseWidth" title="Decrease Width"><img src="images/minus_8x2.png" /></a>
<a href="#" class="button" id="action_IncreaseWidth" title="Increase Width"><img src="images/plus_8x8.png" /></a>
</div>
<div class="subactions floatleft">
<div id="songActions">
<a href="#" class="button disabled" id="action_SelectAll" title="Select All">All</a>
<a href="#" class="button disabled" id="action_SelectNone" title="Select None">None</a>
<a href="#" class="button disabled" id="action_AddToQueue" title="Add To Play Queue">+ Queue</a>
<a href="#" class="button disabled" id="action_AddToPlaylist" title="Add Selected To Playlist">+ Playlist</a>
<div id="submenu_AddToPlaylist" class="submenu shadow" style="display: none;"></div>
<a href="#" class="button disabled" id="action_PlayAlbum" title="Play Album"><img src="images/play_gl_6x8.png" /></a>
</div>
<input type="text" id="Search" class="medium" title="Wildcards (*) supported"/> <input type="text" id="Search" class="medium" title="Wildcards (*) supported"/>
<select id="SearchType" name="SearchType"> <select id="SearchType" name="SearchType">
<option value="song">Song</option> <option value="song">Song</option>
@ -72,7 +58,24 @@
</select> </select>
<a href="#" class="button" id="action_Search" title="Search"><img class="pad" src="images/magnifying_glass_alt_12x12.png" /></a> <a href="#" class="button" id="action_Search" title="Search"><img class="pad" src="images/magnifying_glass_alt_12x12.png" /></a>
</div> </div>
<div id="Albums" class="section lgsection floatleft"> <div id="content">
<div id="tabLibrary" class="tabcontent">
<div class="actions floatleft">
<a href="#" class="button" id="action_RefreshArtists" title="Refresh Artist List"><img class="pad" src="images/reload_9x11.png" /></a>
<a href="#" class="button" id="action_RescanLibrary" title="Rescan Library"><img class="pad" src="images/loop_alt1_gd_12x9.png" /></a>
<a href="#" class="button" id="action_DecreaseWidth" title="Decrease Width"><img src="images/minus_8x2.png" /></a>
<a href="#" class="button" id="action_IncreaseWidth" title="Increase Width"><img src="images/plus_8x8.png" /></a>
</div>
<div class="subactions floatleft">
<a href="#" class="button disabled" id="action_SelectAll" title="Select All">All</a>
<a href="#" class="button disabled" id="action_SelectNone" title="Select None">None</a>
<a href="#" class="button disabled" id="action_AddToQueue" title="Add To Play Queue">+ Queue</a>
<a href="#" class="button disabled" id="action_AddToPlaylist" title="Add Selected To Playlist">+ Playlist</a>
<div id="submenu_AddToPlaylist" class="submenu shadow" style="display: none;"></div>
<a href="#" class="button disabled" id="action_PlayAlbum" title="Play Album"><img src="images/play_gl_6x8.png" /></a>
</div>
<div class="clear"></div>
<div id="Albums" class="section lgsection">
<div class="loading"></div> <div class="loading"></div>
<div id="Artists" class="smsection floatleft" tabindex="0"> <div id="Artists" class="smsection floatleft" tabindex="0">
<div class="padder"> <div class="padder">
@ -92,34 +95,37 @@
</div> </div>
<div id="BottomContainer"><ul id="BottomIndex"></ul></div> <div id="BottomContainer"><ul id="BottomIndex"></ul></div>
</div> </div>
<div class="tablecontainer">
<div id="BreadCrumbContainer"><div id="BreadCrumb"><a href="#" id="BreadHome"><img src="images/home_gl_12x12.png" /></a><div id="BreadCrumbs" class="floatleft"></div></div></div> <div id="BreadCrumbContainer"><div id="BreadCrumb"><a href="#" id="BreadHome"><img src="images/home_gl_12x12.png" /></a><div id="BreadCrumbs" class="floatleft"></div></div></div>
<table id="AlbumContainer" class="simplelist songlist noselect" cellspacing="1"> <table id="AlbumContainer" class="simplelist songlist noselect" cellspacing="1">
<thead></thead> <thead></thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
</div> </div>
</div>
<div id="status_Library" class="status alignleft" data-type="" data-offset=""><img src="images/arrow_left_gl_8x8.png" /> <a id="action_PreviousAlbumList" class="previous" href="#">Previous</a> | <a id="action_NextAlbumList" class="next" href="#">Next</a> <img src="images/arrow_right_gl_8x8.png" /></div> <div id="status_Library" class="status alignleft" data-type="" data-offset=""><img src="images/arrow_left_gl_8x8.png" /> <a id="action_PreviousAlbumList" class="previous" href="#">Previous</a> | <a id="action_NextAlbumList" class="next" href="#">Next</a> <img src="images/arrow_right_gl_8x8.png" /></div>
<div class="clear"></div>
</div> </div>
<div id="tabQueue" class="tabcontent"> <div id="tabQueue" class="tabcontent">
<div class="actions floatleft"> <div class="actions floatleft">
<a href="#" class="button" id="action_Shuffle" title="Shuffle"><img src="images/fork_11x12.png" /></a> <a href="#" class="button disabled" id="action_Shuffle" title="Shuffle"><img src="images/fork_11x12.png" /></a>
<a href="#" class="button" id="action_Empty" title="Remove All">Empty</a>
</div>
<div class="subactions floatleft">
<div id="currentActions">
<a href="#" class="button disabled" id="action_CurrentSelectAll" title="Select All">All</a> <a href="#" class="button disabled" id="action_CurrentSelectAll" title="Select All">All</a>
<a href="#" class="button disabled" id="action_CurrentSelectNone" title="Select None">None</a> <a href="#" class="button disabled" id="action_CurrentSelectNone" title="Select None">None</a>
<a href="#" class="button disabled" id="action_CurrentRemoveSongs" title="Remove selected song(s) from Play Queue">Remove Song(s)</a>
<a href="#" class="button disabled" id="action_Empty" title="Remove All">Empty</a>
<a href="#" class="button disabled" id="action_AddCurrentToPlaylist" title="Add Selected To Playlist">+ Playlist</a> <a href="#" class="button disabled" id="action_AddCurrentToPlaylist" title="Add Selected To Playlist">+ Playlist</a>
<div id="submenu_AddCurrentToPlaylist" class="submenu shadow" style="display: none;"></div> <div id="submenu_AddCurrentToPlaylist" class="submenu shadow" style="display: none;"></div> |
<a href="#" class="button" id="action_AutoPilot" title="Autopilot"><img class="pad" src="images/steering_wheel_gd_12x12.png" /></a> <a href="#" class="button" id="action_AutoPilot" title="Autopilot"><img class="pad" src="images/steering_wheel_gd_12x12.png" /></a>
</div> <a href="#" class="button" id="action_Preview" title="Turn on Album Preview"><img class="pad" src="images/aperture_gd_12x12.png" /></a>
</div> </div>
<div id="CurrentPlaylist" class="section fullsection floatleft noselect"> <div id="CurrentPlaylist" class="section fullsection floatleft noselect">
<div class="tablecontainerfull">
<table id="CurrentPlaylistContainer" class="simplelist songlist" cellspacing="1"> <table id="CurrentPlaylistContainer" class="simplelist songlist" cellspacing="1">
<thead></thead> <thead></thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
</div> </div>
</div>
<div id="status_Current" class="status">0 song(s), 00:00:00 total time</div> <div id="status_Current" class="status">0 song(s), 00:00:00 total time</div>
</div> </div>
<div id="tabPlaylists" class="tabcontent"> <div id="tabPlaylists" class="tabcontent">
@ -146,11 +152,13 @@
<ul id="PlaylistContainer" class="simplelist mainlist"></ul> <ul id="PlaylistContainer" class="simplelist mainlist"></ul>
</div> </div>
</div> </div>
<div class="tablecontainer">
<table id="TrackContainer" class="simplelist songlist"> <table id="TrackContainer" class="simplelist songlist">
<thead></thead> <thead></thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
</div> </div>
</div>
<div id="status_Playlists" class="status">0 song(s), 00:00:00 total time</div> <div id="status_Playlists" class="status">0 song(s), 00:00:00 total time</div>
</div> </div>
<div id="tabPodcasts" class="tabcontent"> <div id="tabPodcasts" class="tabcontent">
@ -168,11 +176,13 @@
<ul id="ChannelsContainer" class="simplelist mainlist"></ul> <ul id="ChannelsContainer" class="simplelist mainlist"></ul>
</div> </div>
</div> </div>
<div class="tablecontainer">
<table id="PodcastContainer" class="simplelist songlist"> <table id="PodcastContainer" class="simplelist songlist">
<thead></thead> <thead></thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
</div> </div>
</div>
<div id="status_Podcasts" class="status">0 song(s), 00:00:00 total time</div> <div id="status_Podcasts" class="status">0 song(s), 00:00:00 total time</div>
</div> </div>
<div id="tabVideos" class="tabcontent"> <div id="tabVideos" class="tabcontent">
@ -182,21 +192,20 @@
<div class="subactions floatleft"><span class="alert">***Opens new window to the video URL...</span> <div class="subactions floatleft"><span class="alert">***Opens new window to the video URL...</span>
</div> </div>
<div id="Videos" class="section fullsection floatleft noselect"> <div id="Videos" class="section fullsection floatleft noselect">
<div class="tablecontainer">
<table id="VideosContainer" class="simplelist songlist" cellspacing="1"> <table id="VideosContainer" class="simplelist songlist" cellspacing="1">
<thead></thead> <thead></thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
</div>
<div id="videodeck"></div> <div id="videodeck"></div>
<div id="videooverlay" class="darkoverlay"></div> <div id="videooverlay" class="darkoverlay"></div>
</div> </div>
</div> </div>
<div id="tabPreferences" class="tabcontent"> <div id="tabSettings" class="tabcontent">
<div class="actions floatleft">
<a href="#" class="button" id="ResetPreferences" title="Reset Preferences">Reset</a>
<a href="#" class="button" id="SavePreferences" title="Save Preferences">Save</a>
</div>
<div class="clear"></div>
<div class="section lgsection floatleft"> <div class="section lgsection floatleft">
<div class="tablecontainerfull">
<div class="form">
<div class="subsection floatleft"> <div class="subsection floatleft">
<h3 class="title">Login</h3> <h3 class="title">Login</h3>
<label for="Username">Username <span class="red">*</span></label><br /> <label for="Username">Username <span class="red">*</span></label><br />
@ -207,24 +216,21 @@
<input type="text" id="Server" name="Server" class="xlarge" title="Subsonic Server URL Ex: http://host:port/subsonic"/><br /> <input type="text" id="Server" name="Server" class="xlarge" title="Subsonic Server URL Ex: http://host:port/subsonic"/><br />
<!--<a href="#" class="button" id="action_RequestURL" title="Request Permission for Server URL">Enable URL</a><br />--> <!--<a href="#" class="button" id="action_RequestURL" title="Request Permission for Server URL">Enable URL</a><br />-->
<label for="SubsonicVersion">Subsonic API: <span class="apiversion" id="SubsonicVersion"></span></label><br /> <label for="SubsonicVersion">Subsonic API: <span class="apiversion" id="SubsonicVersion"></span></label><br />
<label for="SMStats">Audio State: <span id="SMStats"></span></label><br /> <label for="SMStats">Audio State: <span id="SMStats"></span></label><br /><br />
<div id="donate" class="subsection floatleft">
<h3 class="title">Buy me a <span class="beer">beer</span>! I'd like that :)</h3>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="VMTENRSJWQ234">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<small>*This is a donation to <a href="https://twitter.com/tsquillario" target="_blank">tsquillario</a>, the developer of <a href="https://github.com/tsquillario/MiniSub" target="_blank">MiniSub</a>.
<br />Not related to a Subsonic License!</small>
</div> </div>
<div class="subsection floatleft">
<h3 class="title">Keyboard Shortcuts</h3>
<ul class="preferences">
<li><em>[a-z]</em> Use to Quickly Browse to an Artist</li>
<li><em>Home</em> Scroll to Top of Artist List</li>
<li><em>Spacebar</em> Play/Pause</li>
<li><em>&rarr;</em> Next Track</li>
<li><em>&larr;</em> Previous Track</li>
<li><em>-/_</em> Volume Down <em>=/+</em> Volume Up</li>
<li><span></span></li>
</ul>
</div> </div>
<div class="clear"></div>
<div class="subsection floatleft"> <div class="subsection floatleft">
<h3 class="title">Options</h3> <h3 class="title">Options</h3>
<label class="red">* Refresh (F5) required</label><br />
<label for="Theme">Theme</label><br /> <label for="Theme">Theme</label><br />
<select id="Theme" name="Theme" class="large"> <select id="Theme" name="Theme" class="large">
<option value="default">Default</option> <option value="default">Default</option>
@ -233,11 +239,13 @@
<label for="AutoPlaylists">Genres</label><br /> <label for="AutoPlaylists">Genres</label><br />
<select id="Genres" name="Genres" class="large"></select><br /> <select id="Genres" name="Genres" class="large"></select><br />
<input type="text" id="AutoPlaylists" name="AutoPlaylists" class="large" title="Comma separated list of genres for Auto Playlists"/><br /> <input type="text" id="AutoPlaylists" name="AutoPlaylists" class="large" title="Comma separated list of genres for Auto Playlists"/><br />
<!--<label for="AutoFilter">Filter</label><br />
<input type="text" id="AutoFilter" name="AutoFilter" class="large" title="Comma separated list of albums for the AutoPilot Filter"/><br />-->
<label for="AutoAlbumSize">Auto Album Size (Default 15)</label><br /> <label for="AutoAlbumSize">Auto Album Size (Default 15)</label><br />
<input type="text" id="AutoAlbumSize" name="AutoAlbumSize" class="large" title="Number of Albums to Get on the Music Library tab"/><br /> <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 /> <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 /> <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 /> <input type="text" id="ApplicationName" name="ApplicationName" class="large" title="Custom Player Name"/><br />
</div> </div>
<div class="subsection floatleft"> <div class="subsection floatleft">
@ -260,7 +268,7 @@
<label for="ForceFlash">Force Flash </label> <label for="ForceFlash">Force Flash </label>
<div class="clear"></div> <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> <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> <label for="Protocol">Enable JSONP</label>
</fieldset> </fieldset>
<div class="clear"></div> <div class="clear"></div>
<fieldset> <fieldset>
@ -279,17 +287,25 @@
<label for="SaveTrackPosition">Save Progress</label> <label for="SaveTrackPosition">Save Progress</label>
</fieldset> </fieldset>
</div> </div>
<div class="clear"></div>
</div> </div>
<div id="donate" class="subsection floatleft"> <div class="clear"></div>
<h3 class="title">Buy me a <span class="beer">beer</span>! I'd like that :)</h3> <div class="submitsettings">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank"> <a href="#" class="button" id="ResetSettings" title="Reset Settings">Reset</a>
<input type="hidden" name="cmd" value="_s-xclick"> <a href="#" class="button" id="SaveSettings" title="Save Settings">Save</a>
<input type="hidden" name="hosted_button_id" value="VMTENRSJWQ234"> </div>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> </div>
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> <div class="subsection floatleft">
</form> <h3 class="title">Keyboard Shortcuts</h3>
<small>*This is a donation to <a href="https://twitter.com/tsquillario" target="_blank">tsquillario</a>, the developer of <a href="https://github.com/tsquillario/MiniSub" target="_blank">MiniSub</a>. <ul class="preferences">
<br />Not related to a Subsonic License!</small> <li><em>[a-z]</em> Use to Quickly Browse to an Artist</li>
<li><em>Home</em> Scroll to Top of Artist List</li>
<li><em>Spacebar</em> Play/Pause</li>
<li><em>&rarr;</em> Next Track</li>
<li><em>&larr;</em> Previous Track</li>
<li><em>-/_</em> Volume Down <em>=/+</em> Volume Up</li>
<li><em>Media Keys</em> via <a href="https://chrome.google.com/webstore/detail/swayfm-unified-music-medi/icckhjgjjompfgoiidainoapgjepncej" target="_blank">Sway.fm Unified Music Media Keys</a></li>
</ul>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<div class="subsection floatleft"> <div class="subsection floatleft">
@ -300,7 +316,13 @@
<span class="changes">- </span> <span class="changes">- </span>
</li> </li>
--> -->
<li class="log"><span class="version"> - 2.3.6</span> <li class="log"><span class="version">12/21/2012 - 2.3.7</span>
<span class="changes">- Added support for the <a href="https://chrome.google.com/webstore/detail/swayfm-unified-music-medi/icckhjgjjompfgoiidainoapgjepncej" target="_blank">Sway.fm Unified Music Media Keys</a> Chrome extension</span>
<span class="changes">- Added Artist links</span>
<span class="changes">- Fixed click behavior of song notification popup</span>
<span class="changes">- Search is now displayed globally</span>
</li>
<li class="log"><span class="version">12/6/2012 - 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">- 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> <span class="changes">- Switched back to URL authentication (Including coverArt)</span>
</li> </li>
@ -454,6 +476,7 @@
</ul> </ul>
</div> </div>
</div> </div>
</div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
@ -465,11 +488,14 @@
<div id="Chat"> <div id="Chat">
<div class="header"><img src="images/chat_alt_stroke_12x12.png" /> Chat</div> <div class="header"><img src="images/chat_alt_stroke_12x12.png" /> Chat</div>
<div id="ChatMsgs"></div> <div id="ChatMsgs"></div>
<div class="submit"><img src="images/comment_stroke_gl_12x11.png" /><input type="text" id="ChatMsg" class="chat" title="Hit [Enter] to Post" /></div>
</div> </div>
<div class="submit"><img src="images/comment_stroke_gl_12x11.png" /><input type="text" id="ChatMsg" class="chat" title="Hit [Enter] to Post" /></div>
</div> </div>
<!-- Audio Player --> <!-- Audio Player -->
<div class="clear"></div> <div class="clear"></div>
<div class="clear"></div>
</div><!-- end #content -->
<div id="player"> <div id="player">
<div id="playerleft" class="floatleft"> <div id="playerleft" class="floatleft">
<div class="playeractions floatleft"> <div class="playeractions floatleft">
@ -512,11 +538,10 @@
<div class="error-message"></div> <div class="error-message"></div>
</div> </div>
</div> </div>
<div id="preview"></div>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<div class="clear"></div>
</div><!-- end #content -->
</div><!-- end #container --> </div><!-- end #container -->
</body> </body>
</html> </html>

View file

@ -12,7 +12,9 @@ var passwordenc;
var server; var server;
var smwidth; var smwidth;
var apiVersion = '1.6.0'; var apiVersion = '1.6.0';
var currentVersion = '2.3.6'; var currentVersion = '2.3.7';
var applicationName;
var unity;
// Get URL Querystring Parameters // Get URL Querystring Parameters
var u = getParameterByName('u'); var u = getParameterByName('u');
@ -30,12 +32,16 @@ if (u && p && s) {
} }
if (!getCookie('Server')) { if (!getCookie('Server')) {
setCookie('Server', s, { expires: 365 }); setCookie('Server', s, { expires: 365 });
baseURL = getCookie('Server') + '/rest'; server = getCookie('Server') + '/rest';
baseURL = server;
} }
window.location.href = getPathFromUrl(window.location); window.location.href = getPathFromUrl(window.location);
} }
var applicationName; if (getCookie('Server')) {
server = getCookie('Server') + '/rest';
baseURL = server;
}
if (getCookie('ApplicationName')) { if (getCookie('ApplicationName')) {
applicationName = getCookie('ApplicationName'); applicationName = getCookie('ApplicationName');
} else { } else {
@ -59,4 +65,4 @@ if (getCookie('Protocol')) {
protocol = 'jsonp'; protocol = 'jsonp';
} }
var auth = makeBaseAuth(username, password.substring(4, password.length).hexDecode()); var auth = makeBaseAuth(username, password.substring(4, password.length).hexDecode());
baseParams = 'u=' + username + '&p=' + password + '&f=' + protocol; baseParams = 'u=' + username + '&p=' + password + '&f=' + protocol + '&v=' + apiVersion + '&c=' + applicationName;

View file

@ -1,6 +1,10 @@
function updateBaseParams() {
baseURL = server + '/rest';
baseParams = 'u=' + username + '&p=' + password + '&f=' + protocol + '&v=' + apiVersion + '&c=' + applicationName;
}
function ping() { function ping() {
$.ajax({ $.ajax({
url: baseURL + '/ping.view?' + baseParams + '&v=1.6.0&c=' + applicationName, url: baseURL + '/ping.view?' + baseParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -8,6 +12,7 @@
if (data["subsonic-response"].status == 'ok') { if (data["subsonic-response"].status == 'ok') {
apiVersion = data["subsonic-response"].version; apiVersion = data["subsonic-response"].version;
$('#SubsonicVersion').html(apiVersion); $('#SubsonicVersion').html(apiVersion);
updateBaseParams();
} else { } else {
if (typeof data["subsonic-response"].error != 'undefined') { if (typeof data["subsonic-response"].error != 'undefined') {
alert(data["subsonic-response"].error.message); alert(data["subsonic-response"].error.message);
@ -26,11 +31,11 @@
} }
var url; var url;
if (id == "all") { if (id == "all") {
url = baseURL + '/getIndexes.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName; url = baseURL + '/getIndexes.view?' + baseParams;
} else if (id) { } else if (id) {
url = baseURL + '/getIndexes.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&musicFolderId=' + id; url = baseURL + '/getIndexes.view?' + baseParams + '&musicFolderId=' + id;
} else { } else {
url = baseURL + '/getIndexes.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName; url = baseURL + '/getIndexes.view?' + baseParams;
} }
if (debug) { console.log(url); } if (debug) { console.log(url); }
var content = $('#ArtistContainer').html(); var content = $('#ArtistContainer').html();
@ -139,7 +144,7 @@
} }
function getMusicFolders() { function getMusicFolders() {
$.ajax({ $.ajax({
url: baseURL + '/getMusicFolders.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName, url: baseURL + '/getMusicFolders.view?' + baseParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -184,7 +189,7 @@
$('#AutoPlaylistContainer').empty(); $('#AutoPlaylistContainer').empty();
} }
var content = $('#AutoPlaylistContainer').html(); var content = $('#AutoPlaylistContainer').html();
if (content === "") { if (content == "") {
var genres = getCookie('AutoPlaylists'); var genres = getCookie('AutoPlaylists');
var genresArr = []; var genresArr = [];
if (genres) { if (genres) {
@ -197,6 +202,7 @@
} }
$.each(genresArr, function (i, genre) { $.each(genresArr, function (i, genre) {
genre = genre.trim(); genre = genre.trim();
if (genre != '') {
var html = ""; var html = "";
html += '<li class=\"item\" data-genre=\"' + genre + '\">'; html += '<li class=\"item\" data-genre=\"' + genre + '\">';
html += '<span>' + genre + '</span>'; html += '<span>' + genre + '</span>';
@ -204,12 +210,13 @@
html += '<div class=\"floatright\"><a class=\"add\" href=\"\" data-genre=\"' + genre + '\" title=\"Add To Play Queue\"></a></div>'; html += '<div class=\"floatright\"><a class=\"add\" href=\"\" data-genre=\"' + genre + '\" title=\"Add To Play Queue\"></a></div>';
html += '</li>'; html += '</li>';
$(html).appendTo("#AutoPlaylistContainer"); $(html).appendTo("#AutoPlaylistContainer");
}
}); });
} }
} }
function getAlbums(id, action, appendto) { function getMusicDirectory(id, action, appendto, artistid) {
$.ajax({ $.ajax({
url: baseURL + '/getMusicDirectory.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + id, url: baseURL + '/getMusicDirectory.view?' + baseParams + '&id=' + id,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -233,14 +240,17 @@
} }
var isDir = false; var isDir = false;
var rowcolor; var header, parentid, artist, album;
var header;
$.each(children, function (i, child) { $.each(children, function (i, child) {
var isVideo = false; var isVideo = false;
if (child.isDir == true) { isDir = true; } if (child.isDir == true) { isDir = true; }
if (child.isVideo == true) { isVideo = true; } if (child.isVideo == true) { isVideo = true; }
if (typeof child.parent != 'undefined') { parentid = child.parent; }
if (typeof child.artist != 'undefined') { artist = child.artist; }
if (typeof child.album != 'undefined') { album = child.album; }
//if (typeof child.artistId != 'undefined') { artistid = child.artistId; }
if (!isVideo) { if (!isVideo) {
var html = generateRowHTML(child, appendto); var html = generateRowHTML(child, appendto, artistid);
$(html).appendTo(appendto).hide().fadeIn('fast'); $(html).appendTo(appendto).hide().fadeIn('fast');
} }
}); });
@ -250,11 +260,19 @@
} }
if (appendto == '#AlbumContainer tbody' && isDir == true) { if (appendto == '#AlbumContainer tbody' && isDir == true) {
header = generateAlbumHeaderHTML(); header = generateAlbumHeaderHTML();
$('#songActions a.button').addClass('disabled'); $('#tabLibrary .subactions a.button').addClass('disabled');
$('#BreadCrumbs').html('<a href=\"\" parentid=\"' + parentid + '\">' + artist + '</a>');
} }
if (appendto == '#AlbumContainer tbody' && isDir == false) { if (appendto == '#AlbumContainer tbody' && isDir == false) {
header = generateSongHeaderHTML(); header = generateSongHeaderHTML();
$('#songActions a.button').removeClass('disabled'); $('#tabLibrary .subactions a.button').removeClass('disabled');
var html;
if (typeof artistid == 'undefined' || artistid == '') {
html = '<span>' + artist + '</span> ><a href=\"\" albumid=\"' + parentid + '\">' + album + '</a>'
} else {
html = '<a href=\"\" parentid=\"' + artistid + '\">' + artist + '</a> ><a href=\"\" albumid=\"' + parentid + '\">' + album + '</a>'
}
$('#BreadCrumbs').html(html);
} }
$("#AlbumContainer thead").html(header); $("#AlbumContainer thead").html(header);
if (action == 'autoplay') { if (action == 'autoplay') {
@ -267,7 +285,7 @@
/* Currently not being used */ /* Currently not being used */
function getArtist(id, action, appendto) { function getArtist(id, action, appendto) {
$.ajax({ $.ajax({
url: baseURL + '/getArtist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + id, url: baseURL + '/getArtist.view?' + baseParams + '&id=' + id,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -290,10 +308,11 @@
children[0] = data["subsonic-response"].artist.album; children[0] = data["subsonic-response"].artist.album;
} }
var rowcolor; var header, starred, duration;
var header;
$.each(children, function (i, child) { $.each(children, function (i, child) {
var html = generateRowHTML(child, appendto); if (typeof child.starred != 'undefined') { starred = true; } else { starred = false; }
if (typeof child.duration != 'undefined') { duration = child.duration; } else { duration = ''; }
var html = generateAlbumHTML(child.id, child.artistId, child.coverArt, child.name, child.artist, child.userRating, starred, child.created);
$(html).appendTo(appendto).hide().fadeIn('fast'); $(html).appendTo(appendto).hide().fadeIn('fast');
}); });
toggleAlbumListNextPrev('#status_Library', false, '', ''); toggleAlbumListNextPrev('#status_Library', false, '', '');
@ -302,7 +321,7 @@
} }
if (appendto == '#AlbumContainer tbody') { if (appendto == '#AlbumContainer tbody') {
header = generateAlbumHeaderHTML(); header = generateAlbumHeaderHTML();
$('#songActions a.button').addClass('disabled'); $('#tabLibrary .subactions a.button').addClass('disabled');
} }
$("#AlbumContainer thead").html(header); $("#AlbumContainer thead").html(header);
if (action == 'autoplay') { if (action == 'autoplay') {
@ -320,9 +339,9 @@
size = 15; size = 15;
} }
if (offset > 0) { if (offset > 0) {
url = baseURL + '/getAlbumList.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=' + size + '&type=' + id + '&offset=' + offset url = baseURL + '/getAlbumList.view?' + baseParams + '&size=' + size + '&type=' + id + '&offset=' + offset
} else { } else {
url = baseURL + '/getAlbumList.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=' + size + '&type=' + id url = baseURL + '/getAlbumList.view?' + baseParams + '&size=' + size + '&type=' + id
} }
$.ajax({ $.ajax({
url: url, url: url,
@ -354,7 +373,7 @@
$(albumhtml).appendTo("#AlbumContainer tbody").hide().fadeIn('fast'); $(albumhtml).appendTo("#AlbumContainer tbody").hide().fadeIn('fast');
}); });
$('#BreadCrumbs').empty(); $('#BreadCrumbs').empty();
$('#songActions a.button').addClass('disabled'); $('#tabLibrary .subactions a.button').addClass('disabled');
toggleAlbumListNextPrev('#status_Library', true, id, offset); toggleAlbumListNextPrev('#status_Library', true, id, offset);
} else { } else {
updateMessage('Albums failed to load, no music :(', true); updateMessage('Albums failed to load, no music :(', true);
@ -404,7 +423,7 @@
getStarred(action, appendto, 'song'); getStarred(action, appendto, 'song');
} else { } else {
$.ajax({ $.ajax({
url: baseURL + '/getRandomSongs.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=' + size + genreParams + folderParams, url: baseURL + '/getRandomSongs.view?' + baseParams + '&size=' + size + genreParams + folderParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -433,7 +452,7 @@
if (item.starred !== undefined) { starred = true; } else { starred = false; } if (item.starred !== undefined) { starred = true; } else { starred = false; }
if (item.track === undefined) { track = "&nbsp;"; } else { track = item.track; } if (item.track === undefined) { track = "&nbsp;"; } else { track = item.track; }
if (item.duration !== undefined) { duration = item.duration; } else { duration = ''; } if (item.duration !== undefined) { duration = item.duration; } else { duration = ''; }
html = generateSongHTML(item.id, item.parent, track, item.title, '', item.artist, item.album, item.coverArt, item.userRating, starred, duration); html = generateSongHTML(item.id, item.parent, '', track, item.title, '', item.artist, item.album, item.coverArt, item.userRating, starred, duration);
$(html).appendTo(appendto); $(html).appendTo(appendto);
}); });
if (appendto === '#TrackContainer tbody') { if (appendto === '#TrackContainer tbody') {
@ -462,7 +481,7 @@
size = 25; size = 25;
} }
$.ajax({ $.ajax({
url: baseURL + '/getStarred.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=' + size, url: baseURL + '/getStarred.view?' + baseParams + '&size=' + size,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -546,13 +565,75 @@
} }
}); });
} }
function previewStarredCoverArt() {
$.ajax({
url: baseURL + '/getStarred.view?' + baseParams + '&size=25',
method: 'GET',
dataType: protocol,
timeout: 10000,
success: function (data) {
var coverarts = [];
if (data["subsonic-response"].starred !== undefined) {
var items = [];
if (data["subsonic-response"].starred.album !== undefined) {
if (data["subsonic-response"].starred.album.length > 0) {
items = data["subsonic-response"].starred.album;
} else {
items[0] = data["subsonic-response"].starred.album;
}
}
var html = "";
$.each(items, function (i, item) {
if (typeof item.coverArt !== "undefined") {
var coverSrc = baseURL + '/getCoverArt.view?' + baseParams + '&id=' + item.coverArt;
var title = item.artist + ' - ' + item.album;
html += '<a class=\"fancyboxcoverart\" rel=\"gallery1\" href=\"' + coverSrc + '\" title=\"' + title + '\"><img src=\"' + coverSrc + '\"></a>';
}
});
$('#preview').html(html);
$('#preview a').shuffle();
//var pick = Math.floor(Math.random() * coverarts.length) + 1;
//var href = baseURL + '/getCoverArt.view?' + baseParams + '&id=' + coverarts[pick];
$('a.fancyboxcoverart').fancybox({
autoPlay: true,
playSpeed: 10000,
preload: 5,
hideOnContentClick: true,
type: 'image',
openEffect: 'none',
closeEffect: 'none',
openSpeed: 'normal',
closeSpeed: 'slow',
afterLoad: function () {
$('div.fancybox-inner').click(function () {
//alert("test");
});
}
}).trigger('click');
//setInterval($('#preview a').fancybox.next(), 2000);
}
}
});
}
function previewCurrentCoverArt() {
var href = $('#coverartimage').attr('href');
var title = $('#songdetails_artist').html();
$("a#preview").fancybox({
hideOnContentClick: true,
type: 'image',
openEffect: 'none',
closeEffect: 'none',
href: href,
title: title
}).trigger('click');
}
var updaterNowPlaying; var updaterNowPlaying;
var updaterNowPlayingIdList = []; var updaterNowPlayingIdList = [];
function updateNowPlaying(showPopup) { function updateNowPlaying(showPopup) {
updaterNowPlaying = $.periodic({ period: 4000, decay: 1.5, max_period: 30000 }, function () { updaterNowPlaying = $.periodic({ period: 4000, decay: 1.5, max_period: 30000 }, function () {
$.ajax({ $.ajax({
periodic: this, periodic: this,
url: baseURL + '/getNowPlaying.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName, url: baseURL + '/getNowPlaying.view?' + baseParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -589,7 +670,7 @@
if (msg.coverArt === undefined) { if (msg.coverArt === undefined) {
coverartSrc = 'images/albumdefault_50.jpg'; coverartSrc = 'images/albumdefault_50.jpg';
} else { } else {
coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=50&id=' + msg.coverArt; coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&size=50&id=' + msg.coverArt;
} }
if (getCookie('Notification_NowPlaying')) { if (getCookie('Notification_NowPlaying')) {
var sid = msg.username + '-' + msg.id; var sid = msg.username + '-' + msg.id;
@ -610,7 +691,7 @@
function search(type, query) { function search(type, query) {
$.ajax({ $.ajax({
url: baseURL + '/search2.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&query=' + query, url: baseURL + '/search2.view?' + baseParams + '&query=' + query,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -643,24 +724,42 @@
} }
$.each(children, function (i, child) { $.each(children, function (i, child) {
var starred; var starred;
if (child.starred !== undefined) { starred = true; } else { starred = false; } if (typeof child.starred != 'undefined') { starred = true; } else { starred = false; }
isDir = child.isDir; isDir = child.isDir;
if (isDir === true) { if (isDir == true) {
albumhtml = generateAlbumHTML(child.id, child.parent, child.coverArt, child.title, child.artist, child.userRating, starred, child.created); albumhtml = generateAlbumHTML(child.id, child.parent, child.coverArt, child.title, child.artist, child.userRating, starred, child.created);
} else { } else {
var track, starred, duration; var track, starred, duration;
if (child.starred !== undefined) { starred = true; } else { starred = false; } if (child.starred !== undefined) { starred = true; } else { starred = false; }
if (child.track === undefined) { track = "&nbsp;"; } else { track = child.track; } if (child.track === undefined) { track = "&nbsp;"; } else { track = child.track; }
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; } if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
albumhtml = generateSongHTML(child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, duration); albumhtml = generateSongHTML(child.id, child.parent, '', track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, duration);
} }
$('#tabLibrary .subactions a.button').removeClass('disabled');
$(albumhtml).appendTo("#AlbumContainer tbody"); $(albumhtml).appendTo("#AlbumContainer tbody");
$('#action_tabLibrary').click();
}); });
} }
} }
}); });
} }
function rescanLibrary() {
$.ajax({
url: baseURL + '/getUser.view?' + baseParams + '&username=' + getCookie('username'),
method: 'GET',
dataType: protocol,
timeout: 10000,
success: function (data) {
if (data["subsonic-response"].user.adminRole == true) {
$.get(getCookie('Server') + '/musicFolderSettings.view?scanNow');
} else {
alert('You are not logged in as an admin user!');
}
}
});
}
function loadFolders(refresh) { function loadFolders(refresh) {
if (debug) { console.log("LOAD FOLDERS"); } if (debug) { console.log("LOAD FOLDERS"); }
if (refresh) { if (refresh) {
@ -670,7 +769,7 @@
if (content === "") { if (content === "") {
// Load Folders // Load Folders
$.ajax({ $.ajax({
url: baseURL + '/getMusicFolders.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName, url: baseURL + '/getMusicFolders.view?' + baseParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -703,7 +802,7 @@
if (content === "") { if (content === "") {
// Load Playlists // Load Playlists
$.ajax({ $.ajax({
url: baseURL + '/getPlaylists.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName, url: baseURL + '/getPlaylists.view?' + baseParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -744,7 +843,7 @@
url: baseURL + '/createPlaylist.view?' + baseParams, url: baseURL + '/createPlaylist.view?' + baseParams,
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
data: { v: apiVersion, c: applicationName, playlistId: playlistid, songId: songs }, data: { playlistId: playlistid, songId: songs },
success: function () { success: function () {
getPlaylist(playlistid); getPlaylist(playlistid);
updateMessage('Playlist Updated!', true); updateMessage('Playlist Updated!', true);
@ -755,7 +854,7 @@
} }
function getPlaylist(id, action, appendto) { function getPlaylist(id, action, appendto) {
$.ajax({ $.ajax({
url: baseURL + '/getPlaylist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + id, url: baseURL + '/getPlaylist.view?' + baseParams + '&id=' + id,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -785,7 +884,7 @@
if (child.starred !== undefined) { starred = true; } else { starred = false; } if (child.starred !== undefined) { starred = true; } else { starred = false; }
if (child.track === undefined) { track = "&nbsp;"; } else { track = child.track; } if (child.track === undefined) { track = "&nbsp;"; } else { track = child.track; }
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; } if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
html = generateSongHTML(child.id, child.parent, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, duration); html = generateSongHTML(child.id, child.parent, child.artistId, track, child.title, '', child.artist, child.album, child.coverArt, child.userRating, starred, duration);
$(html).appendTo(appendto); $(html).appendTo(appendto);
}); });
if (appendto === '#TrackContainer tbody') { if (appendto === '#TrackContainer tbody') {
@ -809,7 +908,7 @@
function loadPlaylistsForMenu(menu) { function loadPlaylistsForMenu(menu) {
$('#' + menu).empty(); $('#' + menu).empty();
$.ajax({ $.ajax({
url: baseURL + '/getPlaylists.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName, url: baseURL + '/getPlaylists.view?' + baseParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -833,7 +932,7 @@
var reply = prompt("Choose a name for your new playlist.", ""); var reply = prompt("Choose a name for your new playlist.", "");
if (reply != 'null' && reply != null && reply != '') { if (reply != 'null' && reply != null && reply != '') {
$.ajax({ $.ajax({
url: baseURL + '/createPlaylist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&name=' + reply, url: baseURL + '/createPlaylist.view?' + baseParams + '&name=' + reply,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -845,7 +944,7 @@
} }
function deletePlaylist(id) { function deletePlaylist(id) {
$.ajax({ $.ajax({
url: baseURL + '/deletePlaylist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + id, url: baseURL + '/deletePlaylist.view?' + baseParams + '&id=' + id,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -871,7 +970,7 @@
// Get songs from playlist // Get songs from playlist
var currentsongs = []; var currentsongs = [];
$.ajax({ $.ajax({
url: baseURL + '/getPlaylist.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + playlistid, url: baseURL + '/getPlaylist.view?' + baseParams + '&id=' + playlistid,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -904,7 +1003,7 @@
url: baseURL + '/updatePlaylist.view?' + baseParams, url: baseURL + '/updatePlaylist.view?' + baseParams,
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
data: { v: apiVersion, c: applicationName, playlistId: playlistid, songIdToAdd: selected }, data: { playlistId: playlistid, songIdToAdd: selected },
success: function (data) { success: function (data) {
// Add logic to show an error if the playlist update fails // Add logic to show an error if the playlist update fails
// if (data["subsonic-response"].playlist.entry !== undefined) { // if (data["subsonic-response"].playlist.entry !== undefined) {
@ -921,7 +1020,7 @@
url: baseURL + '/createPlaylist.view?' + baseParams, url: baseURL + '/createPlaylist.view?' + baseParams,
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
data: { v: apiVersion, c: applicationName, playlistId: playlistid, songId: currentsongs }, data: { playlistId: playlistid, songId: currentsongs },
success: function () { success: function () {
$('table.songlist tr.song').each(function () { $('table.songlist tr.song').each(function () {
$(this).removeClass('selected'); $(this).removeClass('selected');
@ -942,7 +1041,7 @@
url: baseURL + '/createPlaylist.view?' + baseParams, url: baseURL + '/createPlaylist.view?' + baseParams,
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
data: { v: apiVersion, c: applicationName, name: "" + reply + "", songId: selected }, data: { name: "" + reply + "", songId: selected },
success: function () { success: function () {
$('table.songlist tr.song').each(function () { $('table.songlist tr.song').each(function () {
$(this).removeClass('selected'); $(this).removeClass('selected');
@ -978,7 +1077,7 @@
} }
} }
function countCurrentPlaylist(container) { function countCurrentPlaylist(container) {
var total = $(container + ' tr.song').size(); var total = $(container + ' tbody tr.song').size();
if (total > 0) { if (total > 0) {
var time = 0; var time = 0;
$(container + ' tr.song').each(function (index) { $(container + ' tr.song').each(function (index) {
@ -1030,6 +1129,41 @@
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); } if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
} }
} }
function saveAutoFilter() {
if (browserStorageCheck) {
var item = localStorage.getItem('AutoFilter');
try {
localStorage.setItem('AutoFilter', item);
if (debug) { console.log('Saving Auto Filter: ' + item); }
} catch (e) {
if (e == QUOTA_EXCEEDED_ERR) {
alert('Quota exceeded!');
}
}
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
}
}
function deleteAutoFilter() {
if (browserStorageCheck) {
localStorage.removeItem('AutoFilter');
if (debug) { console.log('Removing Auto Filter'); }
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
}
}
function loadAutoFilter() {
if (browserStorageCheck) {
var item = localStorage.getItem('AutoFilter');
if (item != '' && item !== undefined && item !== null) {
var el = '#AutoFilter';
$(el).val(item);
if (debug) { console.log('Load Play Queue From localStorage: ' + item); }
}
} else {
if (debug) { console.log('HTML5::loadStorage not supported on your browser' + html.length + ' characters'); }
}
}
function saveTrackPosition() { function saveTrackPosition() {
var el = $('#songdetails_song'); var el = $('#songdetails_song');
var songid = el.attr('childid'); var songid = el.attr('childid');
@ -1058,7 +1192,7 @@
reqDownload = 'playlistUtf8Hex=' + id; reqDownload = 'playlistUtf8Hex=' + id;
} }
if (reqDownload) { if (reqDownload) {
url = baseURL + '/download.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&' + reqDownload; url = baseURL + '/download.view?' + baseParams + '&' + reqDownload;
window.location = url; window.location = url;
} }
} }
@ -1073,7 +1207,7 @@
if (content === "") { if (content === "") {
// Load Podcasts // Load Podcasts
$.ajax({ $.ajax({
url: baseURL + '/getPodcasts.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName, url: baseURL + '/getPodcasts.view?' + baseParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -1107,7 +1241,7 @@
} }
function getPodcast(id, action, appendto) { function getPodcast(id, action, appendto) {
$.ajax({ $.ajax({
url: baseURL + '/getPodcasts.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName, url: baseURL + '/getPodcasts.view?' + baseParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -1150,7 +1284,7 @@
if (child.starred !== undefined) { starred = true; } else { starred = false; } if (child.starred !== undefined) { starred = true; } else { starred = false; }
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; } if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; }
if (child.publishDate !== undefined) { publishdate = child.publishDate.substring(0, child.publishDate.indexOf(" ")); } else { publishdate = ''; } if (child.publishDate !== undefined) { publishdate = child.publishDate.substring(0, child.publishDate.indexOf(" ")); } else { publishdate = ''; }
html = generateSongHTML(child.streamId, child.parent, publishdate, child.title, description, child.artist, child.album, child.coverArt, child.userRating, starred, duration); html = generateSongHTML(child.streamId, child.parent, '', publishdate, child.title, description, child.artist, child.album, child.coverArt, child.userRating, starred, duration);
$(html).appendTo(appendto); $(html).appendTo(appendto);
count++; count++;
}); });
@ -1180,7 +1314,7 @@
if (content == "") { if (content == "") {
// Load Videos // Load Videos
$.ajax({ $.ajax({
url: baseURL + '/getVideos.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName, url: baseURL + '/getVideos.view?' + baseParams,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -1200,7 +1334,7 @@
} else { } else {
rowcolor = 'odd'; rowcolor = 'odd';
} }
var videoURL = baseURL + '/stream.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + video.id; var videoURL = baseURL + '/stream.view?' + baseParams + '&id=' + video.id;
html = '<tr class=\"row video\" childid=\"' + video.id + '\" parentid=\"' + video.parent + '\" bitrate=\"' + video.bitRate + '\" userrating=\"\">'; html = '<tr class=\"row video\" childid=\"' + video.id + '\" parentid=\"' + video.parent + '\" bitrate=\"' + video.bitRate + '\" userrating=\"\">';
html += '<td class=\"itemactions\">'; html += '<td class=\"itemactions\">';
//html += '<a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>'; //html += '<a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>';
@ -1215,7 +1349,7 @@
if (video.coverArt === undefined) { if (video.coverArt === undefined) {
coverartSrc = 'images/albumdefault_25.jpg'; coverartSrc = 'images/albumdefault_25.jpg';
} else { } else {
coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=25&id=' + video.coverArt; coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&size=25&id=' + video.coverArt;
} }
var time = secondsToTime(video.duration); var time = secondsToTime(video.duration);
html += '<td class=\"album\"><img src=\"' + coverartSrc + '\" />' + video.album + '</td>'; html += '<td class=\"album\"><img src=\"' + coverartSrc + '\" />' + video.album + '</td>';

View file

@ -4,7 +4,7 @@ function updateChatMessages() {
updater = $.periodic({ period: 1000, decay: 1.5, max_period: 1800000 }, function () { updater = $.periodic({ period: 1000, decay: 1.5, max_period: 1800000 }, function () {
$.ajax({ $.ajax({
periodic: this, periodic: this,
url: baseURL + '/getChatMessages.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&since=' + starttime, url: baseURL + '/getChatMessages.view?' + baseParams + '&since=' + starttime,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -52,7 +52,7 @@ function addChatMessage(msg) {
url: baseURL + '/addChatMessage.view?' + baseParams, url: baseURL + '/addChatMessage.view?' + baseParams,
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
data: { v: apiVersion, c: applicationName, message: msg }, data: { message: msg },
success: function () { success: function () {
updater.reset(); updater.reset();
}, },

View file

@ -1,15 +1,16 @@
function generateRowHTML(child, appendto) { function generateRowHTML(child, appendto, artistid) {
var html, isDir, starred, duration, artist, artistId, i; var html, isDir, starred, duration, artistid, artist, i;
isDir = child.isDir; isDir = child.isDir;
if (child.starred !== undefined) { starred = true; } else { starred = false; } if (typeof child.starred != 'undefined') { starred = true; } else { starred = false; }
if (child.duration !== undefined) { duration = child.duration; } else { duration = ''; } if (typeof child.duration != 'undefined') { duration = child.duration; } else { duration = ''; }
if (child.artist !== undefined) { artist = child.artist; } else { artist = ''; } if (typeof child.artist != 'undefined') { artist = child.artist; } else { artist = ''; }
//if (typeof child.artistId != 'undefined') { artistid = child.artistId; } else { artistid = ''; }
if (isDir === true) { if (isDir === true) {
html = generateAlbumHTML(child.id, child.parent, child.coverArt, child.title, artist, child.userRating, starred, child.created); html = generateAlbumHTML(child.id, child.parent, child.coverArt, child.title, artist, child.userRating, starred, child.created);
} else { } else {
var track; var track;
if (child.track === undefined) { track = "&nbsp;"; } else { track = child.track; } if (child.track === undefined) { track = "&nbsp;"; } else { track = child.track; }
html = generateSongHTML(child.id, child.parent, track, child.title, '', artist, child.album, child.coverArt, child.userRating, starred, duration); html = generateSongHTML(child.id, child.parent, artistid, track, child.title, '', artist, child.album, child.coverArt, child.userRating, starred, duration);
} }
return html; return html;
} }
@ -21,7 +22,7 @@ function generateAlbumHeaderHTML() {
function generateAlbumHTML(childid, parentid, coverart, title, artist, rating, starred, created) { function generateAlbumHTML(childid, parentid, coverart, title, artist, rating, starred, created) {
var html; var html;
html = '<tr class=\"album\" childid=\"' + childid + '\" parentid=\"' + parentid + '\" userrating=\"' + rating + '\">'; html = '<tr class=\"album\" childid=\"' + childid + '\" parentid=\"' + parentid + '\" userrating=\"' + rating + '\">';
html += '<td class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>'; html += '<td><div class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>';
html += '<a class=\"play\" href=\"\" title=\"Play\"></a>'; html += '<a class=\"play\" href=\"\" title=\"Play\"></a>';
html += '<a class=\"download\" href=\"\" title=\"Download\"></a>'; html += '<a class=\"download\" href=\"\" title=\"Download\"></a>';
if (starred) { if (starred) {
@ -29,14 +30,14 @@ function generateAlbumHTML(childid, parentid, coverart, title, artist, rating, s
} else { } else {
html += '<a class=\"rate\" href=\"\" title=\"Add To Favorites\"></a>'; html += '<a class=\"rate\" href=\"\" title=\"Add To Favorites\"></a>';
} }
html += '</td>'; html += '</div></td>';
if (coverart == undefined) { if (coverart == undefined) {
html += '<td class=\"albumart\"><img src=\"images/albumdefault_50.jpg\" /></td>'; html += '<td class=\"albumart\"><img src=\"images/albumdefault_50.jpg\" /></td>';
} else { } else {
html += '<td class=\"albumart\"><img src=\"' + baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=50&id=' + coverart + '\" /></td>'; html += '<td class=\"albumart\"><img src=\"' + baseURL + '/getCoverArt.view?' + baseParams + '&size=50&id=' + coverart + '\" /></td>';
} }
html += '<td class=\"album\">' + title + '</td>'; html += '<td class=\"album\">' + title + '</td>';
html += '<td class=\"artist\">' + artist + '</td>'; html += '<td class=\"artist\"><a href=\"#\" >' + artist + '</a></td>';
html += '<td class=\"date\">' + $.format.date(new Date(created), "yyyy-MM-dd h:mm a") + '</td>'; html += '<td class=\"date\">' + $.format.date(new Date(created), "yyyy-MM-dd h:mm a") + '</td>';
html += '</tr>'; html += '</tr>';
return html; return html;
@ -46,7 +47,7 @@ function generateSongHeaderHTML() {
html = '<tr><th></th><th class=\"type-int\">Track</th><th class=\"type-string\">Title</th><th class=\"type-string\">Artist</th><th class=\"type-string\">Album</th><th class=\"alignright\">Time</th></tr>'; html = '<tr><th></th><th class=\"type-int\">Track</th><th class=\"type-string\">Title</th><th class=\"type-string\">Artist</th><th class=\"type-string\">Album</th><th class=\"alignright\">Time</th></tr>';
return html; return html;
} }
function generateSongHTML(childid, parentid, track, title, description, artist, album, coverart, rating, starred, duration) { function generateSongHTML(childid, parentid, artistid, track, title, description, artist, album, coverart, rating, starred, duration) {
var time; var time;
if (duration == '') { if (duration == '') {
time = '00:00' time = '00:00'
@ -54,8 +55,8 @@ function generateSongHTML(childid, parentid, track, title, description, artist,
time = secondsToTime(duration); time = secondsToTime(duration);
} }
var html; var html;
html = '<tr class=\"row song\" id=\"' + childid + '\" childid=\"' + childid + '\" parentid=\"' + parentid + '\" duration=\"' + duration + '\" userrating=\"' + rating + '\">'; html = '<tr class=\"row song\" id=\"' + childid + '\" childid=\"' + childid + '\" parentid=\"' + parentid + '\" artistid=\"' + artistid + '\" duration=\"' + duration + '\" userrating=\"' + rating + '\">';
html += '<td class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>'; html += '<td><div class=\"itemactions\"><a class=\"add\" href=\"\" title=\"Add To Play Queue\"></a>';
html += '<a class=\"remove\" href=\"\" title=\"Remove\"></a>'; html += '<a class=\"remove\" href=\"\" title=\"Remove\"></a>';
html += '<a class=\"play\" href=\"\" title=\"Play\"></a>'; html += '<a class=\"play\" href=\"\" title=\"Play\"></a>';
html += '<a class=\"download\" href=\"\" title=\"Download\"></a>'; html += '<a class=\"download\" href=\"\" title=\"Download\"></a>';
@ -64,7 +65,7 @@ function generateSongHTML(childid, parentid, track, title, description, artist,
} else { } else {
html += '<a class=\"rate\" href=\"\" title=\"Add To Favorites\"></a>'; html += '<a class=\"rate\" href=\"\" title=\"Add To Favorites\"></a>';
} }
html += '</td>'; html += '</div></td>';
html += '<td class=\"track\">' + track + '</td>'; html += '<td class=\"track\">' + track + '</td>';
if (description != '' && description != null) { if (description != '' && description != null) {
html += '<td class=\"title\" title=\"' + toHTML.on(description) + '\">' + title + '</td>'; html += '<td class=\"title\" title=\"' + toHTML.on(description) + '\">' + title + '</td>';
@ -77,7 +78,7 @@ function generateSongHTML(childid, parentid, track, title, description, artist,
if (coverart == undefined) { if (coverart == undefined) {
coverartSrc = 'images/albumdefault_25.jpg'; coverartSrc = 'images/albumdefault_25.jpg';
} else { } else {
coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=25&id=' + coverart; coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&size=25&id=' + coverart;
} }
html += '<td class=\"album\" data-order-by=\"' + album + '\"><a href="#"><img src=\"' + coverartSrc + '\" />' + album + '</a></td>'; html += '<td class=\"album\" data-order-by=\"' + album + '\"><a href="#"><img src=\"' + coverartSrc + '\" />' + album + '</a></td>';
html += '<td class=\"time\">' + time + '</td>'; html += '<td class=\"time\">' + time + '</td>';

View file

@ -1,14 +1,15 @@
var scrobbled = false; var scrobbled = false;
var timerid = 0; var timerid = 0;
var marquee;
function getSongData(el, songid, albumid, position, loadonly) { function getSongData(el, songid, albumid, position, loadonly) {
var runningVersion = parseVersionString(apiVersion); var runningVersion = parseVersionString(apiVersion);
var minimumVersion = parseVersionString('1.8.0'); var minimumVersion = parseVersionString('1.8.0');
if (checkVersion(runningVersion, minimumVersion)) { if (checkVersion(runningVersion, minimumVersion)) {
if (debug) { console.log('apiVersion at or above 1.8.0 using getSong.view'); } if (debug) { console.log('apiVersion at or above 1.8.0 using getSong.view'); }
ajaxUrl = baseURL + '/getSong.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid; ajaxUrl = baseURL + '/getSong.view?' + baseParams + '&id=' + songid;
} else { } else {
if (debug) { console.log('apiVersion below 1.8.0 using getMusicDirectory.view'); } if (debug) { console.log('apiVersion below 1.8.0 using getMusicDirectory.view'); }
ajaxUrl = baseURL + '/getMusicDirectory.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + albumid; // Deprecated: apiVersion 1.8.0 ajaxUrl = baseURL + '/getMusicDirectory.view?' + baseParams + '&id=' + albumid; // Deprecated: apiVersion 1.8.0
} }
if (debug) { console.log(ajaxUrl) } if (debug) { console.log(ajaxUrl) }
$.ajax({ $.ajax({
@ -86,8 +87,8 @@ function playSong(el, songid, albumid, title, artist, album, coverart, rating, s
coverartSrc = 'images/albumdefault_60.jpg'; coverartSrc = 'images/albumdefault_60.jpg';
coverartFullSrc = ''; coverartFullSrc = '';
} else { } else {
coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&size=60&id=' + coverart; coverartSrc = baseURL + '/getCoverArt.view?' + baseParams + '&size=60&id=' + coverart;
coverartFullSrc = baseURL + '/getCoverArt.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + coverart; coverartFullSrc = baseURL + '/getCoverArt.view?' + baseParams + '&id=' + coverart;
} }
$('#coverartimage').attr('href', coverartFullSrc); $('#coverartimage').attr('href', coverartFullSrc);
$('#coverartimage img').attr('src', coverartSrc); $('#coverartimage img').attr('src', coverartSrc);
@ -124,15 +125,25 @@ function playSong(el, songid, albumid, title, artist, album, coverart, rating, s
ready: function () { ready: function () {
if (suffix == 'oga') { if (suffix == 'oga') {
$(this).jPlayer("setMedia", { $(this).jPlayer("setMedia", {
oga: baseURL + '/stream.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt, oga: baseURL + '/stream.view?' + baseParams + '&id=' + songid + '&salt=' + salt,
}); });
} else if (suffix == 'mp3') { } else if (suffix == 'mp3') {
$(this).jPlayer("setMedia", { $(this).jPlayer("setMedia", {
mp3: baseURL + '/stream.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + '&salt=' + salt, mp3: baseURL + '/stream.view?' + baseParams + '&id=' + songid + '&salt=' + salt,
}); });
} }
if (!loadonly) { if (!loadonly) {
$(this).jPlayer("play"); $(this).jPlayer("play");
var playerState = {
playing: true,
title: title,
artist: artist,
favorite: false,
albumArt: coverartFullSrc
}
if (unity) {
unity.sendState(playerState);
}
} else { } else {
$('#' + songid).addClass('playing'); $('#' + songid).addClass('playing');
$(this).jPlayer("pause", position); $(this).jPlayer("pause", position);
@ -241,7 +252,7 @@ function playVideo(id, bitrate) {
function scrobbleSong(submission) { function scrobbleSong(submission) {
var songid = $('#songdetails_song').attr('childid'); var songid = $('#songdetails_song').attr('childid');
$.ajax({ $.ajax({
url: baseURL + '/scrobble.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + "&submission=" + submission, url: baseURL + '/scrobble.view?' + baseParams + '&id=' + songid + "&submission=" + submission,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -254,7 +265,7 @@ function scrobbleSong(submission) {
} }
function rateSong(songid, rating) { function rateSong(songid, rating) {
$.ajax({ $.ajax({
url: baseURL + '/setRating.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + songid + "&rating=" + rating, url: baseURL + '/setRating.view?' + baseParams + '&id=' + songid + "&rating=" + rating,
method: 'GET', method: 'GET',
dataType: protocol, dataType: protocol,
timeout: 10000, timeout: 10000,
@ -267,9 +278,9 @@ function starItem(itemid, starred) {
var url; var url;
if (itemid !== undefined) { if (itemid !== undefined) {
if (starred) { if (starred) {
url = baseURL + '/star.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + itemid; url = baseURL + '/star.view?' + baseParams + '&id=' + itemid;
} else { } else {
url = baseURL + '/unstar.view?' + baseParams + '&v=' + apiVersion + '&c=' + applicationName + '&id=' + itemid; url = baseURL + '/unstar.view?' + baseParams + '&id=' + itemid;
} }
$.ajax({ $.ajax({
url: url, url: url,

View file

@ -238,15 +238,16 @@ var timer = null;
var scrollMsg = ""; var scrollMsg = "";
var pos = 0; var pos = 0;
function scrollTitle(text) { function scrollTitle(text) {
if (scrollMsg === "") { if (scrollMsg == "") {
if (text === "") { if (text == "") {
scrollMsg = document.title; scrollMsg = document.title;
} else { } else {
scrollMsg = text; scrollMsg = text;
} }
} else { } else {
if (text != undefined && text != scrollMsg) { if (typeof text != 'undefined' && text != scrollMsg) {
scrollMsg = text; scrollMsg = text;
pos = 0;
} }
} }
var msg = scrollMsg; var msg = scrollMsg;
@ -261,7 +262,7 @@ function scrollTitle(text) {
if (pos > ml) { if (pos > ml) {
pos = 0; pos = 0;
} else { } else {
//timer = window.setTimeout("scrollTitle()", speed); timer = window.setTimeout("scrollTitle()", speed);
} }
// To stop timer, clearTimeout(timer); // To stop timer, clearTimeout(timer);
} }
@ -287,6 +288,7 @@ function showNotification(pic, title, text, type, bind) {
if (bind = '#NextTrack') { if (bind = '#NextTrack') {
popup.addEventListener('click', function () { popup.addEventListener('click', function () {
$(bind).click(); $(bind).click();
this.cancel();
}) })
} }
notifications.push(popup); notifications.push(popup);

62
js/plugins/UnityShim.js Normal file
View file

@ -0,0 +1,62 @@
/*
* Use this function to create a Unity Music Shim. To use it, simply call setSupports to tell unity
* which features you support, give it a callback for actions as documented below,
* and notify it when your player state changes.
*/
var UnityMusicShim = function() {
var UnityObj = {};
/*
* sendState requires an object with any of the following properties.
* Call this whenever your player state changes.
*
* - playing: Boolean whether or not you are currently playing music
* - title: String the title of the current song
* - artist: String the artist of the current song
* - albumArt: String a URL to the album art of the current song. This must be a publically accessible url
* - favorite: Boolean whether or not the current song is marked as a favorite
* - thumbsUp: Boolean whether or not the current song is marked as thumbs up
* - thumbsDown: Boolean whether or not the current song is marked as thumbs down
*/
UnityObj.sendState = function(state) {
var evt = document.createEvent("CustomEvent");
evt.initEvent("UnityStateEvent", true, true );
document.body.setAttribute('data-unity-state', JSON.stringify(state));
document.body.dispatchEvent(evt, state);
}
document.body.addEventListener('UnityActionEvent', function(e) {
var action = JSON.parse(document.body.getAttribute('data-unity-action'));
if (UnityObj._callbackObject) UnityObj._callbackObject[action]();
});
/*
* addCallbackObject requires an object with functions mapping to any features you support.
* - playpause: Toggle the paused state of your player.
* - next: Skip to the next song.
* - previous: Skip to the previous song.
* - thumbsUp: Mark (or unmark) this song as thumbs up.
* - thumbsDown: Mark (or unmark) this song as thumbs up.
* - favorite: Mark (or unmark) this song as a favorite.
*/
UnityObj.setCallbackObject = function(cbObj) {
UnityObj._callbackObject = cbObj;
};
/*
* setSupports requires an object with any of the following features that your player supports.
* Pass true for anything you support, and omit any you don't.
*
* - playpause: Whether you support pausing the song. You must support this to use Unity
* - next: Whether you support skipping the current song.
* - previous: Whether you support going back to a previous song.
* - thumbsUp: Whether you support giving a song a thumbs up.
* - thumbsDown: Whether you support giving a song a thumbs down.
* - favorite: Whether you support marking song as a favorite.
*/
UnityObj.setSupports = function(supports) {
var evt = document.createEvent("CustomEvent");
evt.initEvent("UnitySupportsEvent", true, true );
document.body.setAttribute('data-unity-supports', JSON.stringify(supports));
document.body.dispatchEvent(evt, supports);
}
return UnityObj;
};

View file

@ -27,6 +27,8 @@
var currentSong = JSON.parse(getCookie("CurrentSong")); var currentSong = JSON.parse(getCookie("CurrentSong"));
getSongData(null, currentSong.songid, currentSong.albumid, currentSong.position, true); getSongData(null, currentSong.songid, currentSong.albumid, currentSong.position, true);
loadCurrentPlaylist(); loadCurrentPlaylist();
updateStatus('#status_Current', countCurrentPlaylist('#CurrentPlaylistContainer'));
$('#tabQueue a.button').removeClass('disabled');
} }
resizeContent(); resizeContent();
}); });
@ -42,11 +44,13 @@ function resizeContent() {
$('.smsection').css({ 'height': (($(window).height() - 168)) + 'px' }); $('.smsection').css({ 'height': (($(window).height() - 168)) + 'px' });
var smheight = $('.smsection').height(); var smheight = $('.smsection').height();
var smwidth = $('.smsection').width(); var smwidth = $('.smsection').width();
$('.tablecontainer').css({ 'width': ((screenwidth - smwidth) - 10) + 'px' });
/*
$('#BottomContainer').css({ 'top': smheight + 35 + 'px' }); $('#BottomContainer').css({ 'top': smheight + 35 + 'px' });
if (getCookie('sidebar')) { if (getCookie('sidebar')) {
var tabwidth = $(window).width() - 264; var tabwidth = $(window).width() - 264;
if (tabwidth >= 700) { if (tabwidth >= 700) {
$('.tabcontent').css({ 'width': tabwidth + 'px' }); //$('.tabcontent').css({ 'width': tabwidth + 'px' });
} }
var sbheight = $(window).height() - 152; var sbheight = $(window).height() - 152;
var sbwidth = $('#SideBar').width(); var sbwidth = $('#SideBar').width();
@ -56,26 +60,29 @@ function resizeContent() {
} else { } else {
var tabwidth = $(window).width() - 58; var tabwidth = $(window).width() - 58;
if (tabwidth >= 300) { if (tabwidth >= 300) {
$('.tabcontent').css({ 'width': tabwidth + 'px' }); //$('.tabcontent').css({ 'width': tabwidth + 'px' });
$('.status').css({ 'right': 4 + 'px' }); $('.status').css({ 'right': 4 + 'px' });
} }
} }
var tabwidth = $('.tabcontent').width(); var tabwidth = $('.tabcontent').width();
$('#BreadCrumbContainer, #AlbumContainer, #TrackContainer, #PodcastContainer').css({ 'width': (tabwidth - smwidth - 45) + 'px' }); $('#BreadCrumbContainer, #AlbumContainer, #TrackContainer, #PodcastContainer').css({ 'width': (tabwidth - smwidth - 45) + 'px' });
$('#CurrentPlaylistContainer, #VideosContainer').css({ 'width': (tabwidth - 30) + 'px' }); $('#CurrentPlaylistContainer, #VideosContainer').css({ 'width': (tabwidth - 30) + 'px' });
$('#player').css({ 'width': tabwidth + 'px' }); //$('#player').css({ 'width': tabwidth + 'px' });
*/
} }
function resizeSMSection(x) { function resizeSMSection(x) {
var screenwidth = $(window).width();
var defwidth = 200; var defwidth = 200;
var smwidth = $('.smsection').width(); var smwidth = $('.smsection').width();
var newsmwidth = smwidth + parseInt(x); var newsmwidth = smwidth + parseInt(x);
var newwidth = newsmwidth - defwidth; var newwidth = newsmwidth - defwidth;
if (smwidth != newsmwidth && newsmwidth > 150 && newsmwidth < 500) { if (smwidth != newsmwidth && newsmwidth > 150 && newsmwidth < 500) {
$('.smsection').css({ 'width': (newsmwidth) + 'px' }); $('.smsection').css({ 'width': (newsmwidth) + 'px' });
$('.actions').css({ 'width': (newsmwidth - 5) + 'px' }); //$('.actions').css({ 'width': (newsmwidth - 5) + 'px' });
$('#BottomContainer').css({ 'width': (newsmwidth - 23) + 'px' }); $('#BottomContainer').css({ 'width': (newsmwidth - 23) + 'px' });
$('.tablecontainer').css({ 'width': ((screenwidth - newsmwidth) - 10) + 'px' });
setCookie('defaultsmwidth', newwidth); setCookie('defaultsmwidth', newwidth);
var ulwidth = newsmwidth + 6; var ulwidth = newsmwidth + 6;
$('#BreadCrumbContainer, #AlbumContainer, #TrackContainer, #PodcastContainer').css({ 'margin-left': (ulwidth + 15) + 'px' }); //$('#BreadCrumbContainer, #AlbumContainer, #TrackContainer, #PodcastContainer').css({ 'margin-left': (ulwidth + 15) + 'px' });
} }
} }

View file

@ -8,7 +8,7 @@
//headers: { "Authorization": "Basic " + auth } //headers: { "Authorization": "Basic " + auth }
}); });
*/ */
// Fill Preferences from Cookies // Fill Settings from Cookies
if (getCookie('username')) { $('#Username').val(getCookie('username')); } if (getCookie('username')) { $('#Username').val(getCookie('username')); }
//$('#Password').val(getCookie('passwordenc')); //$('#Password').val(getCookie('passwordenc'));
if (getCookie('AutoPlaylists')) { $('#AutoPlaylists').val(getCookie('AutoPlaylists')); } if (getCookie('AutoPlaylists')) { $('#AutoPlaylists').val(getCookie('AutoPlaylists')); }
@ -17,11 +17,7 @@
if (getCookie('Server')) { $('#Server').val(getCookie('Server')); } if (getCookie('Server')) { $('#Server').val(getCookie('Server')); }
if (getCookie('ApplicationName')) { $('#ApplicationName').val(getCookie('ApplicationName')); } if (getCookie('ApplicationName')) { $('#ApplicationName').val(getCookie('ApplicationName')); }
if (getCookie('Server')) { // Set Settings defaults
baseURL = getCookie('Server') + '/rest';
}
// Set Preferences defaults
if (getCookie('Theme')) { if (getCookie('Theme')) {
$('#Theme').val(getCookie('Theme')); $('#Theme').val(getCookie('Theme'));
var theme = getCookie('Theme'); var theme = getCookie('Theme');
@ -76,6 +72,28 @@
setCookie('CurrentVersion', currentVersion); setCookie('CurrentVersion', currentVersion);
} }
// Sway.fm Unity Plugin
unity = UnityMusicShim();
unity.setSupports({
playpause: true,
next: true,
previous: true
});
unity.setCallbackObject({
pause: function () {
if (debug) { console.log("Unity: Recieved playpause command"); }
playPauseSong();
},
next: function () {
if (debug) { console.log("Unity: Recieved next command"); }
$('#NextTrack').click();
},
previous: function () {
if (debug) { console.log("Unity: Recieved previous command"); }
$('#PreviousTrack').click();
}
});
// Table Sorting // Table Sorting
$('#CurrentPlaylistContainer').stupidtable(); $('#CurrentPlaylistContainer').stupidtable();
$('#TrackContainer').stupidtable(); $('#TrackContainer').stupidtable();
@ -133,7 +151,7 @@
if (debug) { console.log("TAG VIDEOS"); } if (debug) { console.log("TAG VIDEOS"); }
loadVideos(true); loadVideos(true);
break; break;
case '#tabPreferences': case '#tabSettings':
getGenres(); getGenres();
break; break;
default: default:
@ -144,8 +162,8 @@
// Tabs // Tabs
$('.tabcontent').hide(); //Hide all content $('.tabcontent').hide(); //Hide all content
if (!getCookie('username') && !getCookie('passwordenc') && !getCookie('Server')) { // Show Preferences if (!getCookie('username') && !getCookie('passwordenc') && !getCookie('Server')) { // Show Settings
loadTabContent('#tabPreferences'); loadTabContent('#tabSettings');
} else { } else {
if (window.location.hash) { if (window.location.hash) {
var hash = window.location.hash; var hash = window.location.hash;
@ -197,13 +215,9 @@
$('#Artists').stop().scrollTo(el, 400); $('#Artists').stop().scrollTo(el, 400);
} }
} else if (unicode == 39 || unicode == 176) { // right arrow } else if (unicode == 39 || unicode == 176) { // right arrow
var next = $('#CurrentPlaylistContainer tr.playing').next(); $('#NextTrack').click();
if (!next.length) next = $('#CurrentPlaylistContainer li').first();
changeTrack(next);
} else if (unicode == 37 || unicode == 177) { // back arrow } else if (unicode == 37 || unicode == 177) { // back arrow
var prev = $('#CurrentPlaylistContainer tr.playing').prev(); $('#PreviousTrack').click();
if (!prev.length) prev = $('#CurrentPlaylistContainer tr').last();
changeTrack(prev);
} else if (unicode == 32 || unicode == 179 || unicode == 0179) { // spacebar } else if (unicode == 32 || unicode == 179 || unicode == 0179) { // spacebar
playPauseSong(); playPauseSong();
return false; return false;
@ -249,8 +263,7 @@
$('#AutoAlbumContainer li').removeClass('selected'); $('#AutoAlbumContainer li').removeClass('selected');
$('#ArtistContainer li').removeClass('selected'); $('#ArtistContainer li').removeClass('selected');
$(this).addClass('selected'); $(this).addClass('selected');
getAlbums($(this).attr("id"), '', '#AlbumContainer tbody'); getMusicDirectory($(this).attr("id"), '', '#AlbumContainer tbody', '');
$('#BreadCrumbs').html('<a href=\"\" artistid=\"' + $(this).attr("id") + '\">' + $(this).find('span').text() + '</a>');
}); });
$('#BottomIndex li a').live('click', function () { $('#BottomIndex li a').live('click', function () {
var el = 'a[name = "index_' + $(this).text() + '"]'; var el = 'a[name = "index_' + $(this).text() + '"]';
@ -268,45 +281,39 @@
return false; return false;
}); });
$('#BreadCrumbs a').live('click', function () { $('#BreadCrumbs a').live('click', function () {
var artistid = $(this).attr('artistid'); var parentid = $(this).attr('parentid');
var albumid = $(this).attr('albumid'); var albumid = $(this).attr('albumid');
if (typeof artistid != 'undefined') { if (typeof parentid != 'undefined') {
getAlbums(artistid, '', '#AlbumContainer tbody'); getMusicDirectory(parentid, '', '#AlbumContainer tbody', '');
} else if (typeof albumid != 'undefined') { } else if (typeof albumid != 'undefined') {
getAlbums(albumid, '', '#AlbumContainer tbody'); parentid = $(this).prev().attr('parentid');
getMusicDirectory(albumid, '', '#AlbumContainer tbody', parentid);
} }
return false; return false;
}); });
$('tr.album').live('click', function (e) { $('tr.album').live('click', function (e) {
var albumid = $(this).attr('childid'); var albumid = $(this).attr('childid');
var album = $(this).find('td.album').text();
var artistid = $(this).attr('parentid'); var artistid = $(this).attr('parentid');
var artist = $(this).find('td.artist').text(); getMusicDirectory(albumid, '', '#AlbumContainer tbody', artistid);
getAlbums(albumid, '', '#AlbumContainer tbody');
var html = '<a href=\"\" artistid=\"' + artistid + '\">' + artist + '</a>';
html += ' ><a href=\"\" albumid=\"' + albumid + '\">' + album + '</a>';
$('#BreadCrumbs').html(html);
return false; return false;
}); });
$('tr.album a.play').live('click', function (e) { $('tr.album a.play').live('click', function (e) {
var albumid = $(this).parent().parent().attr('childid'); var albumid = $(this).parent().parent().parent().attr('childid');
var artistid = $(this).parent().parent().attr('parentid'); getMusicDirectory(albumid, 'autoplay', '#CurrentPlaylistContainer', '');
getAlbums(albumid, 'autoplay', '#CurrentPlaylistContainer');
return false; return false;
}); });
$('tr.album a.add').live('click', function (e) { $('tr.album a.add').live('click', function (e) {
var albumid = $(this).parent().parent().attr('childid'); var albumid = $(this).parent().parent().parent().attr('childid');
var artistid = $(this).parent().parent().attr('parentid'); getMusicDirectory(albumid, 'add', '#CurrentPlaylistContainer', '');
getAlbums(albumid, 'add', '#CurrentPlaylistContainer');
return false; return false;
}); });
$('tr.album a.download').live('click', function (event) { $('tr.album a.download').live('click', function (event) {
var itemid = $(this).parent().parent().attr('childid'); var itemid = $(this).parent().parent().parent().attr('childid');
downloadItem(itemid, 'item'); downloadItem(itemid, 'item');
return false; return false;
}); });
$('tr.album a.rate').live('click', function (event) { $('tr.album a.rate').live('click', function (event) {
var itemid = $(this).parent().parent().attr('childid'); var itemid = $(this).parent().parent().parent().attr('childid');
//rateSong(itemid, 5); //rateSong(itemid, 5);
starItem(itemid, true); starItem(itemid, true);
$(this).removeClass('rate'); $(this).removeClass('rate');
@ -314,13 +321,22 @@
return false; return false;
}); });
$('tr.album a.favorite').live('click', function (event) { $('tr.album a.favorite').live('click', function (event) {
var itemid = $(this).parent().parent().attr('childid'); var itemid = $(this).parent().parent().parent().attr('childid');
//rateSong(itemid, 0); //rateSong(itemid, 0);
starItem(itemid, false); starItem(itemid, false);
$(this).removeClass('favorite'); $(this).removeClass('favorite');
$(this).addClass('rate'); $(this).addClass('rate');
return false; return false;
}); });
$('tr.album td.artist a').live('click', function (event) {
var parentid = $(this).parent().parent().attr('parentid');
if (parentid !== "undefined") {
$('#AutoAlbumContainer li').removeClass('selected');
$('#ArtistContainer li').removeClass('selected');
getMusicDirectory(parentid, '', '#AlbumContainer tbody', '');
}
return false;
});
// Track - Click Events // Track - Click Events
// Multiple Select // Multiple Select
@ -354,17 +370,16 @@
// Double Click // Double Click
$('table.songlist tr.song').live('dblclick', function (e) { $('table.songlist tr.song').live('dblclick', function (e) {
e.preventDefault(); e.preventDefault();
//$(this).addClass('playing').siblings().removeClass('playing');
var songid = $(this).attr('childid'); var songid = $(this).attr('childid');
var albumid = $(this).attr('parentid'); var albumid = $(this).attr('parentid');
getSongData(this, songid, albumid, 0, false); getSongData(this, songid, albumid, 0, false);
}); });
$('table.songlist tr.song a.play').live('click', function (event) { $('table.songlist tr.song a.play').live('click', function (event) {
var songid = $(this).parent().parent().attr('childid'); var songid = $(this).parent().parent().parent().attr('childid');
var albumid = $(this).parent().parent().attr('parentid'); var albumid = $(this).parent().parent().parent().attr('parentid');
if (!$('#tabQueue').is(':visible')) { if (!$('#tabQueue').is(':visible')) {
$('#CurrentPlaylistContainer tbody').empty(); $('#CurrentPlaylistContainer tbody').empty();
var track = $(this).parent().parent(); var track = $(this).parent().parent().parent();
$(track).clone().appendTo('#CurrentPlaylistContainer'); $(track).clone().appendTo('#CurrentPlaylistContainer');
id = 0; id = 0;
count = 0; count = 0;
@ -380,27 +395,27 @@
albumid = $(firstsong).attr('parentid'); albumid = $(firstsong).attr('parentid');
getSongData(firstsong, songid, albumid, 0, false); getSongData(firstsong, songid, albumid, 0, false);
} else { } else {
getSongData($(this).parent().parent(), songid, albumid, 0, false); getSongData($(this).parent().parent().parent(), songid, albumid, 0, false);
} }
return false; return false;
}); });
$('table.songlist tr.song a.download').live('click', function (event) { $('table.songlist tr.song a.download').live('click', function (event) {
var itemid = $(this).parent().parent().attr('childid'); var itemid = $(this).parent().parent().parent().attr('childid');
downloadItem(itemid, 'item'); downloadItem(itemid, 'item');
return false; return false;
}); });
$('table.songlist tr.song a.add').live('click', function (event) { $('table.songlist tr.song a.add').live('click', function (event) {
var track = $(this).parent().parent(); var track = $(this).parent().parent().parent();
$(track).clone().appendTo('#CurrentPlaylistContainer'); $(track).clone().appendTo('#CurrentPlaylistContainer');
return false; return false;
}); });
$('table.songlist tr.song a.remove').live('click', function (event) { $('table.songlist tr.song a.remove').live('click', function (event) {
var track = $(this).parent().parent(); var track = $(this).parent().parent().parent();
$(track).remove(); $(track).remove();
return false; return false;
}); });
$('table.songlist tr.song a.rate').live('click', function (event) { $('table.songlist tr.song a.rate').live('click', function (event) {
var songid = $(this).parent().parent().attr('childid'); var songid = $(this).parent().parent().parent().attr('childid');
//rateSong(songid, 5); //rateSong(songid, 5);
starItem(songid, true); starItem(songid, true);
$(this).removeClass('rate'); $(this).removeClass('rate');
@ -408,7 +423,7 @@
return false; return false;
}); });
$('table.songlist tr.song a.favorite').live('click', function (event) { $('table.songlist tr.song a.favorite').live('click', function (event) {
var songid = $(this).parent().parent().attr('childid'); var songid = $(this).parent().parent().parent().attr('childid');
//rateSong(songid, 0); //rateSong(songid, 0);
starItem(songid, false); starItem(songid, false);
$(this).removeClass('favorite'); $(this).removeClass('favorite');
@ -420,21 +435,10 @@
if (parentid != '' && parentid !== undefined) { if (parentid != '' && parentid !== undefined) {
$('#AutoAlbumContainer li').removeClass('selected'); $('#AutoAlbumContainer li').removeClass('selected');
$('#ArtistContainer li').removeClass('selected'); $('#ArtistContainer li').removeClass('selected');
getAlbums(parentid, 'link', '#AlbumContainer tbody'); getMusicDirectory(parentid, 'link', '#AlbumContainer tbody', '');
} }
return false; return false;
}); });
/*
$('table.songlist tr.song td.artist a').live('click', function (event) {
var artistid = $(this).parent().parent().attr('artistid');
if (artistid != '' && artistid !== undefined) {
$('#AutoAlbumContainer li').removeClass('selected');
$('#ArtistContainer li').removeClass('selected');
getArtist(artistid, 'link', '#AlbumContainer tbody');
}
return false;
});
*/
$('li.index').live('click', function (e) { $('li.index').live('click', function (e) {
$('#Artists').stop().scrollTo('#auto', 400); $('#Artists').stop().scrollTo('#auto', 400);
return false; return false;
@ -497,7 +501,6 @@
return false; return false;
}); });
$('#action_RefreshArtists').click(function () { $('#action_RefreshArtists').click(function () {
//loadArtists("", true);
if (getCookie('MusicFolders')) { if (getCookie('MusicFolders')) {
loadArtists(getCookie('MusicFolders'), true); loadArtists(getCookie('MusicFolders'), true);
} else { } else {
@ -505,6 +508,10 @@
} }
return false; return false;
}); });
$('#action_RescanLibrary').click(function () {
rescanLibrary();
return false;
});
$('#action_IncreaseWidth').click(function () { $('#action_IncreaseWidth').click(function () {
resizeSMSection(50); resizeSMSection(50);
return false; return false;
@ -595,6 +602,7 @@
$('#action_Empty').live('click', function () { $('#action_Empty').live('click', function () {
$('#CurrentPlaylistContainer tbody').empty(); $('#CurrentPlaylistContainer tbody').empty();
deleteCurrentPlaylist(); deleteCurrentPlaylist();
updateStatus('#status_Current', '');
return false; return false;
}); });
$('#action_AddCurrentToPlaylist').click(function () { $('#action_AddCurrentToPlaylist').click(function () {
@ -625,7 +633,7 @@
$('#songdetails').click(function (e) { $('#songdetails').click(function (e) {
var source = e.target.nodeName; var source = e.target.nodeName;
var hash = window.location.hash; var hash = window.location.hash;
if (source != 'A' && hash != '#tabQueue') { if (source != 'A' && source != 'IMG' && hash != '#tabQueue') {
loadTabContent('#tabQueue'); loadTabContent('#tabQueue');
} }
}); });
@ -705,6 +713,16 @@
} }
return false; return false;
}); });
$('#action_CurrentRemoveSongs').click(function () {
if (!$(this).hasClass('disabled')) {
if ($('#CurrentPlaylist tr.selected').length > 0) {
$('#CurrentPlaylist tr.selected').each(function () {
$(this).remove();
});
}
}
return false;
});
$('#action_AutoPilot').click(function () { $('#action_AutoPilot').click(function () {
var msg; var msg;
if (getCookie('AutoPilot')) { if (getCookie('AutoPilot')) {
@ -723,16 +741,34 @@
if ($('#CurrentPlaylistContainer tbody').html() == '' && !audio) { if ($('#CurrentPlaylistContainer tbody').html() == '' && !audio) {
$('#CurrentPlaylistContainer tbody').empty(); $('#CurrentPlaylistContainer tbody').empty();
getRandomSongList('autoplay', '#CurrentPlaylistContainer tbody', '', folder); getRandomSongList('autoplay', '#CurrentPlaylistContainer tbody', '', folder);
$('#currentActions a.button').removeClass('disabled'); $('#tabQueue a.button').removeClass('disabled');
} else { } else {
getRandomSongList('', '#CurrentPlaylistContainer tbody', '', folder); getRandomSongList('', '#CurrentPlaylistContainer tbody', '', folder);
$('#currentActions a.button').removeClass('disabled'); $('#tabQueue a.button').removeClass('disabled');
} }
} }
$(this).attr("title", msg); $(this).attr("title", msg);
updateMessage(msg, true); updateMessage(msg, true);
return false; return false;
}); });
var preview = true;
$('#action_Preview').click(function () {
var msg;
if (preview) {
//setCookie('Preview', null);
previewStarredCoverArt();
//$('#action_Preview').addClass('selected');
msg = 'Preview On';
//preview = false;
} else {
//setCookie('Preview', true);
//$('#action_Preview').removeClass('selected');
//msg = 'Preview Off';
}
$(this).attr("title", msg);
updateMessage(msg, true);
return false;
});
// Playlist Click Events // Playlist Click Events
$('#AutoPlaylistContainer li.item').live('click', function () { $('#AutoPlaylistContainer li.item').live('click', function () {
@ -887,7 +923,12 @@
} else { } else {
next = $('#AlbumContainer tr.playing').next(); next = $('#AlbumContainer tr.playing').next();
} }
changeTrack(next); //changeTrack(next);
if (!changeTrack(next)) {
if (getCookie('AutoPilot')) {
getRandomSongList('autoplayappend', '#CurrentPlaylistContainer tbody', '', '');
}
}
return false; return false;
}); });
$('#PreviousTrack').live('click', function () { $('#PreviousTrack').live('click', function () {
@ -895,10 +936,21 @@
changeTrack(prev); changeTrack(prev);
return false; return false;
}); });
$("a#coverartimage").fancybox({ $("a#coverartimage").fancybox({
'hideOnContentClick': true, beforeShow : function() {
'type': 'image' this.title = $('#songdetails_artist').html();
},
afterLoad : function() {
//this.inner.prepend( '<h1>1. My custom title</h1>' );
//this.content = '<h1>2. My custom title</h1>';
},
hideOnContentClick: true,
type: 'image',
openEffect: 'none',
closeEffect: 'none',
}); });
$('#songdetails a.rate').live('click', function (event) { $('#songdetails a.rate').live('click', function (event) {
var itemid = $('#songdetails_song').attr('childid'); var itemid = $('#songdetails_song').attr('childid');
if (itemid !== undefined) { if (itemid !== undefined) {
@ -964,13 +1016,19 @@
} }
}); });
// Preferences Click Events // Settings Click Events
$('#SavePreferences').live('click', function () { $('#SaveSettings').live('click', function () {
var username = $('#Username').val(); if ($('#Username').val() != "") {
var password = $('#Password').val(); username = $('#Username').val();
setCookie('username', username); setCookie('username', username);
if (password != "") { }
setCookie('passwordenc', 'enc:' + HexEncode(password)); if ($('#Password').val() != "") {
password = 'enc:' + HexEncode($('#Password').val());
setCookie('passwordenc', password);
}
if ($('#Server').val() != "") {
server = $('#Server').val();
setCookie('Server', server);
} }
var AutoPlaylists = $('#AutoPlaylists').val(); var AutoPlaylists = $('#AutoPlaylists').val();
setCookie('AutoPlaylists', AutoPlaylists); setCookie('AutoPlaylists', AutoPlaylists);
@ -978,16 +1036,103 @@
setCookie('AutoAlbumSize', AutoAlbumSize); setCookie('AutoAlbumSize', AutoAlbumSize);
var AutoPlaylistSize = $('#AutoPlaylistSize').val(); var AutoPlaylistSize = $('#AutoPlaylistSize').val();
setCookie('AutoPlaylistSize', AutoPlaylistSize); setCookie('AutoPlaylistSize', AutoPlaylistSize);
var server = $('#Server').val(); // Application Name
if (server != "") { if ($('#ApplicationName').val() != "") {
setCookie('Server', server); applicationName = $('#ApplicationName').val();
setCookie('ApplicationName', applicationName);
} }
var applicationname = $('#ApplicationName').val(); // Hide AZ
if (applicationname != "") { if ($('#HideAZ').is(':checked')) {
setCookie('ApplicationName', applicationname); setCookie('HideAZ', '1');
$('#BottomContainer').hide();
} else {
setCookie('HideAZ', null);
$('#BottomContainer').show();
} }
updateMessage('Preferences Saved...', true); // Song Notification
//location.reload(true); if ($('#Notification_Song').is(':checked')) {
requestPermissionIfRequired();
if (hasNotificationPermission()) {
setCookie('Notification_Song', '1');
} else {
alert('HTML5 Notifications are not available for your current browser, Sorry :(');
return false;
}
} else {
setCookie('Notification_Song', null);
}
// Now Playing Notification
if ($('#Notification_NowPlaying').is(':checked')) {
requestPermissionIfRequired();
if (hasNotificationPermission()) {
setCookie('Notification_NowPlaying', '1');
} else {
alert('HTML5 Notifications are not available for your current browser, Sorry :(');
return false;
}
} else {
setCookie('Notification_NowPlaying', null);
}
// Scroll Title
if ($('#ScrollTitle').is(':checked')) {
setCookie('ScrollTitle', '1');
} else {
setCookie('ScrollTitle', null);
}
// Debug
if ($('#Debug').is(':checked')) {
setCookie('Debug', '1');
debug = true;
} else {
setCookie('Debug', null);
debug = false;
}
// Force Flash
if ($('#ForceFlash').is(':checked')) {
setCookie('ForceFlash', '1');
/*
if (confirm('Switching to the Flash audio player requires a page refresh. Would you like to do that now?')) {
location.reload(true);
} else {
}
*/
} else {
setCookie('ForceFlash', null);
}
// JSONP
if ($('#Protocol').is(':checked')) {
protocol = 'jsonp';
setCookie('Protocol', '1');
} else {
protocol = 'json';
setCookie('Protocol', null);
}
// Save Progress
if ($('#SaveTrackPosition').is(':checked')) {
setCookie('SaveTrackPosition', '1');
var audio = typeof $("#playdeck").data("jPlayer") != 'undefined' ? true : false;
if (audio) {
saveTrackPosition();
}
} else {
setCookie('SaveTrackPosition', null);
setCookie('CurrentSong', null);
deleteCurrentPlaylist();
}
updateBaseParams();
alert('Settings Saved');
return false;
});
$('#ResetSettings').live('click', function () {
setCookie('username', null);
setCookie('password', null);
setCookie('AutoAlbumSize', null);
setCookie('AutoPlaylistSize', null);
setCookie('Server', null);
setCookie('ApplicationName', null);
setCookie('HideAZ', null);
location.reload(true);
}); });
$('#Theme').live('change', function () { $('#Theme').live('change', function () {
var theme = $(this).val(); var theme = $(this).val();
@ -1005,103 +1150,6 @@
} }
$('#AutoPlaylists').val(newGenres); $('#AutoPlaylists').val(newGenres);
}); });
$('#HideAZ').live('click', function () {
if ($('#HideAZ').is(':checked')) {
setCookie('HideAZ', '1');
$('#BottomContainer').hide();
} else {
setCookie('HideAZ', null);
$('#BottomContainer').show();
}
});
$('#Notification_Song').live('click', function () {
if ($('#Notification_Song').is(':checked')) {
requestPermissionIfRequired();
if (hasNotificationPermission()) {
setCookie('Notification_Song', '1');
} else {
alert('HTML5 Notifications are not available for your current browser, Sorry :(');
return false;
}
} else {
setCookie('Notification_Song', null);
}
});
$('#Notification_NowPlaying').live('click', function () {
if ($('#Notification_NowPlaying').is(':checked')) {
requestPermissionIfRequired();
if (hasNotificationPermission()) {
setCookie('Notification_NowPlaying', '1');
} else {
alert('HTML5 Notifications are not available for your current browser, Sorry :(');
return false;
}
} else {
setCookie('Notification_NowPlaying', null);
}
});
$('#ScrollTitle').live('click', function () {
if ($('#ScrollTitle').is(':checked')) {
setCookie('ScrollTitle', '1');
} else {
setCookie('ScrollTitle', null);
}
});
$('#Debug').live('click', function () {
if ($('#Debug').is(':checked')) {
setCookie('Debug', '1');
debug = true;
} else {
setCookie('Debug', null);
debug = false;
}
});
$('#ForceFlash').live('click', function () {
if ($('#ForceFlash').is(':checked')) {
setCookie('ForceFlash', '1');
} else {
setCookie('ForceFlash', null);
}
//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')) {
setCookie('SaveTrackPosition', '1');
var audio = typeof $("#playdeck").data("jPlayer") != 'undefined' ? true : false;
if (audio) {
saveTrackPosition();
}
} else {
setCookie('SaveTrackPosition', null);
setCookie('CurrentSong', null);
deleteCurrentPlaylist();
}
//location.reload(true);
});
$('input#Password').keydown(function (e) {
var unicode = e.charCode ? e.charCode : e.keyCode;
if (unicode == 13) {
$('#SavePreferences').click();
}
});
$('#ResetPreferences').live('click', function () {
setCookie('username', null);
setCookie('password', null);
setCookie('AutoAlbumSize', null);
setCookie('AutoPlaylistSize', null);
setCookie('Server', null);
setCookie('ApplicationName', null);
setCookie('HideAZ', null);
//location.reload(true);
});
$('#ChangeLogShowMore').live('click', function () { $('#ChangeLogShowMore').live('click', function () {
$('ul#ChangeLog li.log').each(function (i, el) { $('ul#ChangeLog li.log').each(function (i, el) {
$(el).show(); $(el).show();

View file

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

View file

@ -52,43 +52,23 @@ span.apiversion
border-right: 1px solid #232323; border-right: 1px solid #232323;
border-bottom: none; border-bottom: none;
} }
#nav a.first
{
border-top: 1px solid #232323;
}
#nav a.first:hover
{
border: 1px solid #5A5A5A;
border-right: 1px solid #232323;
border-bottom: none;
}
#nav a.last
{
border-bottom: 1px solid #232323;
}
#nav a.last:hover
{
border: 1px solid #5A5A5A;
border-right: 1px solid #232323;
border-bottom: none;
}
#nav a.active #nav a.active
{ {
color: #545454; color: #545454;
background: #2E2E2E; background: #2E2E2E;
border: 1px solid #1D1D1D; border: 1px solid #1D1D1D;
border-right: none; border-bottom: none;
} }
#nav a.active:hover #nav a.active:hover
{ {
color: #545454; color: #545454;
border: 1px solid #5A5A5A; border: 1px solid #5A5A5A;
border-right: none; border: 1px solid #1D1D1D;
border-bottom: 1px solid #1D1D1D; border-bottom: none;
} }
#SideBar #SideBar
{ {
background: #2e2e2e; background: #292929;
border: 1px solid #1d1d1d; border: 1px solid #1d1d1d;
} }
#NowPlaying, #ChatMsgs #NowPlaying, #ChatMsgs
@ -301,6 +281,13 @@ ul.preferences li em
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
color: #f2f2f2; color: #f2f2f2;
} }
.form {
border: 1px solid #1A1A1A;
background: #292929;
overflow: auto;
float: left;
margin: 10px;
}
.inputwrap .inputwrap
{ {
border: 1px solid #1d1d1d; border: 1px solid #1d1d1d;
@ -315,10 +302,18 @@ label
} }
#donate { #donate {
background: #232323; background: #232323;
border: 1px solid #1D1D1D; }
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
-webkit-border-radius: 10px;
background: #252525;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: rgba(34, 34, 34, 0.8); border: 1px solid #1a1a1a;
-webkit-border-radius: 10px;
border-radius: 10px;
background: rgba(29, 29, 29, 0.8);
-webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
} }
::-webkit-scrollbar-thumb:window-inactive { ::-webkit-scrollbar-thumb:window-inactive {
background: rgba(34, 34, 34, 0.2); background: rgba(34, 34, 34, 0.2);

View file

@ -1,3 +1,4 @@
html, body { height: 100%; }
body body
{ {
font: 100% Trebuchet MS, Arial, Helvetica, sans-serif; font: 100% Trebuchet MS, Arial, Helvetica, sans-serif;
@ -6,6 +7,7 @@ body
padding: 0; padding: 0;
text-align: center; text-align: center;
color: #5b5b4e; color: #5b5b4e;
height: 100%;
} }
img img
{ {
@ -54,28 +56,33 @@ span.apiversion
#container { #container {
text-align: left; text-align: left;
/*min-height: 600px;*/ overflow: hidden;
min-width: 810px; position: relative;
} width: 100%;
#nav height: 100%;
{
height: 127px;
position: absolute;
top: 44px;
left: 0px;
z-index: 99;
} }
a#logo a#logo
{ {
position: absolute; position: absolute;
width: 54px; width: 54px;
height: 36px; height: 36px;
background: url('../images/subsonic_36.png') no-repeat 6px 4px; background: url('../images/subsonic_36.png') no-repeat 5px 1px;
cursor: pointer; cursor: pointer;
top: 0;
right: 248px;
} }
a#logo:hover a#logo:hover
{ {
background: url('../images/subsonic_dn_36.png') no-repeat 6px 4px; background: url('../images/subsonic_dn_36.png') no-repeat 5px 1px;
}
#nav
{
height: 54px;
width: 270px;
position: absolute;
top: 2px;
left: 0;
z-index: 99;
} }
#nav ul #nav ul
{ {
@ -85,12 +92,14 @@ a#logo:hover
} }
#nav li #nav li
{ {
width: 50px; float: left;
margin: 0 1px 0 0;
} }
#nav a #nav a
{ {
display: block; display: block;
padding: 13px 9px 13px 15px; padding: 8px 12px;
height: 21px;
color: #7C7C7C; color: #7C7C7C;
letter-spacing: -1px; letter-spacing: -1px;
font-weight: bold; font-weight: bold;
@ -107,37 +116,20 @@ a#logo:hover
border: 1px solid #D5D5D5; border: 1px solid #D5D5D5;
border-bottom: none; border-bottom: none;
} }
#nav a.first
{
border-top: 1px solid #E4E4E4;
}
#nav a.first:hover
{
color: #545454;
border: 1px solid #D5D5D5;
border-bottom: none;
}
#nav a.last
{
border-bottom: 1px solid #E4E4E4;
}
#nav a.last:hover
{
color: #545454;
border: 1px solid #D5D5D5;
}
#nav a.active #nav a.active
{ {
color: #545454; color: #545454;
background: #ffffff; background: #ffffff;
border: 1px solid #CBCBCB; border: 1px solid #CBCBCB;
border-right: none; border-bottom: none;
padding: 8px 12px 9px 12px;
} }
#nav a.active:hover #nav a.active:hover
{ {
color: #545454; color: #545454;
border: 1px solid #CBCBCB; border: 1px solid #CBCBCB;
border-right: none; border-bottom: none;
} }
#nav a img #nav a img
{ {
@ -149,11 +141,20 @@ a#logo:hover
display: block; display: block;
margin: 3px 0 4px 1px; margin: 3px 0 4px 1px;
} }
#search
{
height: 30px;
width: 250px;
position: absolute;
top: 6px;
right: 0;
z-index: 1;
}
#content #content
{ {
background: #EDEDED; background: #EDEDED;
overflow: hidden; width: 100%;
height: 100%;
} }
#content h2 #content h2
{ {
@ -163,45 +164,42 @@ a#logo:hover
} }
.tabcontent .tabcontent
{ {
min-height: 400px; margin: 0;
min-width: 900px;
margin-left: 53px;
} }
.smsection .smsection
{ {
width: 200px; width: 200px;
min-height: 360px;
padding: 0 0 40px 0; padding: 0 0 40px 0;
float: left;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
background: #fff; background: #fff;
/*border-right: 1px solid #f2f2f2;*/ /*border-right: 1px solid #f2f2f2;*/
position: absolute; position: absolute;
top: 39px; top: 0;
left: 60px; bottom: 0;
left: 4px;
outline: none; outline: none;
} }
.lgsection .lgsection
{ {
height: 100%;
width: 100%;
min-height: 400px;
overflow: auto;
background: #fff; background: #fff;
border: 1px solid #cbcbcb; border-top: 1px solid #cbcbcb;
margin-top: 4px; border-bottom: 1px solid #cbcbcb;
position: absolute;
top: 40px;
bottom: 84px;
width: 100%;
} }
.fullsection .fullsection
{ {
height: 100%;
width: 100%;
min-width: 450px; min-width: 450px;
min-height: 400px;
overflow: auto; overflow: auto;
background: #fff; background: #fff;
border: 1px solid #cbcbcb; border: 1px solid #cbcbcb;
margin-top: 4px; position: absolute;
top: 40px;
bottom: 84px;
width: 100%;
} }
.padder .padder
{ {
@ -228,7 +226,7 @@ a#logo:hover
display: none; display: none;
height: 35px; height: 35px;
width: 40px; width: 40px;
margin: 0 0 0 7px; margin: 0 0 0 2px;
background: url('../images/ajax-loader.gif') no-repeat center center; background: url('../images/ajax-loader.gif') no-repeat center center;
float: left; float: left;
} }
@ -253,7 +251,7 @@ a#logo:hover
border: 1px solid #A6CBF3; border: 1px solid #A6CBF3;
border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
opacity: 0.8; opacity: 0.95;
cursor: pointer; cursor: pointer;
} }
.status .status
@ -264,8 +262,8 @@ a#logo:hover
text-align: center; text-align: center;
position: absolute; position: absolute;
z-index: 99; z-index: 99;
bottom: 87px; bottom: 85px;
right: 4px; right: 0;
background: #f2f2f2; background: #f2f2f2;
padding: 2px 10px; padding: 2px 10px;
border-top: 1px solid #CBCBCB; border-top: 1px solid #CBCBCB;
@ -381,7 +379,7 @@ ul.mainlist li.item a.add:hover
} }
#BreadCrumbContainer #BreadCrumbContainer
{ {
margin: 5px 5px 0 221px; margin: 5px 5px 0 0;
font-size: 12px; font-size: 12px;
height: 22px; height: 22px;
} }
@ -399,6 +397,10 @@ ul.mainlist li.item a.add:hover
padding: 2px 0px 2px 0; padding: 2px 0px 2px 0;
float: left; float: left;
} }
#BreadCrumbs span
{
margin: 0 2px 0 6px;
}
#BreadCrumbs a #BreadCrumbs a
{ {
margin: 0 2px 0 6px; margin: 0 2px 0 6px;
@ -417,11 +419,11 @@ ul.mainlist li.item a.add:hover
#AlbumContainer #AlbumContainer
{ {
margin: 0 5px 5px 221px; margin: 0 5px 5px 0;
} }
#TrackContainer, #PodcastContainer #TrackContainer, #PodcastContainer
{ {
margin: 5px 5px 5px 221px; margin: 5px 5px 5px 0;
} }
#CurrentPlaylistContainer tr.song a.add #CurrentPlaylistContainer tr.song a.add
{ {
@ -440,6 +442,26 @@ ul.mainlist li.item a.add:hover
{ {
background: url('../images/minus_8x2.png') no-repeat 6px center #DEECFB; background: url('../images/minus_8x2.png') no-repeat 6px center #DEECFB;
} }
.tablecontainer
{
position: absolute;
top: 0;
bottom: 0;
right: 0;
overflow-y: auto;
overflow-x: hidden;
width: auto;
}
.tablecontainerfull
{
position: absolute;
top: 0;
bottom: 0;
right: 0;
overflow-y: auto;
overflow-x: hidden;
width: 100%;
}
table.songlist table.songlist
{ {
margin: 5px; margin: 5px;
@ -488,10 +510,24 @@ table.songlist tr.album td.title
table.songlist tr.album td.artist table.songlist tr.album td.artist
{ {
} }
table.songlist tr.album td.itemactions table.songlist tr.album td.artist a
{ {
width: 85px; color: #829FC0;
padding-left: 10px; text-decoration: none;
float: left;
overflow: hidden;
white-space: nowrap;
}
table.songlist tr.album td.artist a:hover
{
text-decoration: underline;
}
table.songlist tr.album .itemactions
{
width: 80px;
padding: 0 10px;
margin: 0;
float: right;
} }
table.songlist tr.album td.albumart table.songlist tr.album td.albumart
{ {
@ -561,7 +597,6 @@ table.songlist tr.album a.favorite
float: left; float: left;
height: 50px; height: 50px;
width: 20px; width: 20px;
margin: 0 5px 0 0;
display: block; display: block;
background: url('../images/star_yo_12x12.png') 2px center no-repeat; background: url('../images/star_yo_12x12.png') 2px center no-repeat;
} }
@ -576,13 +611,12 @@ table.songlist tr.row td
font-size: 13px; font-size: 13px;
padding: 9px 10px; padding: 9px 10px;
} }
table.songlist tr.row td.itemactions table.songlist tr.row .itemactions
{ {
width: 85px; width: 80px;
padding-left: 26px; padding: 0 10px;
/*display: block;*/ /*display: block;*/
margin: auto 0; float: right;
height: 18px;
} }
table.songlist tr.row td.track table.songlist tr.row td.track
{ {
@ -712,7 +746,6 @@ table.songlist tr.selected td.album a
} }
#ArtistContainer #ArtistContainer
{ {
min-height: 360px;
} }
#BottomContainer #BottomContainer
{ {
@ -746,22 +779,17 @@ table.songlist tr.selected td.album a
} }
.actions .actions
{ {
width: 195px; height: 30px;
height: 29px; margin: 6px 20px 0 265px;
margin: 4px 0 0 0;
padding: 0 0 0 5px; padding: 0 0 0 5px;
} }
.subactions .subactions
{ {
height: 29px; height: 29px;
width: 660px; width: 660px;
margin: 4px 0 0 0; margin: 5px 0 0 0;
padding: 0 0 0 5px; padding: 0 0 0 5px;
} }
#songActions
{
float: left;
}
.submenu .submenu
{ {
position: absolute; position: absolute;
@ -804,12 +832,15 @@ table.songlist tr.selected td.album a
{ {
display: none; display: none;
width: 200px; width: 200px;
position: fixed; min-height: 350px;
top: 37px; background: none repeat scroll 0 0 #fcfcfc;
right: 4px;
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #CBCBCB; border: 1px solid #CBCBCB;
min-height: 400px; border-right: none;
position: absolute;
top: 40px;
bottom: 200px;
right: 0;
opacity: .85;
} }
#SideBar .header #SideBar .header
{ {
@ -819,14 +850,24 @@ table.songlist tr.selected td.album a
font-variant: small-caps; font-variant: small-caps;
font-weight: bold; font-weight: bold;
} }
#SideBar .submit
{
padding: 0 2px;
position: absolute;
bottom: 0;
}
#ChatMsgs #ChatMsgs
{ {
border-bottom: 1px solid #F2F2F2;
padding: 5px; padding: 5px;
margin: 0 0 2px; margin: 0 0 2px;
text-align: right; text-align: right;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
position: absolute;
width: 192px;
bottom: 38px;
top: 220px;
border-bottom: 1px solid #F2F2F2;
} }
#ChatMsgs .msg #ChatMsgs .msg
{ {
@ -846,10 +887,7 @@ table.songlist tr.selected td.album a
font-size: 9px; font-size: 9px;
color: #CAD0D7; color: #CAD0D7;
} }
#Chat .submit
{
padding: 0 2px;
}
#submenu_NowPlaying #submenu_NowPlaying
{ {
left: 605px; left: 605px;
@ -890,13 +928,31 @@ table.songlist tr.selected td.album a
{ {
} }
#queue
{
background: #fff;
border-top: 1px solid #cbcbcb;
border-bottom: 1px solid #cbcbcb;
margin: 4px 0;
height: 75px;
position: absolute;
bottom: 0; /* Sit it on the bottom */
left: 0;
width: 100%; /* As wide as it's allowed */
}
/* Player Style */ /* Player Style */
#player #player
{ {
background: #fff; background: #fff;
border: 1px solid #cbcbcb; border-top: 1px solid #cbcbcb;
margin: 2px 0 5px 0; border-bottom: 1px solid #cbcbcb;
margin-left: 53px; margin: 4px 0;
height: 75px;
position: absolute;
bottom: 0; /* Sit it on the bottom */
left: 0;
width: 100%; /* As wide as it's allowed */
} }
#audiocontainer #audiocontainer
{ {
@ -994,6 +1050,7 @@ table.songlist tr.selected td.album a
float: left; float: left;
padding: 2px; padding: 2px;
} }
#preview { display: none; }
#songdetails #songdetails
{ {
width: 322px; width: 322px;
@ -1275,6 +1332,7 @@ a.selected {
a.disabled { a.disabled {
color: #B7B7B7; color: #B7B7B7;
background: #f1f1f1; background: #f1f1f1;
opacity: .6;
} }
a.disabled:hover { a.disabled:hover {
color: #B7B7B7; color: #B7B7B7;
@ -1296,12 +1354,13 @@ a.button img.pad { margin: 1px 0 -1px 0; }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2); -webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
-webkit-border-radius: 10px; -webkit-border-radius: 10px;
background: #f2f2f2;
border-radius: 10px; border-radius: 10px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px; -webkit-border-radius: 10px;
border-radius: 10px; border-radius: 10px;
background: rgba(237, 237, 237, 0.4); background: rgba(201, 201, 201, 0.4);
-webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2); -webkit-box-shadow: inset 0 0 2px rgba(0,0,0,0.2);
} }
::-webkit-scrollbar-thumb:window-inactive { ::-webkit-scrollbar-thumb:window-inactive {
@ -1309,6 +1368,13 @@ a.button img.pad { margin: 1px 0 -1px 0; }
} }
/* Form Style */ /* Form Style */
.form {
border: 1px solid #f2f2f2;
background: #fcfcfc;
overflow: auto;
float: left;
margin: 10px;
}
input input
{ {
font-family: Calibri, Arial, Verdana; font-family: Calibri, Arial, Verdana;
@ -1363,6 +1429,10 @@ select#MusicFolders
{ {
margin: 0 5px; margin: 0 5px;
} }
.submitsettings {
margin: 0 40px 20px 40px;
float: right;
}
label label
{ {
font-size: 12px; font-size: 12px;