diff --git a/Ombi.UI/Content/requests.js b/Ombi.UI/Content/requests.js index 4d9a13b5e..132bb7232 100644 --- a/Ombi.UI/Content/requests.js +++ b/Ombi.UI/Content/requests.js @@ -745,7 +745,8 @@ function actorLoad() { } $ml.html(""); - var url = createBaseUrl(base, '/requests/actor'); + var $newOnly = $('#searchNewOnly').val(); + var url = createBaseUrl(base, '/requests/actor' + (!!$newOnly ? '/new' : '')); $.ajax(url).success(function (results) { if (results.length > 0) { results.forEach(function (result) { diff --git a/Ombi.UI/Content/search.js b/Ombi.UI/Content/search.js index 51c4011cd..cc4849ecd 100644 --- a/Ombi.UI/Content/search.js +++ b/Ombi.UI/Content/search.js @@ -65,14 +65,23 @@ $(function () { // Type in actor search $("#actorSearchContent").on("input", function () { + triggerActorSearch(); + }); + + // if they toggle the checkbox, we want to refresh our search + $("#actorsSearchNew").click(function () { + triggerActorSearch(); + }); + + function triggerActorSearch() + { if (searchTimer) { clearTimeout(searchTimer); } searchTimer = setTimeout(function () { moviesFromActor(); }.bind(this), 800); - - }); + } $('#moviesComingSoon').on('click', function (e) { e.preventDefault(); @@ -326,7 +335,8 @@ $(function () { function moviesFromActor() { var query = $("#actorSearchContent").val(); - var url = createBaseUrl(base, '/search/actor/'); + var $newOnly = $('#actorsSearchNew')[0].checked; + var url = createBaseUrl(base, '/search/actor/' + (!!$newOnly ? 'new/' : '')); query ? getMovies(url + query, "#actorMovieList", "#actorSearchButton") : resetMovies("#actorMovieList"); } diff --git a/Ombi.UI/Resources/UI.resx b/Ombi.UI/Resources/UI.resx index 7144696a1..d87972cff 100644 --- a/Ombi.UI/Resources/UI.resx +++ b/Ombi.UI/Resources/UI.resx @@ -211,6 +211,9 @@ Albums + + Don't include titles that are already requested/available + Want to watch something that is not currently on Plex?! No problem! Just search for it below and request it! diff --git a/Ombi.UI/Resources/UI1.Designer.cs b/Ombi.UI/Resources/UI1.Designer.cs index 598414433..d7d92aea8 100644 --- a/Ombi.UI/Resources/UI1.Designer.cs +++ b/Ombi.UI/Resources/UI1.Designer.cs @@ -897,6 +897,15 @@ namespace Ombi.UI.Resources { } } + /// + /// Looks up a localized string similar to Don't include titles that are already requested/available. + /// + public static string Search_NewOnly { + get { + return ResourceManager.GetString("Search_NewOnly", resourceCulture); + } + } + /// /// Looks up a localized string similar to Not Requested yet. /// diff --git a/Ombi.UI/Views/Admin/Settings.cshtml b/Ombi.UI/Views/Admin/Settings.cshtml index 54e588c20..9a6010964 100644 --- a/Ombi.UI/Views/Admin/Settings.cshtml +++ b/Ombi.UI/Views/Admin/Settings.cshtml @@ -60,6 +60,7 @@ @Html.Checkbox(Model.SearchForMovies,"SearchForMovies","Search for Movies") + @Html.Checkbox(Model.SearchForActors,"SearchForActors","Search for Movies by Actor")
diff --git a/Ombi.UI/Views/Search/Index.cshtml b/Ombi.UI/Views/Search/Index.cshtml index 001c10db6..965cfe62f 100644 --- a/Ombi.UI/Views/Search/Index.cshtml +++ b/Ombi.UI/Views/Search/Index.cshtml @@ -25,10 +25,13 @@ @UI.Search_Movies -
  • - @UI.Search_Actors + @if (Model.Settings.SearchForActors) + { +
  • + @UI.Search_Actors -
  • + + } } @if (Model.Settings.SearchForTvShows) { @@ -74,21 +77,27 @@
    + @if (Model.Settings.SearchForActors) + { -
    -
    - -
    - +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    -
    -
    - -
    -
    -
    - + } } @if (Model.Settings.SearchForTvShows) @@ -139,7 +148,7 @@ } - -