mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
Added unit tests to cover the new changes to the availability checker
This commit is contained in:
parent
c2737b76a8
commit
8a3576456c
3 changed files with 143 additions and 18 deletions
|
@ -102,13 +102,14 @@ namespace PlexRequests.Services
|
|||
Log.Trace("Search results from Plex for the following request: {0}", r.Title);
|
||||
Log.Trace(results.DumpJson());
|
||||
bool matchResult;
|
||||
var releaseDate = r.ReleaseDate == DateTime.MinValue ? string.Empty : r.ReleaseDate.ToString("yyyy");
|
||||
switch (r.Type)
|
||||
{
|
||||
case RequestType.Movie:
|
||||
matchResult = MovieTvSearch(results, r.Title, r.ReleaseDate.ToString("yyyy"));
|
||||
matchResult = MovieTvSearch(results, r.Title, releaseDate);
|
||||
break;
|
||||
case RequestType.TvShow:
|
||||
matchResult = MovieTvSearch(results, r.Title, r.ReleaseDate.ToString("yyyy"));
|
||||
matchResult = MovieTvSearch(results, r.Title, releaseDate);
|
||||
break;
|
||||
case RequestType.Album:
|
||||
matchResult = MusicSearch(results, r.Title, r.ArtistName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue