mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
New: Update scenename from API (#6132)
* update scenename from API * Update MovieFileListResource.cs * Update MovieFileModule.cs null checks similar to Sonarr pull request * Update MovieFileModule.cs add blank line * Update MovieFileModule.cs include isSceneTitle check * Update MovieFileModule.cs fix namespace * Update MovieFileModule.cs
This commit is contained in:
parent
5f229b78be
commit
db14ac4605
@ -12,6 +12,7 @@ public class MovieFileListResource
|
|||||||
public QualityModel Quality { get; set; }
|
public QualityModel Quality { get; set; }
|
||||||
public string Edition { get; set; }
|
public string Edition { get; set; }
|
||||||
public string ReleaseGroup { get; set; }
|
public string ReleaseGroup { get; set; }
|
||||||
|
public string SceneName { get; set; }
|
||||||
public int? IndexerFlags { get; set; }
|
public int? IndexerFlags { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
using NzbDrone.Core.MediaFiles.Events;
|
using NzbDrone.Core.MediaFiles.Events;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.Movies;
|
using NzbDrone.Core.Movies;
|
||||||
|
using NzbDrone.Core.Parser;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
using NzbDrone.SignalR;
|
using NzbDrone.SignalR;
|
||||||
using Radarr.Api.V3.CustomFormats;
|
using Radarr.Api.V3.CustomFormats;
|
||||||
@ -115,7 +116,16 @@ private void SetMovieFile(MovieFileResource movieFileResource)
|
|||||||
movieFile.Quality = movieFileResource.Quality;
|
movieFile.Quality = movieFileResource.Quality;
|
||||||
movieFile.Languages = movieFileResource.Languages;
|
movieFile.Languages = movieFileResource.Languages;
|
||||||
movieFile.Edition = movieFileResource.Edition;
|
movieFile.Edition = movieFileResource.Edition;
|
||||||
movieFile.ReleaseGroup = movieFileResource.ReleaseGroup;
|
if (movieFileResource.ReleaseGroup != null)
|
||||||
|
{
|
||||||
|
movieFile.ReleaseGroup = movieFileResource.ReleaseGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (movieFileResource.SceneName != null && SceneChecker.IsSceneTitle(movieFileResource.SceneName))
|
||||||
|
{
|
||||||
|
movieFile.SceneName = movieFileResource.SceneName;
|
||||||
|
}
|
||||||
|
|
||||||
_mediaFileService.Update(movieFile);
|
_mediaFileService.Update(movieFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,6 +161,11 @@ private object SetMovieFile()
|
|||||||
{
|
{
|
||||||
movieFile.ReleaseGroup = resource.ReleaseGroup;
|
movieFile.ReleaseGroup = resource.ReleaseGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (resource.SceneName != null && SceneChecker.IsSceneTitle(resource.SceneName))
|
||||||
|
{
|
||||||
|
movieFile.SceneName = resource.SceneName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_mediaFileService.Update(movieFiles);
|
_mediaFileService.Update(movieFiles);
|
||||||
|
Loading…
Reference in New Issue
Block a user