diff --git a/ApiClient.js b/ApiClient.js index 36476511ec..de96c4de94 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -506,6 +506,20 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; + self.createLiveTvTimer = function (options) { + + if (!options) { + throw new Error("null options"); + } + + var url = self.getUrl("LiveTv/Timers", options); + + return self.ajax({ + type: "POST", + url: url + }); + }; + /** * Gets the current server status */ @@ -1019,9 +1033,11 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi /** * Gets the server's scheduled tasks */ - self.getScheduledTasks = function () { + self.getScheduledTasks = function (options) { - var url = self.getUrl("ScheduledTasks"); + options = options || {}; + + var url = self.getUrl("ScheduledTasks", options); return self.ajax({ type: "GET", diff --git a/dashboard-ui/css/images/mblogoicon.png b/dashboard-ui/css/images/mblogoicon.png index fc266e2e17..9762648d3f 100644 Binary files a/dashboard-ui/css/images/mblogoicon.png and b/dashboard-ui/css/images/mblogoicon.png differ diff --git a/dashboard-ui/css/images/userdata/playedoff.png b/dashboard-ui/css/images/userdata/checkedoff.png similarity index 100% rename from dashboard-ui/css/images/userdata/playedoff.png rename to dashboard-ui/css/images/userdata/checkedoff.png diff --git a/dashboard-ui/css/images/userdata/playedon.png b/dashboard-ui/css/images/userdata/checkedon.png similarity index 100% rename from dashboard-ui/css/images/userdata/playedon.png rename to dashboard-ui/css/images/userdata/checkedon.png diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 1825303123..2753c1cc93 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -362,7 +362,7 @@ a.itemTag:hover { } .itemBackdropContent { - height: 230px; + height: 245px; } .lnkSibling { @@ -396,7 +396,7 @@ a.itemTag:hover { } .itemDetailImage { - height: 240px; + height: 255px; -moz-box-shadow: 0px 0 20px #000; -webkit-box-shadow: 0px 0 20px #000; box-shadow: 0px 0 20px #000; diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 3601edd1e4..7b4751a162 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -717,8 +717,8 @@ progress { /* Detail Page*/ .imgUserItemRating { - height: 17px; - width: 17px; + height: 16px; + width: 16px; margin-right: 1em; cursor: pointer; vertical-align: top; @@ -728,10 +728,6 @@ progress { opacity: .5; } -.imgPlayed, .imgPlayedOff { - border-radius: 4px; -} - /* Now playing bar */ #nowPlayingBar { padding: 6px .5em; @@ -1042,6 +1038,34 @@ input[type="range"]::-ms-fill-upper { } } +@media (min-width: 1700px) { + .itemVideo:not(.fullscreenVideo) { + width: 500px; + } + + .positionSlider { + width: 500px; + } + + .itemVideo { + left: -660px; + } +} + +@media (min-width: 2400px) { + .itemVideo:not(.fullscreenVideo) { + width: 550px; + } + + .positionSlider { + width: 550px; + } + + .itemVideo { + left: -710px; + } +} + #editItemMetadataPage #txtOverview { height: 70px; } diff --git a/dashboard-ui/css/tileitem.css b/dashboard-ui/css/tileitem.css index 34060b9f23..a032e91772 100644 --- a/dashboard-ui/css/tileitem.css +++ b/dashboard-ui/css/tileitem.css @@ -112,11 +112,6 @@ font-weight: normal; } -.tileItem .userDataIcons img { - height: 18px; - width: 18px; -} - @media all and (min-width: 540px) { .tileItem { @@ -190,10 +185,6 @@ display: inline-block; } - .smallBackdropTileItem .tileImage { - height: 95px; - } - .backdropTileItem .tileImage { height: 105px; } @@ -257,10 +248,6 @@ .smallPosterTileItem { width: 22%; } - - .smallBackdropTileItem { - width: 30%; - } } @media all and (min-width: 1440px) { diff --git a/dashboard-ui/edititemmetadata.html b/dashboard-ui/edititemmetadata.html index 208e354d59..458662c1a4 100644 --- a/dashboard-ui/edititemmetadata.html +++ b/dashboard-ui/edititemmetadata.html @@ -48,7 +48,7 @@
@@ -152,7 +152,7 @@ - Add + Add @@ -214,28 +214,28 @@
- + @@ -291,7 +291,7 @@
- Add + Add
@@ -301,7 +301,7 @@
- Add + Add
@@ -311,7 +311,7 @@
- Add + Add
diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js index c4d18a3be3..e523c83630 100644 --- a/dashboard-ui/scripts/Itemdetailpage.js +++ b/dashboard-ui/scripts/Itemdetailpage.js @@ -399,7 +399,7 @@ var options = { userId: Dashboard.getCurrentUserId(), - limit: item.Type == "MusicAlbum" ? 6 : 8, + limit: item.Type == "MusicAlbum" ? 6 : 6, fields: "PrimaryImageAspectRatio,DateCreated,UserData" }; diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 06e9322fbe..43e4ad0c44 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1506,9 +1506,9 @@ if ((item.MediaType || item.IsFolder) && item.Type != "Channel" && item.Type != "MusicArtist") { if (userData.Played) { - html += 'Played'; + html += 'Played'; } else { - html += 'Played'; + html += 'Played'; } } @@ -1549,10 +1549,10 @@ } if (markAsPlayed) { - link.src = "css/images/userdata/playedon.png"; + link.src = "css/images/userdata/checkedon.png"; $link.addClass('imgPlayed').removeClass('imgPlayedOff'); } else { - link.src = "css/images/userdata/playedoff.png"; + link.src = "css/images/userdata/checkedoff.png"; $link.addClass('imgPlayedOff').removeClass('imgPlayed'); } }, @@ -1713,53 +1713,55 @@ var url; + var imageHeight = 510; + if (imageTags.Primary) { if (item.Type == "Channel") { url = ApiClient.getUrl("LiveTV/Channels/" + item.Id + "/Images/Primary", { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Primary, type: "Primary" }); } else if (item.Type == "Person") { url = ApiClient.getPersonImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Primary, type: "Primary" }); } else if (item.Type == "Genre") { url = ApiClient.getGenreImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Primary, type: "Primary" }); } else if (item.Type == "MusicGenre") { url = ApiClient.getMusicGenreImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Primary, type: "Primary" }); } else if (item.Type == "GameGenre") { url = ApiClient.getGameGenreImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Primary, type: "Primary" }); } else if (item.Type == "Studio") { url = ApiClient.getStudioImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Primary, type: "Primary" }); } else if (item.Type == "MusicArtist") { url = ApiClient.getArtistImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Primary, type: "Primary" }); @@ -1767,7 +1769,7 @@ else { url = ApiClient.getImageUrl(item.Id, { type: "Primary", - maxheight: 480, + maxheight: imageHeight, tag: item.ImageTags.Primary }); } @@ -1776,42 +1778,42 @@ if (item.Type == "Person") { url = ApiClient.getPersonImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: item.BackdropImageTags[0], type: "Backdrop" }); } else if (item.Type == "Genre") { url = ApiClient.getGenreImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: item.BackdropImageTags[0], type: "Backdrop" }); } else if (item.Type == "MusicGenre") { url = ApiClient.getMusicGenreImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: item.BackdropImageTags[0], type: "Backdrop" }); } else if (item.Type == "GameGenre") { url = ApiClient.getGameGenreImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: item.BackdropImageTags[0], type: "Backdrop" }); } else if (item.Type == "Studio") { url = ApiClient.getStudioImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: item.BackdropImageTags[0], type: "Backdrop" }); } else if (item.Type == "MusicArtist") { url = ApiClient.getArtistImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: item.BackdropImageTags[0], type: "Backdrop" }); @@ -1819,7 +1821,7 @@ else { url = ApiClient.getImageUrl(item.Id, { type: "Backdrop", - maxheight: 480, + maxheight: imageHeight, tag: item.BackdropImageTags[0] }); } @@ -1828,42 +1830,42 @@ if (item.Type == "Person") { url = ApiClient.getPersonImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Thumb, type: "Thumb" }); } else if (item.Type == "Genre") { url = ApiClient.getGenreImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Thumb, type: "Thumb" }); } else if (item.Type == "MusicGenre") { url = ApiClient.getMusicGenreImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Thumb, type: "Thumb" }); } else if (item.Type == "GameGenre") { url = ApiClient.getGameGenreImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Thumb, type: "Thumb" }); } else if (item.Type == "Studio") { url = ApiClient.getStudioImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Thumb, type: "Thumb" }); } else if (item.Type == "MusicArtist") { url = ApiClient.getArtistImageUrl(item.Name, { - maxheight: 480, + maxheight: imageHeight, tag: imageTags.Thumb, type: "Thumb" }); @@ -1871,7 +1873,7 @@ else { url = ApiClient.getImageUrl(item.Id, { type: "Thumb", - maxheight: 480, + maxheight: imageHeight, tag: item.ImageTags.Thumb }); } @@ -1880,7 +1882,7 @@ url = ApiClient.getImageUrl(item.Id, { type: "Disc", - maxheight: 480, + maxheight: imageHeight, tag: item.ImageTags.Disc }); } @@ -1888,7 +1890,7 @@ url = ApiClient.getImageUrl(item.AlbumId, { type: "Primary", - maxheight: 480, + maxheight: imageHeight, tag: item.AlbumPrimaryImageTag }); @@ -2007,7 +2009,7 @@ } } - if (item.RunTimeTicks) { + if (item.RunTimeTicks && item.Type != "Series") { if (item.Type == "Audio") { @@ -2349,7 +2351,7 @@ if (user.PrimaryImageTag) { var url = ApiClient.getUserImageUrl(user.Id, { - width: 225, + height: 40, tag: user.PrimaryImageTag, type: "Primary" }); diff --git a/dashboard-ui/scripts/livetvrecordings.js b/dashboard-ui/scripts/livetvrecordings.js index ba26349e4f..f057c635d5 100644 --- a/dashboard-ui/scripts/livetvrecordings.js +++ b/dashboard-ui/scripts/livetvrecordings.js @@ -1,7 +1,30 @@ (function ($, document, apiClient) { + function playRecording(page, id) { + + } + + function deleteRecording(page, id) { + + Dashboard.confirm("Are you sure you wish to delete this recording?", "Confirm Recording Deletion", function (result) { + + if (result) { + + Dashboard.showLoadingMsg(); + + ApiClient.deleteLiveTvRecording(id).done(function () { + + Dashboard.alert('Recording deleted'); + + reload(page); + }); + } + + }); + } + function renderRecordings(page, recordings) { - + var html = ''; var cssClass = "detailTable"; @@ -28,7 +51,6 @@ html += ''; html += ''; - html += ''; html += ''; html += ''; @@ -59,17 +81,35 @@ html += ''; var elem = $('#items', page).html(html).trigger('create'); + + $('.btnPlayRecording', elem).on('click', function () { + + var recordingId = this.getAttribute('data-recordingid'); + + playRecording(page, recordingId); + }); + + $('.btnDeleteRecording', elem).on('click', function () { + + var recordingId = this.getAttribute('data-recordingid'); + + deleteRecording(page, recordingId); + }); + + Dashboard.hideLoadingMsg(); } - + function reload(page) { - apiClient.getLiveTvRecordings().done(function(result) { + Dashboard.showLoadingMsg(); + + apiClient.getLiveTvRecordings().done(function (result) { renderRecordings(page, result.Items); }); } - + $(document).on('pagebeforeshow', "#liveTvRecordingsPage", function () { var page = this; diff --git a/dashboard-ui/scripts/livetvtimers.js b/dashboard-ui/scripts/livetvtimers.js index e04e202881..3c93f46525 100644 --- a/dashboard-ui/scripts/livetvtimers.js +++ b/dashboard-ui/scripts/livetvtimers.js @@ -1,5 +1,28 @@ (function ($, document, apiClient) { + function editTimer(page, id) { + + } + + function deleteTimer(page, id) { + + Dashboard.confirm("Are you sure you wish to delete this timer?", "Confirm Timer Deletion", function (result) { + + if (result) { + + Dashboard.showLoadingMsg(); + + ApiClient.cancelLiveTvTimer(id).done(function () { + + Dashboard.alert('Timer deleted'); + + reload(page); + }); + } + + }); + } + function renderTimers(page, timers) { var html = ''; @@ -61,6 +84,20 @@ html += ''; var elem = $('#items', page).html(html).trigger('create'); + + $('.btnEditTimer', elem).on('click', function () { + + var id = this.getAttribute('data-timerid'); + + editTimer(page, id); + }); + + $('.btnDeleteTimer', elem).on('click', function () { + + var id = this.getAttribute('data-timerid'); + + deleteTimer(page, id); + }); } function reload(page) { diff --git a/dashboard-ui/scripts/scheduledtaskspage.js b/dashboard-ui/scripts/scheduledtaskspage.js index e9e87a9deb..9637680c56 100644 --- a/dashboard-ui/scripts/scheduledtaskspage.js +++ b/dashboard-ui/scripts/scheduledtaskspage.js @@ -6,7 +6,7 @@ stopInterval(); } - ApiClient.getScheduledTasks().done(function (tasks) { + ApiClient.getScheduledTasks({isHidden: false}).done(function (tasks) { if (updateInterval) { populateList(page, tasks); diff --git a/packages.config b/packages.config index 25938a358a..a839ece186 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file