pull/470/head
tidusjar 9 years ago
parent 5024178724
commit b4bc51c862

@ -603,7 +603,7 @@ $(function () {
var url = createBaseUrl(mainBaseUrl, "search/request/tvEpisodes");
var type = $form.prop('method');
$('#episodesModal').modal('toggle');
sendRequestAjax(JSON.stringify(finalObj), type, url, tvId);
});
@ -627,7 +627,8 @@ $(function () {
name: result.name,
season: result.seasonNumber,
number: result.episodeNumber,
requested: result.requested
requested: result.requested,
episodeId: result.episodeId
}
}
});

@ -33,5 +33,6 @@ namespace PlexRequests.UI.Models
public bool Requested { get; set; }
public string Name { get; set; }
public int Id { get; set; }
public int EpisodeId { get; set; } // Not used other than in the view to keep everything unique
}
}

@ -557,7 +557,7 @@ namespace PlexRequests.UI.Modules
var s = await sonarrSettings;
if (!s.Enabled)
{
return Response.AsJson(new JsonResponseModel { Message = "This is currently only supported with Sonarr", Result = false });
return Response.AsJson(new JsonResponseModel { Message = "This is currently only supported with Sonarr, Please enable Sonarr for this feature", Result = false });
}
}
@ -941,8 +941,8 @@ namespace PlexRequests.UI.Modules
var enumerable = allResults as RequestedModel[] ?? allResults.ToArray();
var dbDbShow = enumerable.FirstOrDefault(x => x.Type == RequestType.TvShow && x.TvDbId == seriesId.ToString());
var show = TvApi.ShowLookupByTheTvDbId(seriesId);
var seasons = TvApi.EpisodeLookup(show.id);
var show = await Task.Run(() => TvApi.ShowLookupByTheTvDbId(seriesId));
var seasons = await Task.Run(() => TvApi.EpisodeLookup(show.id));
foreach (var ep in seasons)
@ -957,7 +957,8 @@ namespace PlexRequests.UI.Modules
SeasonNumber = ep.season,
EpisodeNumber = ep.number,
Requested = requested ?? false,
Name = ep.name
Name = ep.name,
EpisodeId = ep.id
});
}

@ -231,7 +231,7 @@
<value>Latest Season</value>
</data>
<data name="Search_SelectSeason" xml:space="preserve">
<value>Select </value>
<value>Select Season</value>
</data>
<data name="Search_ReportIssue" xml:space="preserve">
<value>Report Issue</value>

@ -898,7 +898,7 @@ namespace PlexRequests.UI.Resources {
}
/// <summary>
/// Looks up a localized string similar to Select .
/// Looks up a localized string similar to Select Season.
/// </summary>
public static string Search_SelectSeason {
get {

@ -366,9 +366,9 @@
<div class="form-group col-md-6">
<div class="checkbox" style="margin-bottom:0px; margin-top:0px;">
{{#if_eq requested true}}
<input type="checkbox" checked="checked" disabled="disabled" class="selectedEpisodes" id="{{id}}" epNumber="{{number}}" epSeason="{{season}}" name="{{id}}"><label for="{{id}}">{{number}}. {{name}}</label>
<input type="checkbox" checked="checked" disabled="disabled" class="selectedEpisodes" id="{{episodeId}}" epNumber="{{number}}" epSeason="{{season}}" name="{{episodeId}}"><label for="{{episodeId}}">{{number}}. {{name}}</label>
{{else}}
<input type="checkbox" class="selectedEpisodes" id="{{id}}" epNumber="{{number}}" epSeason="{{season}}" name="{{id}}"><label for="{{id}}">{{number}}. {{name}}</label>
<input type="checkbox" class="selectedEpisodes" id="{{episodeId}}" epNumber="{{number}}" epSeason="{{season}}" name="{{episodeId}}"><label for="{{episodeId}}">{{number}}. {{name}}</label>
{{/if_eq}}
</div>
</div>

Loading…
Cancel
Save