1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

support deleting and canceling live tv recordings and timers

This commit is contained in:
Luke Pulverenti 2013-11-29 11:58:24 -05:00
parent 8dd607af86
commit ac0cc84f9d
14 changed files with 181 additions and 75 deletions

View file

@ -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 * Gets the current server status
*/ */
@ -1019,9 +1033,11 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
/** /**
* Gets the server's scheduled tasks * 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({ return self.ajax({
type: "GET", type: "GET",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Before After
Before After

View file

@ -362,7 +362,7 @@ a.itemTag:hover {
} }
.itemBackdropContent { .itemBackdropContent {
height: 230px; height: 245px;
} }
.lnkSibling { .lnkSibling {
@ -396,7 +396,7 @@ a.itemTag:hover {
} }
.itemDetailImage { .itemDetailImage {
height: 240px; height: 255px;
-moz-box-shadow: 0px 0 20px #000; -moz-box-shadow: 0px 0 20px #000;
-webkit-box-shadow: 0px 0 20px #000; -webkit-box-shadow: 0px 0 20px #000;
box-shadow: 0px 0 20px #000; box-shadow: 0px 0 20px #000;

View file

@ -717,8 +717,8 @@ progress {
/* Detail Page*/ /* Detail Page*/
.imgUserItemRating { .imgUserItemRating {
height: 17px; height: 16px;
width: 17px; width: 16px;
margin-right: 1em; margin-right: 1em;
cursor: pointer; cursor: pointer;
vertical-align: top; vertical-align: top;
@ -728,10 +728,6 @@ progress {
opacity: .5; opacity: .5;
} }
.imgPlayed, .imgPlayedOff {
border-radius: 4px;
}
/* Now playing bar */ /* Now playing bar */
#nowPlayingBar { #nowPlayingBar {
padding: 6px .5em; 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 { #editItemMetadataPage #txtOverview {
height: 70px; height: 70px;
} }

View file

@ -112,11 +112,6 @@
font-weight: normal; font-weight: normal;
} }
.tileItem .userDataIcons img {
height: 18px;
width: 18px;
}
@media all and (min-width: 540px) { @media all and (min-width: 540px) {
.tileItem { .tileItem {
@ -190,10 +185,6 @@
display: inline-block; display: inline-block;
} }
.smallBackdropTileItem .tileImage {
height: 95px;
}
.backdropTileItem .tileImage { .backdropTileItem .tileImage {
height: 105px; height: 105px;
} }
@ -257,10 +248,6 @@
.smallPosterTileItem { .smallPosterTileItem {
width: 22%; width: 22%;
} }
.smallBackdropTileItem {
width: 30%;
}
} }
@media all and (min-width: 1440px) { @media all and (min-width: 1440px) {

View file

@ -48,7 +48,7 @@
</div> </div>
<div style="vertical-align: bottom; display: inline-block;"> <div style="vertical-align: bottom; display: inline-block;">
<div id="fldDelete" style="display: none;"> <div id="fldDelete" style="display: none;">
<button id="btnDelete" type="button" data-icon="delete" data-mini="true" data-theme="a" data-inline="true">Delete</button> <button id="btnDelete" type="button" data-icon="delete" data-mini="true" data-inline="true">Delete Item</button>
</div> </div>
</div> </div>
</div> </div>
@ -152,7 +152,7 @@
<option value='Saturday'>Saturday</option> <option value='Saturday'>Saturday</option>
<option value='Sunday'>Sunday</option> <option value='Sunday'>Sunday</option>
</select> </select>
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this,EditItemMetadataPage.sortDaysOfTheWeek)">Add</a> <a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this,EditItemMetadataPage.sortDaysOfTheWeek)" style="vertical-align: top;">Add</a>
</div> </div>
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listAirDays"></ul> <ul data-role="listview" data-inset="true" data-split-icon="delete" id="listAirDays"></ul>
</div> </div>
@ -214,28 +214,28 @@
<div style="display: inline-block; width: 250px;"> <div style="display: inline-block; width: 250px;">
<input class="txtProviderId" id="txtGamesDb" name="txtGamesDb" data-mini="true" /> <input class="txtProviderId" id="txtGamesDb" name="txtGamesDb" data-mini="true" />
</div> </div>
<a id="btnOpenGamesDb" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button"></a> <a id="btnOpenGamesDb" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button" style="vertical-align: top;"></a>
</div> </div>
<div data-role="fieldcontain" id="fldImdb" style="display: none;"> <div data-role="fieldcontain" id="fldImdb" style="display: none;">
<label for="txtImdb">Imdb:</label> <label for="txtImdb">Imdb:</label>
<div style="display: inline-block; width: 250px;"> <div style="display: inline-block; width: 250px;">
<input class="txtProviderId" id="txtImdb" name="txtImdb" data-mini="true" /> <input class="txtProviderId" id="txtImdb" name="txtImdb" data-mini="true" />
</div> </div>
<a id="btnOpenImdb" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button"></a> <a id="btnOpenImdb" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button" style="vertical-align: top;"></a>
</div> </div>
<div data-role="fieldcontain" id="fldMusicBrainz" style="display: none;"> <div data-role="fieldcontain" id="fldMusicBrainz" style="display: none;">
<label for="txtMusicBrainz">MusicBrainz:</label> <label for="txtMusicBrainz">MusicBrainz:</label>
<div style="display: inline-block; width: 250px;"> <div style="display: inline-block; width: 250px;">
<input class="txtProviderId" id="txtMusicBrainz" name="txtMusicBrainz" data-mini="true" /> <input class="txtProviderId" id="txtMusicBrainz" name="txtMusicBrainz" data-mini="true" />
</div> </div>
<a id="btnOpenMusicbrainz" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button"></a> <a id="btnOpenMusicbrainz" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button" style="vertical-align: top;"></a>
</div> </div>
<div data-role="fieldcontain" id="fldMusicBrainzReleaseGroupId" style="display: none;"> <div data-role="fieldcontain" id="fldMusicBrainzReleaseGroupId" style="display: none;">
<label for="txtMusicBrainzReleaseGroupId">MusicBrainz Release Group Id:</label> <label for="txtMusicBrainzReleaseGroupId">MusicBrainz Release Group Id:</label>
<div style="display: inline-block; width: 250px;"> <div style="display: inline-block; width: 250px;">
<input class="txtProviderId" id="txtMusicBrainzReleaseGroupId" name="txtMusicBrainzReleaseGroupId" data-mini="true" /> <input class="txtProviderId" id="txtMusicBrainzReleaseGroupId" name="txtMusicBrainzReleaseGroupId" data-mini="true" />
</div> </div>
<a id="btnOpenMusicbrainzReleaseGroup" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button"></a> <a id="btnOpenMusicbrainzReleaseGroup" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button" style="vertical-align: top;"></a>
</div> </div>
<div data-role="fieldcontain" id="fldRottenTomatoes" style="display: none;"> <div data-role="fieldcontain" id="fldRottenTomatoes" style="display: none;">
<label for="txtRottenTomatoes">Rotten Tomatoes:</label> <label for="txtRottenTomatoes">Rotten Tomatoes:</label>
@ -248,14 +248,14 @@
<div style="display: inline-block; width: 250px;"> <div style="display: inline-block; width: 250px;">
<input class="txtProviderId" id="txtTmdb" name="txtTmdb" data-mini="true" /> <input class="txtProviderId" id="txtTmdb" name="txtTmdb" data-mini="true" />
</div> </div>
<a id="btnOpenTmdb" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button"></a> <a id="btnOpenTmdb" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button" style="vertical-align: top;"></a>
</div> </div>
<div data-role="fieldcontain" id="fldTvdb" style="display: none;"> <div data-role="fieldcontain" id="fldTvdb" style="display: none;">
<label for="txtTvdb">TheTVDB:</label> <label for="txtTvdb">TheTVDB:</label>
<div style="display: inline-block; width: 250px;"> <div style="display: inline-block; width: 250px;">
<input class="txtProviderId" id="txtTvdb" name="txtTvdb" data-mini="true" /> <input class="txtProviderId" id="txtTvdb" name="txtTvdb" data-mini="true" />
</div> </div>
<a id="btnOpenTvdb" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button"></a> <a id="btnOpenTvdb" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button" style="vertical-align: top;"></a>
</div> </div>
<div data-role="fieldcontain" id="fldTvCom" style="display: none;"> <div data-role="fieldcontain" id="fldTvCom" style="display: none;">
<label for="txtTvCom">TV.com:</label> <label for="txtTvCom">TV.com:</label>
@ -268,21 +268,21 @@
<div style="display: inline-block; width: 250px;"> <div style="display: inline-block; width: 250px;">
<input class="txtProviderId" id="txtZap2It" name="txtZap2It" data-mini="true" /> <input class="txtProviderId" id="txtZap2It" name="txtZap2It" data-mini="true" />
</div> </div>
<a id="btnOpenZap2It" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button"></a> <a id="btnOpenZap2It" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button" style="vertical-align: top;"></a>
</div> </div>
<div data-role="fieldcontain" id="fldNesBoxName" style="display: none;"> <div data-role="fieldcontain" id="fldNesBoxName" style="display: none;">
<label for="txtNesBoxName">NES/SNESbox Name:</label> <label for="txtNesBoxName">NES/SNESbox Name:</label>
<div style="display: inline-block; width: 250px;"> <div style="display: inline-block; width: 250px;">
<input class="txtProviderId" id="txtNesBoxName" name="txtNesBoxName" data-mini="true" /> <input class="txtProviderId" id="txtNesBoxName" name="txtNesBoxName" data-mini="true" />
</div> </div>
<a id="btnOpenNesBox" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button"></a> <a id="btnOpenNesBox" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button" style="vertical-align: top;"></a>
</div> </div>
<div data-role="fieldcontain" id="fldNesBoxRom" style="display: none;"> <div data-role="fieldcontain" id="fldNesBoxRom" style="display: none;">
<label for="txtNesBoxRom">NES/SNESbox Game Id:</label> <label for="txtNesBoxRom">NES/SNESbox Game Id:</label>
<div style="display: inline-block; width: 250px;"> <div style="display: inline-block; width: 250px;">
<input class="txtProviderId" id="txtNesBoxRom" name="txtNesBoxRom" data-mini="true" /> <input class="txtProviderId" id="txtNesBoxRom" name="txtNesBoxRom" data-mini="true" />
</div> </div>
<a id="btnOpenNesBoxRom" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button"></a> <a id="btnOpenNesBoxRom" href="#" target="_blank" data-icon="arrow-right" data-inline="true" data-iconpos="notext" data-role="button" style="vertical-align: top;"></a>
</div> </div>
</div> </div>
</div> </div>
@ -291,7 +291,7 @@
<div data-role="editableListviewContainer"> <div data-role="editableListviewContainer">
<div data-role="fieldcontain"> <div data-role="fieldcontain">
<input type="text" data-mini="true" /> <input type="text" data-mini="true" />
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this)">Add</a> <a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this)" style="vertical-align: top;">Add</a>
</div> </div>
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listGenres"></ul> <ul data-role="listview" data-inset="true" data-split-icon="delete" id="listGenres"></ul>
</div> </div>
@ -301,7 +301,7 @@
<div data-role="editableListviewContainer"> <div data-role="editableListviewContainer">
<div data-role="fieldcontain"> <div data-role="fieldcontain">
<input type="text" data-mini="true" /> <input type="text" data-mini="true" />
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this)">Add</a> <a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this)" style="vertical-align: top;">Add</a>
</div> </div>
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listStudios"></ul> <ul data-role="listview" data-inset="true" data-split-icon="delete" id="listStudios"></ul>
</div> </div>
@ -311,7 +311,7 @@
<div data-role="editableListviewContainer"> <div data-role="editableListviewContainer">
<div data-role="fieldcontain"> <div data-role="fieldcontain">
<input type="text" data-mini="true" /> <input type="text" data-mini="true" />
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this)">Add</a> <a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this)" style="vertical-align: top;">Add</a>
</div> </div>
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listTags"></ul> <ul data-role="listview" data-inset="true" data-split-icon="delete" id="listTags"></ul>
</div> </div>

View file

@ -399,7 +399,7 @@
var options = { var options = {
userId: Dashboard.getCurrentUserId(), userId: Dashboard.getCurrentUserId(),
limit: item.Type == "MusicAlbum" ? 6 : 8, limit: item.Type == "MusicAlbum" ? 6 : 6,
fields: "PrimaryImageAspectRatio,DateCreated,UserData" fields: "PrimaryImageAspectRatio,DateCreated,UserData"
}; };

View file

@ -1506,9 +1506,9 @@
if ((item.MediaType || item.IsFolder) && item.Type != "Channel" && item.Type != "MusicArtist") { if ((item.MediaType || item.IsFolder) && item.Type != "Channel" && item.Type != "MusicArtist") {
if (userData.Played) { if (userData.Played) {
html += '<img data-type="' + type + '" data-itemid="' + itemId + '" class="imgUserItemRating imgPlayed" src="css/images/userdata/playedon.png" alt="Played" title="Played" onclick="LibraryBrowser.markPlayed(this);return false;" />'; html += '<img data-type="' + type + '" data-itemid="' + itemId + '" class="imgUserItemRating imgPlayed" src="css/images/userdata/checkedon.png" alt="Played" title="Played" onclick="LibraryBrowser.markPlayed(this);return false;" />';
} else { } else {
html += '<img data-type="' + type + '" data-itemid="' + itemId + '" class="imgUserItemRating imgPlayedOff" src="css/images/userdata/playedoff.png" alt="Played" title="Played" onclick="LibraryBrowser.markPlayed(this);return false;" />'; html += '<img data-type="' + type + '" data-itemid="' + itemId + '" class="imgUserItemRating imgPlayedOff" src="css/images/userdata/checkedoff.png" alt="Played" title="Played" onclick="LibraryBrowser.markPlayed(this);return false;" />';
} }
} }
@ -1549,10 +1549,10 @@
} }
if (markAsPlayed) { if (markAsPlayed) {
link.src = "css/images/userdata/playedon.png"; link.src = "css/images/userdata/checkedon.png";
$link.addClass('imgPlayed').removeClass('imgPlayedOff'); $link.addClass('imgPlayed').removeClass('imgPlayedOff');
} else { } else {
link.src = "css/images/userdata/playedoff.png"; link.src = "css/images/userdata/checkedoff.png";
$link.addClass('imgPlayedOff').removeClass('imgPlayed'); $link.addClass('imgPlayedOff').removeClass('imgPlayed');
} }
}, },
@ -1713,53 +1713,55 @@
var url; var url;
var imageHeight = 510;
if (imageTags.Primary) { if (imageTags.Primary) {
if (item.Type == "Channel") { if (item.Type == "Channel") {
url = ApiClient.getUrl("LiveTV/Channels/" + item.Id + "/Images/Primary", { url = ApiClient.getUrl("LiveTV/Channels/" + item.Id + "/Images/Primary", {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Primary, tag: imageTags.Primary,
type: "Primary" type: "Primary"
}); });
} }
else if (item.Type == "Person") { else if (item.Type == "Person") {
url = ApiClient.getPersonImageUrl(item.Name, { url = ApiClient.getPersonImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Primary, tag: imageTags.Primary,
type: "Primary" type: "Primary"
}); });
} }
else if (item.Type == "Genre") { else if (item.Type == "Genre") {
url = ApiClient.getGenreImageUrl(item.Name, { url = ApiClient.getGenreImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Primary, tag: imageTags.Primary,
type: "Primary" type: "Primary"
}); });
} }
else if (item.Type == "MusicGenre") { else if (item.Type == "MusicGenre") {
url = ApiClient.getMusicGenreImageUrl(item.Name, { url = ApiClient.getMusicGenreImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Primary, tag: imageTags.Primary,
type: "Primary" type: "Primary"
}); });
} }
else if (item.Type == "GameGenre") { else if (item.Type == "GameGenre") {
url = ApiClient.getGameGenreImageUrl(item.Name, { url = ApiClient.getGameGenreImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Primary, tag: imageTags.Primary,
type: "Primary" type: "Primary"
}); });
} }
else if (item.Type == "Studio") { else if (item.Type == "Studio") {
url = ApiClient.getStudioImageUrl(item.Name, { url = ApiClient.getStudioImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Primary, tag: imageTags.Primary,
type: "Primary" type: "Primary"
}); });
} }
else if (item.Type == "MusicArtist") { else if (item.Type == "MusicArtist") {
url = ApiClient.getArtistImageUrl(item.Name, { url = ApiClient.getArtistImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Primary, tag: imageTags.Primary,
type: "Primary" type: "Primary"
}); });
@ -1767,7 +1769,7 @@
else { else {
url = ApiClient.getImageUrl(item.Id, { url = ApiClient.getImageUrl(item.Id, {
type: "Primary", type: "Primary",
maxheight: 480, maxheight: imageHeight,
tag: item.ImageTags.Primary tag: item.ImageTags.Primary
}); });
} }
@ -1776,42 +1778,42 @@
if (item.Type == "Person") { if (item.Type == "Person") {
url = ApiClient.getPersonImageUrl(item.Name, { url = ApiClient.getPersonImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: item.BackdropImageTags[0], tag: item.BackdropImageTags[0],
type: "Backdrop" type: "Backdrop"
}); });
} }
else if (item.Type == "Genre") { else if (item.Type == "Genre") {
url = ApiClient.getGenreImageUrl(item.Name, { url = ApiClient.getGenreImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: item.BackdropImageTags[0], tag: item.BackdropImageTags[0],
type: "Backdrop" type: "Backdrop"
}); });
} }
else if (item.Type == "MusicGenre") { else if (item.Type == "MusicGenre") {
url = ApiClient.getMusicGenreImageUrl(item.Name, { url = ApiClient.getMusicGenreImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: item.BackdropImageTags[0], tag: item.BackdropImageTags[0],
type: "Backdrop" type: "Backdrop"
}); });
} }
else if (item.Type == "GameGenre") { else if (item.Type == "GameGenre") {
url = ApiClient.getGameGenreImageUrl(item.Name, { url = ApiClient.getGameGenreImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: item.BackdropImageTags[0], tag: item.BackdropImageTags[0],
type: "Backdrop" type: "Backdrop"
}); });
} }
else if (item.Type == "Studio") { else if (item.Type == "Studio") {
url = ApiClient.getStudioImageUrl(item.Name, { url = ApiClient.getStudioImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: item.BackdropImageTags[0], tag: item.BackdropImageTags[0],
type: "Backdrop" type: "Backdrop"
}); });
} }
else if (item.Type == "MusicArtist") { else if (item.Type == "MusicArtist") {
url = ApiClient.getArtistImageUrl(item.Name, { url = ApiClient.getArtistImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: item.BackdropImageTags[0], tag: item.BackdropImageTags[0],
type: "Backdrop" type: "Backdrop"
}); });
@ -1819,7 +1821,7 @@
else { else {
url = ApiClient.getImageUrl(item.Id, { url = ApiClient.getImageUrl(item.Id, {
type: "Backdrop", type: "Backdrop",
maxheight: 480, maxheight: imageHeight,
tag: item.BackdropImageTags[0] tag: item.BackdropImageTags[0]
}); });
} }
@ -1828,42 +1830,42 @@
if (item.Type == "Person") { if (item.Type == "Person") {
url = ApiClient.getPersonImageUrl(item.Name, { url = ApiClient.getPersonImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Thumb, tag: imageTags.Thumb,
type: "Thumb" type: "Thumb"
}); });
} }
else if (item.Type == "Genre") { else if (item.Type == "Genre") {
url = ApiClient.getGenreImageUrl(item.Name, { url = ApiClient.getGenreImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Thumb, tag: imageTags.Thumb,
type: "Thumb" type: "Thumb"
}); });
} }
else if (item.Type == "MusicGenre") { else if (item.Type == "MusicGenre") {
url = ApiClient.getMusicGenreImageUrl(item.Name, { url = ApiClient.getMusicGenreImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Thumb, tag: imageTags.Thumb,
type: "Thumb" type: "Thumb"
}); });
} }
else if (item.Type == "GameGenre") { else if (item.Type == "GameGenre") {
url = ApiClient.getGameGenreImageUrl(item.Name, { url = ApiClient.getGameGenreImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Thumb, tag: imageTags.Thumb,
type: "Thumb" type: "Thumb"
}); });
} }
else if (item.Type == "Studio") { else if (item.Type == "Studio") {
url = ApiClient.getStudioImageUrl(item.Name, { url = ApiClient.getStudioImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Thumb, tag: imageTags.Thumb,
type: "Thumb" type: "Thumb"
}); });
} }
else if (item.Type == "MusicArtist") { else if (item.Type == "MusicArtist") {
url = ApiClient.getArtistImageUrl(item.Name, { url = ApiClient.getArtistImageUrl(item.Name, {
maxheight: 480, maxheight: imageHeight,
tag: imageTags.Thumb, tag: imageTags.Thumb,
type: "Thumb" type: "Thumb"
}); });
@ -1871,7 +1873,7 @@
else { else {
url = ApiClient.getImageUrl(item.Id, { url = ApiClient.getImageUrl(item.Id, {
type: "Thumb", type: "Thumb",
maxheight: 480, maxheight: imageHeight,
tag: item.ImageTags.Thumb tag: item.ImageTags.Thumb
}); });
} }
@ -1880,7 +1882,7 @@
url = ApiClient.getImageUrl(item.Id, { url = ApiClient.getImageUrl(item.Id, {
type: "Disc", type: "Disc",
maxheight: 480, maxheight: imageHeight,
tag: item.ImageTags.Disc tag: item.ImageTags.Disc
}); });
} }
@ -1888,7 +1890,7 @@
url = ApiClient.getImageUrl(item.AlbumId, { url = ApiClient.getImageUrl(item.AlbumId, {
type: "Primary", type: "Primary",
maxheight: 480, maxheight: imageHeight,
tag: item.AlbumPrimaryImageTag tag: item.AlbumPrimaryImageTag
}); });
@ -2007,7 +2009,7 @@
} }
} }
if (item.RunTimeTicks) { if (item.RunTimeTicks && item.Type != "Series") {
if (item.Type == "Audio") { if (item.Type == "Audio") {
@ -2349,7 +2351,7 @@
if (user.PrimaryImageTag) { if (user.PrimaryImageTag) {
var url = ApiClient.getUserImageUrl(user.Id, { var url = ApiClient.getUserImageUrl(user.Id, {
width: 225, height: 40,
tag: user.PrimaryImageTag, tag: user.PrimaryImageTag,
type: "Primary" type: "Primary"
}); });

View file

@ -1,7 +1,30 @@
(function ($, document, apiClient) { (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) { function renderRecordings(page, recordings) {
var html = ''; var html = '';
var cssClass = "detailTable"; var cssClass = "detailTable";
@ -28,7 +51,6 @@
html += '<td>'; html += '<td>';
html += '<button data-recordingid="' + recording.Id + '" class="btnPlayRecording" type="button" data-icon="play" data-inline="true" data-mini="true" data-iconpos="notext">Play</button>'; html += '<button data-recordingid="' + recording.Id + '" class="btnPlayRecording" type="button" data-icon="play" data-inline="true" data-mini="true" data-iconpos="notext">Play</button>';
html += '<button data-recordingid="' + recording.Id + '" class="btnEditRecording" type="button" data-icon="pencil" data-inline="true" data-mini="true" data-iconpos="notext">Edit</button>';
html += '<button data-recordingid="' + recording.Id + '" class="btnDeleteRecording" type="button" data-icon="delete" data-inline="true" data-mini="true" data-iconpos="notext">Delete</button>'; html += '<button data-recordingid="' + recording.Id + '" class="btnDeleteRecording" type="button" data-icon="delete" data-inline="true" data-mini="true" data-iconpos="notext">Delete</button>';
html += '</td>'; html += '</td>';
@ -59,17 +81,35 @@
html += '</table></div>'; html += '</table></div>';
var elem = $('#items', page).html(html).trigger('create'); 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) { function reload(page) {
apiClient.getLiveTvRecordings().done(function(result) { Dashboard.showLoadingMsg();
apiClient.getLiveTvRecordings().done(function (result) {
renderRecordings(page, result.Items); renderRecordings(page, result.Items);
}); });
} }
$(document).on('pagebeforeshow', "#liveTvRecordingsPage", function () { $(document).on('pagebeforeshow', "#liveTvRecordingsPage", function () {
var page = this; var page = this;

View file

@ -1,5 +1,28 @@
(function ($, document, apiClient) { (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) { function renderTimers(page, timers) {
var html = ''; var html = '';
@ -61,6 +84,20 @@
html += '</table></div>'; html += '</table></div>';
var elem = $('#items', page).html(html).trigger('create'); 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) { function reload(page) {

View file

@ -6,7 +6,7 @@
stopInterval(); stopInterval();
} }
ApiClient.getScheduledTasks().done(function (tasks) { ApiClient.getScheduledTasks({isHidden: false}).done(function (tasks) {
if (updateInterval) { if (updateInterval) {
populateList(page, tasks); populateList(page, tasks);

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.201" targetFramework="net45" /> <package id="MediaBrowser.ApiClient.Javascript" version="3.0.203" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.62" targetFramework="net45" /> <package id="ServiceStack.Common" version="3.9.62" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.62" targetFramework="net45" /> <package id="ServiceStack.Text" version="3.9.62" targetFramework="net45" />
</packages> </packages>