mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-28 18:04:53 +00:00
Central state change
This commit is contained in:
parent
bb641a878f
commit
19fe8b61bf
@ -25,12 +25,12 @@ button {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#browseBreadcrumb {
|
||||
#BrowseBreadrumb {
|
||||
overflow: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#browseBreadcrumb > li > a {
|
||||
#BrowseBreadcrumb > li > a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ tbody {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
#queue-buttons, #browsePlaylistsButtons, #searchButtons, #browseFilesystemButtons, #browseDatabaseButtons {
|
||||
#queue-buttons, #BrowsePlaylistsButtons, #SearchButtons, #BrowseFilesystemButtons, #BrowseDatabaseButtons {
|
||||
margin-bottom:20px;
|
||||
}
|
||||
|
||||
@ -180,9 +180,9 @@ main {
|
||||
margin-right:5px;
|
||||
}
|
||||
|
||||
#browseFilesystemFilterLetters > button,
|
||||
#browseDatabaseFilterLetters > button,
|
||||
#browsePlaylistsFilterLetters > button
|
||||
#BrowseFilesystemFilterLetters > button,
|
||||
#BrowseDatabaseFilterLetters > button,
|
||||
#BrowsePlaylistsFilterLetters > button
|
||||
{
|
||||
min-width:28px;
|
||||
}
|
||||
|
@ -150,19 +150,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="queuePaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="queuePaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="QueuePaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="QueuePaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="queuePaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="queuePaginationTopPages">
|
||||
<button id="QueuePaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="QueuePaginationTopPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="queuePaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="QueuePaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive-md">
|
||||
<table id="queueList" class="table table-hover table-sm">
|
||||
<table id="QueueList" class="table table-hover table-sm">
|
||||
<col class="tblnum"/>
|
||||
<col class="tbltitle"/>
|
||||
<col class="tblartist"/>
|
||||
@ -189,14 +189,14 @@
|
||||
<span class="material-icons">keyboard_arrow_up</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="queuePaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="queuePaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="QueuePaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="QueuePaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="queuePaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="queuePaginationBottomPages">
|
||||
<button id="QueuePaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="QueuePaginationBottomPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="queuePaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="QueuePaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -218,25 +218,25 @@
|
||||
</div>
|
||||
|
||||
<div class="card-body hide" id="cardBrowsePlaylists">
|
||||
<div class="btn-toolbar collapse show" id="browsePlaylistsButtons" role="toolbar">
|
||||
<div class="btn-toolbar collapse show" id="BrowsePlaylistsButtons" role="toolbar">
|
||||
<div class="btn-group mr-2">
|
||||
<button id="browsePlaylistsFilter" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Filter</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="browsePlaylistsFilterLetters">
|
||||
<button id="BrowsePlaylistsFilter" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Filter</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="BrowsePlaylistsFilterLetters">
|
||||
</div>
|
||||
</div>
|
||||
<div id="browsePlaylistsPaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="browsePlaylistsPaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="BrowsePlaylistsPaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="BrowsePlaylistsPaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="browsePlaylistsPaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="browsePlaylistsPaginationTopPages">
|
||||
<button id="BrowsePlaylistsPaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="BrowsePlaylistsPaginationTopPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="browsePlaylistsPaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="BrowsePlaylistsPaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive-md">
|
||||
<table id="browsePlaylistsList" class="table table-hover table-sm">
|
||||
<table id="BrowsePlaylistsList" class="table table-hover table-sm">
|
||||
<col class="tblnum"/>
|
||||
<col class="tbltitle"/>
|
||||
<col class="tbllastmodified"/>
|
||||
@ -253,48 +253,48 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btn-toolbar" id="browsePlaylistsButtonsBottom" role="toolbar">
|
||||
<div class="btn-toolbar" id="BrowsePlaylistsButtonsBottom" role="toolbar">
|
||||
<div class="btn-group mr-2">
|
||||
<button type="button" class="btn btn-secondary" onclick="scrollToTop()" title="To top">
|
||||
<span class="material-icons">keyboard_arrow_up</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="browsePlaylistsPaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="browsePlaylistsPaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="BrowsePlaylistsPaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="BrowsePlaylistsPaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="browsePlaylistsPaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="browsePlaylistsPaginationBottomPages">
|
||||
<button id="BrowsePlaylistsPaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="BrowsePlaylistsPaginationBottomPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="browsePlaylistsPaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="BrowsePlaylistsPaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body hide" id="cardBrowseDatabase">
|
||||
|
||||
<div class="btn-toolbar collapse show" id="browseDatabaseButtons" role="toolbar">
|
||||
<div class="btn-toolbar collapse show" id="BrowseDatabaseButtons" role="toolbar">
|
||||
<div class="btn-group mr-2">
|
||||
<button id="btnBrowseDatabaseArtist" type="button" class="btn btn-secondary hide">« Artists</button>
|
||||
</div>
|
||||
<div class="btn-group mr-2">
|
||||
<button id="browseDatabaseFilter" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Filter</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="browseDatabaseFilterLetters">
|
||||
<button id="BrowseDatabaseFilter" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Filter</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="BrowseDatabaseFilterLetters">
|
||||
</div>
|
||||
</div>
|
||||
<div id="browseDatabasePaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="browseDatabasePaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="BrowseDatabasePaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="BrowseDatabasePaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="browseDatabasePaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="browseDatabasePaginationTopPages">
|
||||
<button id="BrowseDatabasePaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="BrowseDatabasePaginationTopPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="browseDatabasePaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="BrowseDatabasePaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive-md">
|
||||
<table id="browseDatabaseArtistList" class="table table-hover table-sm">
|
||||
<table id="BrowseDatabaseArtistList" class="table table-hover table-sm">
|
||||
<col class="tblnum"/>
|
||||
<col class="tbltitle"/>
|
||||
<col class="tblaction"/>
|
||||
@ -310,53 +310,53 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="browseDatabaseAlbumCards" class="row"></div>
|
||||
<div id="BrowseDatabaseAlbumCards" class="row"></div>
|
||||
|
||||
<div class="btn-toolbar" id="browseDatabaseButtonsBottom" role="toolbar">
|
||||
<div class="btn-toolbar" id="BrowseDatabaseButtonsBottom" role="toolbar">
|
||||
<div class="btn-group mr-2">
|
||||
<button type="button" class="btn btn-secondary" onclick="scrollToTop()" title="To top">
|
||||
<span class="material-icons">keyboard_arrow_up</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="browseDatabasePaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="browseDatabasePaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="BrowseDatabasePaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="BrowseDatabasePaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="browseDatabasePaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="browseDatabasePaginationBottomPages">
|
||||
<button id="BrowseDatabasePaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="BrowseDatabasePaginationBottomPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="browseDatabasePaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="BrowseDatabasePaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body hide" id="cardBrowseFilesystem">
|
||||
<ol id="browseBreadcrumb" class="breadcrumb">
|
||||
</ol>
|
||||
|
||||
<div class="btn-toolbar collapse show" id="browseFilesystemButtons" role="toolbar">
|
||||
<div class="btn-toolbar collapse show" id="BrowseFilesystemButtons" role="toolbar">
|
||||
<div class="btn-group mr-2 pull-right">
|
||||
<button id="browseFilesystemAddAllSongs" class="btn btn-secondary">Add all</button>
|
||||
<button id="BrowseFilesystemAddAllSongs" class="btn btn-secondary">Add all</button>
|
||||
</div>
|
||||
<div class="btn-group mr-2">
|
||||
<button id="browseFilesystemFilter" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Filter</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="browseFilesystemFilterLetters">
|
||||
<button id="BrowseFilesystemFilter" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Filter</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="BrowseFilesystemFilterLetters">
|
||||
</div>
|
||||
</div>
|
||||
<div id="browseFilesystemPaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="browseFilesystemPaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="BrowseFilesystemPaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="BrowseFilesystemPaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="browseFilesystemPaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="browseFilesystemPaginationTopPages">
|
||||
<button id="BrowseFilesystemPaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="BrowseFilesystemPaginationTopPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="browseFilesystemPaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="BrowseFilesystemPaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ol id="BrowseBreadcrumb" class="breadcrumb">
|
||||
</ol>
|
||||
|
||||
<div class="table-responsive-md">
|
||||
<table id="browseFilesystemList" class="table table-hover table-sm">
|
||||
<table id="BrowseFilesystemList" class="table table-hover table-sm">
|
||||
<col class="tblnum"/>
|
||||
<col class="tbltitle"/>
|
||||
<col class="tblartist"/>
|
||||
@ -377,20 +377,20 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btn-toolbar" id="browseFilesystemButtonsBottom" role="toolbar">
|
||||
<div class="btn-toolbar" id="BrowseFilesystemButtonsBottom" role="toolbar">
|
||||
<div class="btn-group mr-2">
|
||||
<button type="button" class="btn btn-secondary" onclick="scrollToTop()" title="To top">
|
||||
<span class="material-icons">keyboard_arrow_up</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="browseFilesystemPaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="browseFilesystemPaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="BrowseFilesystemPaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="BrowseFilesystemPaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="browseFilesystemPaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="browseFilesystemPaginationBottomPages">
|
||||
<button id="BrowseFilesystemPaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="BrowseFilesystemPaginationBottomPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="browseFilesystemPaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="BrowseFilesystemPaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -401,7 +401,7 @@
|
||||
<span id="panel-heading-search" class="text pull-right"></span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="btn-toolbar collapse show" id="searchButtons" role="toolbar">
|
||||
<div class="btn-toolbar collapse show" id="SearchButtons" role="toolbar">
|
||||
<form id="search2" role="search">
|
||||
<div class="input-group mr-2">
|
||||
<input type="text" class="form-control" placeholder="Search" id="searchstr2"/>
|
||||
@ -423,18 +423,18 @@
|
||||
<div class="btn-group mr-2 pull-right">
|
||||
<button id="searchAddAllSongs" class="btn btn-secondary" onclick="addAllFromSearch();">Add all</button>
|
||||
</div>
|
||||
<div id="searchPaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="searchPaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="AearchPaginationTop" class="btn-group mr-2">
|
||||
<button onclick="gotoPage('prev',this,event)" id="SearchPaginationTopPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="searchPaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="searchPaginationTopPages">
|
||||
<button id="SearchPaginationTopPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="SearchPaginationTopPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="searchPaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="SearchPaginationTopNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive-md">
|
||||
<table id="searchList" class="table table-hover table-sm">
|
||||
<table id="SearchList" class="table table-hover table-sm">
|
||||
<col class="tblnum"/>
|
||||
<col class="tbltitle"/>
|
||||
<col class="tblartist"/>
|
||||
@ -455,20 +455,20 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btn-toolbar" id="searchButtonsBottom" role="toolbar">
|
||||
<div class="btn-toolbar" id="SearchButtonsBottom" role="toolbar">
|
||||
<div class="btn-group mr-2">
|
||||
<button type="button" class="btn btn-secondary" onclick="scrollToTop()" title="To top">
|
||||
<span class="material-icons">keyboard_arrow_up</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="searchPaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="searchPaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div id="SearchPaginationBottom" class="btn-group mr-2 dropup">
|
||||
<button onclick="gotoPage('prev',this,event)" id="SearchPaginationBottomPrev" title="Previous Page" type="button" class="btn btn-secondary">«</button>
|
||||
<div class="input-group-append">
|
||||
<button id="searchPaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="searchPaginationBottomPages">
|
||||
<button id="SearchPaginationBottomPage" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">Page 1 / 1</button>
|
||||
<div class="dropdown-menu bg-dark px-2" id="SearchPaginationBottomPages">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="gotoPage('next',this,event)" id="searchPaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
<button onclick="gotoPage('next',this,event)" id="SearchPaginationBottomNext" title="Next Page" type="button" class="btn btn-secondary input-group-append">»</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
222
htdocs/js/mpd.js
222
htdocs/js/mpd.js
@ -35,24 +35,26 @@ var coverImageFile = '';
|
||||
|
||||
var app = {};
|
||||
|
||||
app.apps = {"playback": { "state": "" },
|
||||
"queue": { "state": "0/Any Tag/" },
|
||||
"browse": { "active": "Database",
|
||||
"tabs": { "Filesystem": {"state": "0/!/"},
|
||||
"Playlists": {"state": "0/!/" },
|
||||
app.apps = {"Playback": { "state": "0/-/" },
|
||||
"Queue": { "state": "0/Any Tag/" },
|
||||
"Browse": { "active": "Database",
|
||||
"tabs": { "Filesystem": {"state": "0/-/"},
|
||||
"Playlists": {"state": "0/-/" },
|
||||
"Database": { "active":"Artist",
|
||||
"views": {"Artist": {"state": "0/!/" },
|
||||
"Album": {"state": "0/!/" }
|
||||
"views": {"Artist": {"state": "0/-/" },
|
||||
"Album": {"state": "0/-/" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"search": { "state": "0/Any Tag/" }
|
||||
"Search": { "state": "0/Any Tag/" }
|
||||
};
|
||||
|
||||
app.current = { "app": "playback", "tab": undefined, "view": undefined, "page": 0, "filter": "", "search": "" }
|
||||
app.current = { "app": "Playback", "tab": undefined, "view": undefined, "page": 0, "filter": "", "search": "" };
|
||||
app.last = { "app": undefined, "tab": undefined, "view": undefined };
|
||||
|
||||
app.prepare=function() {
|
||||
if (app.current.app != app.last.app || app.current.tab != app.last.tab || app.current.view != app.last.view) {
|
||||
$('#navbar-bottom > div').removeClass('active');
|
||||
$('#cardPlayback').addClass('hide');
|
||||
$('#cardQueue').addClass('hide');
|
||||
@ -60,11 +62,20 @@ app.prepare=function() {
|
||||
$('#cardSearch').addClass('hide');
|
||||
$('#searchqueue > input').val('');
|
||||
$('#cardBrowsePlaylists').addClass('hide');
|
||||
$('#cardBrowseDatabase').addClass('hide');
|
||||
$('#cardBrowseFilesystem').addClass('hide');
|
||||
$('#cardBrowseNavPlaylists').removeClass('active');
|
||||
$('#cardBrowseNavDatabase').removeClass('active');
|
||||
$('#cardBrowseDatabase').addClass('hide');
|
||||
$('#cardBrowseNavDatabase').removeClass('active');
|
||||
$('#cardBrowseFilesystem').addClass('hide');
|
||||
$('#cardBrowseNavFilesystem').removeClass('active');
|
||||
|
||||
$('#card'+app.current.app).removeClass('hide');
|
||||
$('#nav'+app.current.app).addClass('active');
|
||||
|
||||
if (app.current.tab != undefined) {
|
||||
$('#card'+app.current.app+app.current.tab).removeClass('hide');
|
||||
$('#card'+app.current.app+'Nav'+app.current.tab).addClass('active');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
app.goto=function(a,t,v,s) {
|
||||
@ -72,38 +83,37 @@ app.goto=function(a,t,v,s) {
|
||||
if (t == undefined) t = app.apps[a].active;
|
||||
if (app.apps[a].tabs[t].views) {
|
||||
if (v == undefined) v = app.apps[a].tabs[t].active;
|
||||
location.hash = '/'+a+t+v+'/'+ (s == undefined ? app.apps[a].tabs[t].views[v].state : s);
|
||||
location.hash = '/'+a+'/'+t+'/'+v+'!'+ (s == undefined ? app.apps[a].tabs[t].views[v].state : s);
|
||||
} else {
|
||||
location.hash = '/'+a+t+'/'+ (s == undefined ? app.apps[a].tabs[t].state : s);
|
||||
location.hash = '/'+a+'/'+t+'!'+ (s == undefined ? app.apps[a].tabs[t].state : s);
|
||||
}
|
||||
} else {
|
||||
location.hash = '/'+a+'/'+ (s == undefined ? app.apps[a].state : s);
|
||||
location.hash = '/'+a+'!'+ (s == undefined ? app.apps[a].state : s);
|
||||
}
|
||||
}
|
||||
|
||||
app.route=function() {
|
||||
var hash=decodeURI(location.hash);
|
||||
if (params=hash.match(/^\#\/(\w+)\/?(\w+)?\/?(\w+)?\!((\d+)\/([^\/]+)\/(.*))$/)) {
|
||||
app.current.app = params[1];
|
||||
app.current.tab = params[2];
|
||||
app.current.view = params[3];
|
||||
app.apps[app.current.app].state = params[4];
|
||||
app.current.page = parseInt(params[5]);
|
||||
app.current.filter = params[6];
|
||||
app.current.search = params[7];
|
||||
} else {
|
||||
app.goto("Playback");
|
||||
}
|
||||
|
||||
if (params=hash.match(/^\#\/(playback)\//)) {
|
||||
app.prepare();
|
||||
app.current.app=params[1];
|
||||
app.current.tab=undefined;
|
||||
app.current.view=undefined;
|
||||
$('#cardPlayback').removeClass('hide');
|
||||
$('#navPlayback').addClass('active');
|
||||
app.prepare();
|
||||
|
||||
if (app.current.app == 'Playback') {
|
||||
//Do nothing
|
||||
}
|
||||
else if (params=hash.match(/^\#\/(queue)\/((\d+)\/([^\/]+)\/(.*))$/)) {
|
||||
app.current.app = params[1];
|
||||
app.current.tab = undefined;
|
||||
app.current.view = undefined;
|
||||
app.apps[app.current.app].state = params[2];
|
||||
app.current.page = parseInt(params[3]);
|
||||
app.current.filter = params[4];
|
||||
app.current.search = params[5];
|
||||
|
||||
if ($('#cardQueue').hasClass('hide')) {
|
||||
app.prepare();
|
||||
if (app.current.search == '') {
|
||||
else if (app.current.app == 'Queue' ) {
|
||||
if (app.last.app != app.current.app) {
|
||||
if (app.current.search.length < 2) {
|
||||
setPagination(app.current.page);
|
||||
}
|
||||
$('#searchqueuetag > button').each(function() {
|
||||
@ -112,8 +122,6 @@ app.route=function() {
|
||||
$('#searchqueuetagdesc').text($(this).text());
|
||||
}
|
||||
});
|
||||
$('#cardQueue').removeClass('hide');
|
||||
$('#navQueue').addClass('active');
|
||||
}
|
||||
if (app.current.search.length >= 2) {
|
||||
socket.send('MPD_API_SEARCH_QUEUE,' + app.current.filter + ','+app.current.page+',' + app.current.search);
|
||||
@ -122,73 +130,21 @@ app.route=function() {
|
||||
socket.send('MPD_API_GET_QUEUE,'+app.current.page);
|
||||
}
|
||||
}
|
||||
else if (params=hash.match(/^\#\/(browse)(Playlists)\/((\d+)\/(\w|\!)\/)$/)) {
|
||||
app.current.app=params[1];
|
||||
app.current.tab=params[2];
|
||||
app.current.view=undefined;
|
||||
app.apps[app.current.app].active=params[2];
|
||||
app.apps[app.current.app].tabs[params[2]].state=params[3];
|
||||
app.current.page = parseInt(params[4]);
|
||||
app.current.filter = params[5];
|
||||
app.prepare();
|
||||
$('#navBrowse').addClass('active');
|
||||
$('#cardBrowse').removeClass('hide');
|
||||
$('#cardBrowsePlaylists').removeClass('hide');
|
||||
$('#cardBrowseNavPlaylists').addClass('active');
|
||||
else if (app.current.app == 'Browse' && app.current.tab == 'Playlists') {
|
||||
socket.send('MPD_API_GET_PLAYLISTS,'+app.current.page+','+app.current.filter);
|
||||
doSetFilterLetter('#browsePlaylistsFilter');
|
||||
}
|
||||
else if (params=hash.match(/^\#\/(browse)(Database)(Artist)\/((\d+)\/(\w|\!)\/)$/)) {
|
||||
app.current.app=params[1];
|
||||
app.current.tab=params[2];
|
||||
app.current.view=params[3];
|
||||
app.apps[app.current.app].active=params[2];
|
||||
app.apps[app.current.app].tabs[params[2]].active=params[3];
|
||||
app.apps[app.current.app].tabs[params[2]].views[params[3]].state=params[4];
|
||||
app.prepare();
|
||||
app.current.page = parseInt(params[5]);
|
||||
app.current.filter = params[6];
|
||||
$('#navBrowse').addClass('active');
|
||||
$('#cardBrowse').removeClass('hide');
|
||||
$('#cardBrowseDatabase').removeClass('hide');
|
||||
$('#cardBrowseNavDatabase').addClass('active');
|
||||
else if (app.current.app == 'Browse' && app.current.tab == 'Database' && app.current.view == 'Artist') {
|
||||
socket.send('MPD_API_GET_ARTISTS,' + app.current.page + ',' + app.current.filter);
|
||||
doSetFilterLetter('#browseDatabaseFilter');
|
||||
}
|
||||
else if (params=hash.match(/^\#\/(browse)(Database)(Album)\/((\d+)\/(\w|\!)\/(.*))$/)) {
|
||||
app.current.app=params[1];
|
||||
app.current.tab=params[2];
|
||||
app.current.view=params[3];
|
||||
app.apps[app.current.app].active=params[2];
|
||||
app.apps[app.current.app].tabs[params[2]].active=params[3];
|
||||
app.apps[app.current.app].tabs[params[2]].views[params[3]].state=params[4];
|
||||
app.prepare();
|
||||
app.current.page = parseInt(params[5]);
|
||||
app.current.filter = params[6];
|
||||
artist = params[7];
|
||||
$('#navBrowse').addClass('active');
|
||||
$('#cardBrowse').removeClass('hide');
|
||||
$('#cardBrowseDatabase').removeClass('hide');
|
||||
$('#cardBrowseNavDatabase').addClass('active');
|
||||
else if (app.current.app == 'Browse' && app.current.tab == 'Database' && app.current.view == 'Album') {
|
||||
socket.send('MPD_API_GET_ARTISTALBUMS,' + app.current.page+',' + app.current.filter + ',' + decodeURI(artist));
|
||||
doSetFilterLetter('#browseDatabaseFilter');
|
||||
}
|
||||
else if (params=hash.match(/^\#\/(browse)(Filesystem)\/((\d+)\/(\w|\!)\/(.*))$/)) {
|
||||
app.prepare();
|
||||
app.current.app=params[1];
|
||||
app.current.tab=params[2];
|
||||
app.current.view=undefined;
|
||||
app.apps[app.current.app].active=params[2];
|
||||
app.apps[app.current.app].tabs[params[2]].state=params[3];
|
||||
app.current.page = parseInt(params[4]);
|
||||
app.current.filter = params[5];
|
||||
app.current.search = params[6];
|
||||
$('#navBrowse').addClass('active');
|
||||
$('#cardBrowse').removeClass('hide');
|
||||
$('#cardBrowseFilesystem').removeClass('hide');
|
||||
$('#cardBrowseNavFilesystem').addClass('active');
|
||||
$('#browseBreadcrumb').empty().append("<li class=\"breadcrumb-item\"><a uri=\"\">root</a></li>");
|
||||
socket.send('MPD_API_GET_BROWSE,'+app.current.page+','+(app.current.search ? app.current.search : "/")+','+app.current.filter);
|
||||
else if (app.current.app == 'Browse' && app.current.tab == 'Filesystem') {
|
||||
$('#BrowseBreadcrumb').empty().append('<li class="breadcrumb-item"><a uri="">root</a></li>');
|
||||
socket.send('MPD_API_GET_BROWSE,'+app.current.page+','+(app.current.search ? app.current.search : '/')+','+app.current.filter);
|
||||
doSetFilterLetter('#browseFilesystemFilter');
|
||||
// Don't add all songs from root
|
||||
var add_all_songs = $('#browseFilesystemAddAllSongs');
|
||||
@ -206,28 +162,19 @@ app.route=function() {
|
||||
var full_path = "";
|
||||
$.each(path_array, function(index, chunk) {
|
||||
if(path_array.length - 1 == index) {
|
||||
$('#browseBreadcrumb').append("<li class=\"breadcrumb-item active\">"+ chunk + "</li>");
|
||||
$('#BrowseBreadcrumb').append("<li class=\"breadcrumb-item active\">"+ chunk + "</li>");
|
||||
return;
|
||||
}
|
||||
|
||||
full_path = full_path + chunk;
|
||||
$('#browseBreadcrumb').append("<li class=\"breadcrumb-item\"><a uri=\"" + full_path + "\">"+chunk+"</a></li>");
|
||||
$('#BrowseBreadcrumb').append("<li class=\"breadcrumb-item\"><a uri=\"" + full_path + "\">"+chunk+"</a></li>");
|
||||
full_path += "/";
|
||||
});
|
||||
}
|
||||
else if (params=hash.match(/^\#\/(search)\/((\d+)\/([^\/]+)\/(.*))$/)) {
|
||||
app.current.app=params[1];
|
||||
app.apps[app.current.app].state=params[2];
|
||||
app.current.tab=undefined;
|
||||
app.current.view=undefined;
|
||||
app.current.page = parseInt(params[3]);
|
||||
app.current.filter = params[4];
|
||||
app.current.search = params[5];
|
||||
|
||||
if ($('#cardSearch').hasClass('hide')) {
|
||||
app.prepare();
|
||||
else if (app.current.app == 'Search') {
|
||||
if (app.last.app != app.current.app) {
|
||||
if (app.current.search != '') {
|
||||
$('#searchList > tbody').append(
|
||||
$('#SearchList > tbody').append(
|
||||
"<tr><td><span class=\"material-icons\">search</span></td>" +
|
||||
"<td colspan=\"3\">Searching</td>" +
|
||||
"<td></td><td></td></tr>");
|
||||
@ -235,7 +182,6 @@ app.route=function() {
|
||||
else {
|
||||
setPagination(app.current.page);
|
||||
}
|
||||
$('#search > input').val(app.current.search);
|
||||
$('#searchstr2').val(app.current.search);
|
||||
$('#searchtags2 > button').each(function() {
|
||||
if ($(this).text == app.current.filter) {
|
||||
@ -243,19 +189,21 @@ app.route=function() {
|
||||
$('#searchtags2desc').text($(this).text);
|
||||
}
|
||||
});
|
||||
$('#cardSearch').removeClass('hide');
|
||||
$('#navSearch').addClass('active');
|
||||
}
|
||||
if (app.current.search.length >= 2) {
|
||||
socket.send('MPD_API_SEARCH,' + app.current.filter + ','+app.current.page+',' + app.current.search);
|
||||
} else {
|
||||
$('#searchList > tbody').empty();
|
||||
$('#SearchList > tbody').empty();
|
||||
$('#searchAddAllSongs').attr('disabled','disabled').addClass('disabled');
|
||||
}
|
||||
}
|
||||
else {
|
||||
app.goto("playback");
|
||||
app.goto("Playback");
|
||||
}
|
||||
|
||||
app.last.app=app.current.app;
|
||||
app.last.tab=app.current.tab;
|
||||
app.last.view=app.current.view;
|
||||
};
|
||||
|
||||
$(document).ready(function(){
|
||||
@ -346,7 +294,7 @@ function webSocketConnect() {
|
||||
case 'queuesearch':
|
||||
//Do the same as queue
|
||||
case 'queue':
|
||||
if(app.current.app !== 'queue')
|
||||
if(app.current.app !== 'Queue')
|
||||
break;
|
||||
$('#panel-heading-queue').empty();
|
||||
if (obj.totalEntities > 0) {
|
||||
@ -427,7 +375,7 @@ function webSocketConnect() {
|
||||
});
|
||||
break;
|
||||
case 'playlists':
|
||||
if(app.current.app !== 'browse' && app.current.tab !== 'Playlists')
|
||||
if(app.current.app !== 'Browse' && app.current.tab !== 'Playlists')
|
||||
break;
|
||||
var nrItems=0;
|
||||
var tr=document.getElementById(app.current.app+app.current.tab+'List').getElementsByTagName('tbody')[0].getElementsByTagName('tr');
|
||||
@ -481,7 +429,7 @@ function webSocketConnect() {
|
||||
break;
|
||||
|
||||
case 'listDBtags':
|
||||
if(app.current.app !== 'browse' && app.current.tab !== 'Database')
|
||||
if(app.current.app !== 'Browse' && app.current.tab !== 'Database')
|
||||
break;
|
||||
if (obj.tagtype == 'AlbumArtist') {
|
||||
$('#browseDatabaseAlbumCards').addClass('hide');
|
||||
@ -504,7 +452,7 @@ function webSocketConnect() {
|
||||
setPagination(obj.totalEntities);
|
||||
$('#'+app.current.app+app.current.tab+app.current.view+'List > tbody > tr').on({
|
||||
click: function() {
|
||||
app.goto('browse','Database','Album','0/!/'+$(this).attr('uri'));
|
||||
app.goto('Browse','Database','Album','0/-/'+$(this).attr('uri'));
|
||||
}
|
||||
});
|
||||
if (nrItems == 0) {
|
||||
@ -569,7 +517,7 @@ function webSocketConnect() {
|
||||
$('#searchAddAllSongs').attr('disabled','disabled').addClass('disabled');
|
||||
}
|
||||
case 'browse':
|
||||
if(app.current.app !== 'browse' && app.current.tab !== 'Filesystem' && app.current.app !== 'search')
|
||||
if(app.current.app !== 'Browse' && app.current.tab !== 'Filesystem' && app.current.app !== 'Search')
|
||||
break;
|
||||
|
||||
/* The use of encodeURI() below might seem useless, but it's not. It prevents
|
||||
@ -654,8 +602,8 @@ function webSocketConnect() {
|
||||
case 'dir':
|
||||
app.current.page = 0;
|
||||
app.current.search = $(this).attr("uri");
|
||||
$("#browseFilesystemList > a").attr("href", '#/browseFilesystem/'+app.current.page+'/'+app.current.filter+'/'+app.current.search);
|
||||
app.goto('browse','Filesystem',undefined,app.current.page+'/'+app.current.filter+'/'+app.current.search);
|
||||
$("#BrowseFilesystemList > a").attr("href", '#/Browse/Filesystem!'+app.current.page+'/'+app.current.filter+'/'+app.current.search);
|
||||
app.goto('Browse','Filesystem',undefined,app.current.page+'/'+app.current.filter+'/'+app.current.search);
|
||||
break;
|
||||
case 'song':
|
||||
socket.send("MPD_API_ADD_TRACK," + decodeURI($(this).attr("uri")));
|
||||
@ -669,12 +617,12 @@ function webSocketConnect() {
|
||||
}
|
||||
});
|
||||
|
||||
$('#browseBreadcrumb > li > a').on({
|
||||
$('#BrowseBreadcrumb > li > a').on({
|
||||
click: function() {
|
||||
app.current.page = 0;
|
||||
app.current.search = $(this).attr("uri");
|
||||
$("#browseFilesystemList > a").attr("href", '#/browseFilesystem/'+app.current.page+'/'+app.current.filter+'/'+app.current.search);
|
||||
app.goto('browse','Filesystem',undefined,app.current.page+'/'+app.current.filter+'/'+app.current.search);
|
||||
$("#BrowseFilesystemList > a").attr("href", '#/Browse/Filesystem!'+app.current.page+'/'+app.current.filter+'/'+app.current.search);
|
||||
app.goto('Browse','Filesystem',undefined,app.current.page+'/'+app.current.filter+'/'+app.current.search);
|
||||
}
|
||||
});
|
||||
|
||||
@ -1022,47 +970,47 @@ $('#btnrepeat').on('click', function (e) {
|
||||
});
|
||||
|
||||
$('#cardBrowseNavFilesystem').on('click', function (e) {
|
||||
app.goto('browse','Filesystem');
|
||||
app.goto('Browse','Filesystem');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#cardBrowseNavDatabase').on('click', function (e) {
|
||||
app.goto('browse','Database');
|
||||
app.goto('Browse','Database');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#btnBrowseDatabaseArtist').on('click', function (e) {
|
||||
app.goto('browse','Database','Artist');
|
||||
app.goto('Browse','Database','Artist');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#cardBrowseNavPlaylists').on('click', function (e) {
|
||||
app.goto('browse','Playlists');
|
||||
app.goto('Browse','Playlists');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#cardBrowseNavFilesystem').on('click', function (e) {
|
||||
app.goto('browse','Filesystem');
|
||||
app.goto('Browse','Filesystem');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#navPlayback').on('click', function (e) {
|
||||
app.goto('playback');
|
||||
app.goto('Playback');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#navQueue').on('click', function (e) {
|
||||
app.goto('queue');
|
||||
app.goto('Queue');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#navBrowse').on('click', function (e) {
|
||||
app.goto('browse');
|
||||
app.goto('Browse');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#navSearch').on('click', function (e) {
|
||||
app.goto('search');
|
||||
app.goto('Search');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
@ -1162,7 +1110,7 @@ $('#search > input').keypress(function (event) {
|
||||
});
|
||||
|
||||
$('#search').submit(function () {
|
||||
app.goto('search',undefined,undefined,app.current.page + '/Any Tag/' + $('#search > input').val());
|
||||
app.goto('Search',undefined,undefined,app.current.page + '/Any Tag/' + $('#search > input').val());
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -1173,7 +1121,7 @@ $('#search2').submit(function () {
|
||||
function addAllFromSearch() {
|
||||
if (app.current.search.length >= 2) {
|
||||
socket.send('MPD_API_SEARCH_ADD,' + app.current.filter + ',' + app.current.search);
|
||||
var rowCount = $('#searchList >tbody >tr').length;
|
||||
var rowCount = $('#SearchList >tbody >tr').length;
|
||||
showNotification('Added '+rowCount+' songs from search','','','success');
|
||||
}
|
||||
}
|
||||
@ -1181,7 +1129,7 @@ function addAllFromSearch() {
|
||||
$('#searchstr2').keyup(function (event) {
|
||||
app.current.page=0;
|
||||
app.current.search=$(this).val();
|
||||
app.goto('search',undefined,undefined,app.current.page + '/' + app.current.filter + '/' + app.current.search);
|
||||
app.goto('Search',undefined,undefined,app.current.page + '/' + app.current.filter + '/' + app.current.search);
|
||||
});
|
||||
|
||||
$('#searchtags2 > button').on('click',function (e) {
|
||||
@ -1350,7 +1298,7 @@ function doSetFilterLetter(x) {
|
||||
$(this).addClass('btn-success');
|
||||
}
|
||||
});
|
||||
} else if (app.current.filter != '!') {
|
||||
} else if (app.current.filter != '-') {
|
||||
$(x).text('Filter: '+app.current.filter);
|
||||
$(x+'Letters > button').each(function() {
|
||||
if ($(this).text() == app.current.filter) {
|
||||
@ -1363,7 +1311,7 @@ function doSetFilterLetter(x) {
|
||||
}
|
||||
|
||||
function add_filter (x) {
|
||||
$(x).append('<button class="mr-1 mb-1 btn btn-sm btn-secondary" onclick="setFilterLetter(\'!\');">'+
|
||||
$(x).append('<button class="mr-1 mb-1 btn btn-sm btn-secondary" onclick="setFilterLetter(\'-\');">'+
|
||||
'<span class="material-icons" style="font-size:14px;">delete</span></button>');
|
||||
$(x).append('<button class="mr-1 mb-1 btn btn-sm btn-secondary" onclick="setFilterLetter(\'0\');">#</button>');
|
||||
for (i = 65; i <= 90; i++) {
|
||||
|
@ -921,7 +921,7 @@ int mpd_put_browse(char *buffer, char *path, unsigned int offset, char *filter)
|
||||
case MPD_ENTITY_TYPE_SONG:
|
||||
song = mpd_entity_get_song(entity);
|
||||
entityName = mpd_get_title(song);
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,entityName,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,entityName,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*entityName) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
@ -950,7 +950,7 @@ int mpd_put_browse(char *buffer, char *path, unsigned int offset, char *filter)
|
||||
} else {
|
||||
dirName = strdup(entityName);
|
||||
}
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,dirName,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,dirName,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*dirName) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
@ -971,7 +971,7 @@ int mpd_put_browse(char *buffer, char *path, unsigned int offset, char *filter)
|
||||
} else {
|
||||
plName = strdup(entityName);
|
||||
}
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,plName,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,plName,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*plName) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
@ -1030,7 +1030,7 @@ int mympd_put_db_tag(char *buffer, unsigned int offset, char *mpdtagtype, char *
|
||||
while((pair = mpd_recv_pair_tag(mpd.conn, mpd_tag_name_parse(mpdtagtype))) != NULL) {
|
||||
entity_count ++;
|
||||
if(entity_count > offset && entity_count <= offset+MAX_ELEMENTS_PER_PAGE) {
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,pair->value,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,pair->value,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*pair->value) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
@ -1145,7 +1145,7 @@ int mympd_put_playlists(char *buffer, unsigned int offset, char *filter)
|
||||
entity_count ++;
|
||||
if(entity_count > offset && entity_count <= offset+MAX_ELEMENTS_PER_PAGE) {
|
||||
plpath = mpd_playlist_get_path(pl);
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,plpath,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,plpath,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*plpath) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
|
Loading…
Reference in New Issue
Block a user