Updated JobProvider to allow jobs with two targets.

JobQueueItem class created instead of using Tuples.
Added Search for Season and Rename Season jobs , plus links for them on Series/Details.
Add GetSeasonFiles added to MediaFileProvider.
This commit is contained in:
Mark McDowall 2011-08-21 17:48:37 -07:00
commit 350e0388de
32 changed files with 454 additions and 108 deletions

View file

@ -9,5 +9,4 @@ function searchForEpisode(id) {
alert("Sorry! We could search for " + id + " at this time. " + error);
}
});
}
}

View file

@ -3,7 +3,11 @@ var ignoredImage = '../../Content/Images/ignored.png';
var seriesId = 0;
var saveSeasonIgnoreUrl = '../Series/SaveSeasonIgnore';
var saveEpisodeIgnoreUrl = '../Series/SaveEpisodeIgnore';
var renameEpisodeUrl = '../Episode/Rename';
var renameSeasonUrl = '../Episode/RenameSeason';
var searchSeasonUrl = '../Episode/SearchSeason';
//Episode Ignore Functions
$(".ignoreEpisode").live("click", function () {
var toggle = $(this);
var ignored = toggle.hasClass('ignored');
@ -123,6 +127,7 @@ function grid_dataBound(e) {
toggleMaster(seasonNumber);
}
//Episode Ignore Saving
function saveSeasonIgnore(seasonNumber, ignored) {
$.ajax({
type: "POST",
@ -143,4 +148,39 @@ function saveEpisodeIgnore(episodeId, ignored) {
alert("Sorry! We could save the ignore settings for Episode: " + episodeId + " at this time. " + error);
}
});
}
//Episode Renaming
function renameEpisode(id) {
$.ajax({
type: "POST",
url: renameEpisodeUrl,
data: jQuery.param({ episodeFileId: id }),
error: function (req, status, error) {
alert("Sorry! We could rename " + id + " at this time. " + error);
}
});
}
function renameSeason(seriesId, seasonNumber) {
$.ajax({
type: "POST",
url: renameSeasonUrl,
data: jQuery.param({ seriesId: seriesId, seasonNumber: seasonNumber }),
error: function (req, status, error) {
alert("Sorry! We could rename series: " + seriesId + " season: " + seasonNumber + " at this time. " + error);
}
});
}
//Season Search
function searchSeason(seriesId, seasonNumber) {
$.ajax({
type: "POST",
url: searchSeasonUrl,
data: jQuery.param({ seriesId: seriesId, seasonNumber: seasonNumber }),
error: function (req, status, error) {
alert("Sorry! We could search for series: " + seriesId + " season: " + seasonNumber + " at this time. " + error);
}
});
}