diff --git a/src/Ombi.Core/Engine/Interfaces/IMovieRequestEngine.cs b/src/Ombi.Core/Engine/Interfaces/IMovieRequestEngine.cs index 1ccf8bbc7..152a1d923 100644 --- a/src/Ombi.Core/Engine/Interfaces/IMovieRequestEngine.cs +++ b/src/Ombi.Core/Engine/Interfaces/IMovieRequestEngine.cs @@ -1,15 +1,13 @@ using System.Collections.Generic; using System.Threading.Tasks; using Ombi.Core.Models.Requests; -using Ombi.Core.Models.Search; -using Ombi.Store.Entities; using Ombi.Store.Entities.Requests; namespace Ombi.Core.Engine.Interfaces { public interface IMovieRequestEngine : IRequestEngine { - Task RequestMovie(SearchMovieViewModel model); + Task RequestMovie(MovieRequestViewModel model); Task> SearchMovieRequest(string search); diff --git a/src/Ombi.Core/Engine/MovieRequestEngine.cs b/src/Ombi.Core/Engine/MovieRequestEngine.cs index a142f2e62..34885aa46 100644 --- a/src/Ombi.Core/Engine/MovieRequestEngine.cs +++ b/src/Ombi.Core/Engine/MovieRequestEngine.cs @@ -43,16 +43,16 @@ namespace Ombi.Core.Engine /// /// The model. /// - public async Task RequestMovie(SearchMovieViewModel model) + public async Task RequestMovie(MovieRequestViewModel model) { - var movieInfo = await MovieApi.GetMovieInformation(model.Id); + var movieInfo = await MovieApi.GetMovieInformation(model.TheMovieDbId); if (movieInfo == null || movieInfo.Id == 0) { return new RequestEngineResult { Result = false, Message = "There was an issue adding this movie!", - ErrorMessage = $"TheMovieDb didn't have any information for ID {model.Id}" + ErrorMessage = $"TheMovieDb didn't have any information for ID {model.TheMovieDbId}" }; } var fullMovieName = diff --git a/src/Ombi.Core/Models/Requests/MovieRequestViewModel.cs b/src/Ombi.Core/Models/Requests/MovieRequestViewModel.cs new file mode 100644 index 000000000..c67e138e1 --- /dev/null +++ b/src/Ombi.Core/Models/Requests/MovieRequestViewModel.cs @@ -0,0 +1,33 @@ +#region Copyright +// /************************************************************************ +// Copyright (c) 2018 Jamie Rees +// File: MovieRequestViewModel.cs +// Created By: Jamie Rees +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// ************************************************************************/ +#endregion +namespace Ombi.Core.Models.Requests +{ + public class MovieRequestViewModel + { + public int TheMovieDbId { get; set; } + } +} \ No newline at end of file diff --git a/src/Ombi.Notifications.Templates/EmailBasicTemplate.cs b/src/Ombi.Notifications.Templates/EmailBasicTemplate.cs index 64740fb43..4814945e7 100644 --- a/src/Ombi.Notifications.Templates/EmailBasicTemplate.cs +++ b/src/Ombi.Notifications.Templates/EmailBasicTemplate.cs @@ -20,17 +20,17 @@ namespace Ombi.Notifications.Templates private const string SubjectKey = "{@SUBJECT}"; private const string BodyKey = "{@BODY}"; - private const string ImgSrc = "{@IMGSRC}"; + private const string Poster = "{@POSTER}"; private const string DateKey = "{@DATENOW}"; private const string Logo = "{@LOGO}"; - public string LoadTemplate(string subject, string body, string img = default(string), string logo = default(string)) + public string LoadTemplate(string subject, string body, string imgsrc = default(string), string logo = default(string)) { var sb = new StringBuilder(File.ReadAllText(TemplateLocation)); sb.Replace(SubjectKey, subject); sb.Replace(BodyKey, body); sb.Replace(DateKey, DateTime.Now.ToString("f")); - sb.Replace(ImgSrc, string.IsNullOrEmpty(img) ? string.Empty : img); + sb.Replace(Poster, string.IsNullOrEmpty(imgsrc) ? string.Empty : $"\"Poster\""); sb.Replace(Logo, string.IsNullOrEmpty(logo) ? "http://i.imgur.com/qQsN78U.png" : logo); return sb.ToString(); diff --git a/src/Ombi.Notifications.Templates/Templates/BasicTemplate.html b/src/Ombi.Notifications.Templates/Templates/BasicTemplate.html index 8482b6b40..ac4c4a119 100644 --- a/src/Ombi.Notifications.Templates/Templates/BasicTemplate.html +++ b/src/Ombi.Notifications.Templates/Templates/BasicTemplate.html @@ -144,7 +144,7 @@ @@ -153,11 +153,7 @@ - - - + {@POSTER}
- Ombi logo + Ombi logo
- Poster -
diff --git a/src/Ombi.Settings/Settings/Models/CustomizationSettings.cs b/src/Ombi.Settings/Settings/Models/CustomizationSettings.cs index f367188a6..eef20573a 100644 --- a/src/Ombi.Settings/Settings/Models/CustomizationSettings.cs +++ b/src/Ombi.Settings/Settings/Models/CustomizationSettings.cs @@ -10,6 +10,9 @@ namespace Ombi.Settings.Settings.Models public string ApplicationName { get; set; } public string ApplicationUrl { get; set; } public string CustomCssLink { get; set; } + public bool EnableCustomDonations { get; set; } + public string CustomDonationUrl { get; set; } + public string CustomDonationMessage { get; set; } public string Logo { get; set; } public string PresetThemeName { get; set; } diff --git a/src/Ombi/ClientApp/app/app.component.html b/src/Ombi/ClientApp/app/app.component.html index 5364fe9a6..6a5ea4f52 100644 --- a/src/Ombi/ClientApp/app/app.component.html +++ b/src/Ombi/ClientApp/app/app.component.html @@ -52,6 +52,14 @@ {{ 'NavigationBar.Donate' | translate }} +