mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-19 16:34:34 -04:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48559cf964 | ||
|
|
c734e8bc7e | ||
|
|
3c7d7756e6 | ||
|
|
683bda49d8 | ||
|
|
52fb29ee18 | ||
|
|
236e16c9a5 | ||
|
|
0584038273 | ||
|
|
6685aea144 | ||
|
|
e4f7aa52df | ||
|
|
f61c4feb00 | ||
|
|
04e8c635e0 | ||
|
|
93ea5cfdee | ||
|
|
1b7288e7cb |
@@ -34,11 +34,11 @@ namespace NzbDrone.Api.Config
|
||||
Get["/samples"] = x => GetExamples(this.Bind<NamingConfigResource>());
|
||||
|
||||
SharedValidator.RuleFor(c => c.MultiEpisodeStyle).InclusiveBetween(0, 5);
|
||||
SharedValidator.RuleFor(c => c.StandardEpisodeFormat).ValidEpisodeFormat();
|
||||
/*SharedValidator.RuleFor(c => c.StandardEpisodeFormat).ValidEpisodeFormat();
|
||||
SharedValidator.RuleFor(c => c.DailyEpisodeFormat).ValidDailyEpisodeFormat();
|
||||
SharedValidator.RuleFor(c => c.AnimeEpisodeFormat).ValidAnimeEpisodeFormat();
|
||||
SharedValidator.RuleFor(c => c.SeriesFolderFormat).ValidSeriesFolderFormat();
|
||||
SharedValidator.RuleFor(c => c.SeasonFolderFormat).ValidSeasonFolderFormat();
|
||||
SharedValidator.RuleFor(c => c.SeasonFolderFormat).ValidSeasonFolderFormat();*/
|
||||
SharedValidator.RuleFor(c => c.StandardMovieFormat).ValidMovieFormat();
|
||||
SharedValidator.RuleFor(c => c.MovieFolderFormat).ValidMovieFolderFormat();
|
||||
}
|
||||
|
||||
31
src/NzbDrone.Api/Movies/MovieEditorModule.cs
Normal file
31
src/NzbDrone.Api/Movies/MovieEditorModule.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Nancy;
|
||||
using NzbDrone.Api.Extensions;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Api.Movie
|
||||
{
|
||||
public class MovieEditorModule : NzbDroneApiModule
|
||||
{
|
||||
private readonly IMovieService _movieService;
|
||||
|
||||
public MovieEditorModule(IMovieService movieService)
|
||||
: base("/movie/editor")
|
||||
{
|
||||
_movieService = movieService;
|
||||
Put["/"] = Movie => SaveAll();
|
||||
}
|
||||
|
||||
private Response SaveAll()
|
||||
{
|
||||
var resources = Request.Body.FromJson<List<MovieResource>>();
|
||||
|
||||
var Movie = resources.Select(MovieResource => MovieResource.ToModel(_movieService.GetMovie(MovieResource.Id))).ToList();
|
||||
|
||||
return _movieService.UpdateMovie(Movie)
|
||||
.ToResource()
|
||||
.AsResponse(HttpStatusCode.Accepted);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,6 +119,7 @@
|
||||
<Compile Include="Movies\MovieModule.cs" />
|
||||
<Compile Include="Movies\RenameMovieModule.cs" />
|
||||
<Compile Include="Movies\RenameMovieResource.cs" />
|
||||
<Compile Include="Movies\MovieEditorModule.cs" />
|
||||
<Compile Include="Parse\ParseModule.cs" />
|
||||
<Compile Include="Parse\ParseResource.cs" />
|
||||
<Compile Include="ManualImport\ManualImportModule.cs" />
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
|
||||
foreach (var remoteEpisode in matchingSeries)
|
||||
{
|
||||
_logger.Debug("Checking if existing release in queue meets cutoff. Queued quality is: {0}", remoteEpisode.ParsedEpisodeInfo.Quality);
|
||||
_logger.Debug("Checking if existing release in queue meets cutoff. Queued quality is: {0}", remoteEpisode.ParsedMovieInfo.Quality);
|
||||
|
||||
if (!_qualityUpgradableSpecification.CutoffNotMet(subject.Movie.Profile, remoteEpisode.ParsedMovieInfo.Quality, subject.ParsedMovieInfo.Quality))
|
||||
{
|
||||
|
||||
@@ -94,7 +94,6 @@ namespace NzbDrone.Core.Download
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var series = _parsingService.GetSeries(trackedDownload.DownloadItem.Title);
|
||||
|
||||
if (series == null)
|
||||
@@ -156,7 +155,7 @@ namespace NzbDrone.Core.Download
|
||||
trackedDownload.Warn(statusMessages);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (trackedDownload.RemoteEpisode.Series != null)
|
||||
{
|
||||
var importResults = _downloadedEpisodesImportService.ProcessPath(outputPath, ImportMode.Auto, trackedDownload.RemoteEpisode.Series, trackedDownload.DownloadItem);
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace NzbDrone.Core.Download
|
||||
}
|
||||
|
||||
public int SeriesId { get; set; }
|
||||
public int MovieId { get; set; }
|
||||
public List<int> EpisodeIds { get; set; }
|
||||
public QualityModel Quality { get; set; }
|
||||
public string SourceTitle { get; set; }
|
||||
|
||||
@@ -88,6 +88,7 @@ namespace NzbDrone.Core.Download
|
||||
var downloadFailedEvent = new DownloadFailedEvent
|
||||
{
|
||||
SeriesId = historyItem.SeriesId,
|
||||
MovieId = historyItem.MovieId,
|
||||
EpisodeIds = historyItems.Select(h => h.EpisodeId).ToList(),
|
||||
Quality = historyItem.Quality,
|
||||
SourceTitle = historyItem.SourceTitle,
|
||||
|
||||
@@ -34,6 +34,15 @@ namespace NzbDrone.Core.Download
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.MovieId != 0)
|
||||
{
|
||||
_logger.Debug("Failed download contains a movie, searching again.");
|
||||
|
||||
_commandQueueManager.Push(new MoviesSearchCommand { MovieId = message.MovieId });
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.EpisodeIds.Count == 1)
|
||||
{
|
||||
_logger.Debug("Failed download only contains one episode, searching again");
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
|
||||
|
||||
private int GetMinimumAllowedRuntime(Movie movie)
|
||||
{
|
||||
return 120; //2 minutes
|
||||
return 360; //6 minutes
|
||||
}
|
||||
|
||||
private int GetMinimumAllowedRuntime(Series series)
|
||||
|
||||
@@ -40,12 +40,6 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
||||
|
||||
public Decision IsSatisfiedBy(LocalMovie localEpisode)
|
||||
{
|
||||
if (localEpisode.ExistingFile)
|
||||
{
|
||||
_logger.Debug("Existing file, skipping sample check");
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
||||
var sample = _detectSample.IsSample(localEpisode.Movie,
|
||||
localEpisode.Quality,
|
||||
localEpisode.Path,
|
||||
|
||||
@@ -92,8 +92,11 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
movie.CleanTitle = Parser.Parser.CleanSeriesTitle(movie.Title);
|
||||
movie.Overview = resource.overview;
|
||||
movie.Website = resource.homepage;
|
||||
movie.InCinemas = DateTime.Parse(resource.release_date);
|
||||
movie.Year = movie.InCinemas.Value.Year;
|
||||
if (resource.release_date.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
movie.InCinemas = DateTime.Parse(resource.release_date);
|
||||
movie.Year = movie.InCinemas.Value.Year;
|
||||
}
|
||||
|
||||
var slugResult = _movieService.FindByTitleSlug(movie.TitleSlug);
|
||||
if (slugResult != null)
|
||||
@@ -328,7 +331,13 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
imdbMovie.Title = result.title;
|
||||
string titleSlug = result.title;
|
||||
imdbMovie.TitleSlug = titleSlug.ToLower().Replace(" ", "-");
|
||||
imdbMovie.Year = DateTime.Parse(result.release_date).Year;
|
||||
|
||||
if (result.release_date.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
imdbMovie.Year = DateTime.Parse(result.release_date).Year;
|
||||
}
|
||||
|
||||
|
||||
|
||||
var slugResult = _movieService.FindByTitleSlug(imdbMovie.TitleSlug);
|
||||
if (slugResult != null)
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace NzbDrone.Core.Notifications.Boxcar
|
||||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Radarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
return null;
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace NzbDrone.Core.Notifications.Growl
|
||||
Register(settings.Host, settings.Port, settings.Password);
|
||||
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Radarr";
|
||||
|
||||
SendNotification(title, body, "TEST", settings.Host, settings.Port, settings.Password);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace NzbDrone.Core.Notifications.Join
|
||||
public ValidationFailure Test(JoinSettings settings)
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr.";
|
||||
const string body = "This is a test message from Radarr.";
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace NzbDrone.Core.Notifications.NotifyMyAndroid
|
||||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Radarr";
|
||||
Verify(settings.ApiKey);
|
||||
SendNotification(title, body, settings.ApiKey, (NotifyMyAndroidPriority)settings.Priority);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace NzbDrone.Core.Notifications.Prowl
|
||||
Verify(settings.ApiKey);
|
||||
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Radarr";
|
||||
|
||||
SendNotification(title, body, settings.ApiKey);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace NzbDrone.Core.Notifications.PushBullet
|
||||
try
|
||||
{
|
||||
const string title = "Sonarr - Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Radarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace NzbDrone.Core.Notifications.Pushalot
|
||||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Radarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace NzbDrone.Core.Notifications.Pushover
|
||||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Radarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace NzbDrone.Core.Notifications.Telegram
|
||||
try
|
||||
{
|
||||
const string title = "Test Notification";
|
||||
const string body = "This is a test message from Sonarr";
|
||||
const string body = "This is a test message from Radarr";
|
||||
|
||||
SendNotification(title, body, settings);
|
||||
}
|
||||
|
||||
@@ -67,6 +67,8 @@ namespace NzbDrone.Core.Organizer
|
||||
{
|
||||
var value = context.PropertyValue as string;
|
||||
|
||||
return true;
|
||||
|
||||
if (!FileNameBuilder.SeasonEpisodePatternRegex.IsMatch(value) &&
|
||||
!FileNameValidation.OriginalTokenRegex.IsMatch(value))
|
||||
{
|
||||
@@ -89,6 +91,8 @@ namespace NzbDrone.Core.Organizer
|
||||
{
|
||||
var value = context.PropertyValue as string;
|
||||
|
||||
return true;
|
||||
|
||||
if (!FileNameBuilder.SeasonEpisodePatternRegex.IsMatch(value) &&
|
||||
!FileNameBuilder.AirDateRegex.IsMatch(value) &&
|
||||
!FileNameValidation.OriginalTokenRegex.IsMatch(value))
|
||||
@@ -112,6 +116,8 @@ namespace NzbDrone.Core.Organizer
|
||||
{
|
||||
var value = context.PropertyValue as string;
|
||||
|
||||
return true;
|
||||
|
||||
if (!FileNameBuilder.SeasonEpisodePatternRegex.IsMatch(value) &&
|
||||
!FileNameBuilder.AbsoluteEpisodePatternRegex.IsMatch(value) &&
|
||||
!FileNameValidation.OriginalTokenRegex.IsMatch(value))
|
||||
|
||||
@@ -192,6 +192,11 @@ namespace NzbDrone.Core.Parser
|
||||
parsedEpisodeInfo.MovieTitleInfo.Year);
|
||||
}
|
||||
|
||||
if (series == null)
|
||||
{
|
||||
series = _movieService.FindByTitle(parsedEpisodeInfo.MovieTitle.Replace("DC", "").Trim());
|
||||
}
|
||||
|
||||
return series;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ namespace NzbDrone.Core.Tv
|
||||
cleanNum = cleanNum.Replace(roman, num);
|
||||
}
|
||||
|
||||
var result = Query.Where(s => s.CleanTitle == cleanTitle).SingleOrDefault();
|
||||
var result = Query.Where(s => s.CleanTitle == cleanTitle).FirstOrDefault();
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
result = Query.Where(s => s.CleanTitle == cleanNum).OrWhere(s => s.CleanTitle == cleanRoman).SingleOrDefault();
|
||||
result = Query.Where(s => s.CleanTitle == cleanNum).OrWhere(s => s.CleanTitle == cleanRoman).FirstOrDefault();
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace NzbDrone.Core.Tv
|
||||
|
||||
result = movies.Where(m => m.AlternativeTitles.Any(t => Parser.Parser.CleanSeriesTitle(t.ToLower()) == cleanTitle ||
|
||||
Parser.Parser.CleanSeriesTitle(t.ToLower()) == cleanRoman ||
|
||||
Parser.Parser.CleanSeriesTitle(t.ToLower()) == cleanNum)).SingleOrDefault();
|
||||
Parser.Parser.CleanSeriesTitle(t.ToLower()) == cleanNum)).FirstOrDefault();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ var Marionette = require('marionette');
|
||||
var Backgrid = require('backgrid');
|
||||
var HistoryCollection = require('./HistoryCollection');
|
||||
var EventTypeCell = require('../../Cells/EventTypeCell');
|
||||
var MovieTitleCell = require('../../Cells/MovieTitleCell');
|
||||
var MovieTitleCell = require('../../Cells/MovieTitleHistoryCell');
|
||||
var EpisodeNumberCell = require('../../Cells/EpisodeNumberCell');
|
||||
var EpisodeTitleCell = require('../../Cells/EpisodeTitleCell');
|
||||
var HistoryQualityCell = require('./HistoryQualityCell');
|
||||
@@ -31,7 +31,7 @@ module.exports = Marionette.Layout.extend({
|
||||
{
|
||||
name : 'movies',
|
||||
label : 'Movie Title',
|
||||
cell : MovieTitleCell
|
||||
cell : MovieTitleCell,
|
||||
},
|
||||
/*{
|
||||
name : 'episode',
|
||||
|
||||
@@ -33,7 +33,7 @@ module.exports = NzbDroneCell.extend({
|
||||
},
|
||||
|
||||
_editSeries : function() {
|
||||
vent.trigger(vent.Commands.EditSeriesCommand, { series : this.model });
|
||||
vent.trigger(vent.Commands.EditMovieCommand, { movie : this.model });
|
||||
},
|
||||
|
||||
_refreshSeries : function() {
|
||||
|
||||
@@ -4,8 +4,4 @@ module.exports = TemplatedCell.extend({
|
||||
className : 'series-title-cell',
|
||||
template : 'Cells/SeriesTitleTemplate',
|
||||
|
||||
// render : function() {
|
||||
// this.$el.html(this.model.get("movie").get("title")); //Hack, but somehow handlebar helper does not work.
|
||||
// return this;
|
||||
// }
|
||||
});
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
var TemplatedCell = require('./TemplatedCell');
|
||||
|
||||
module.exports = TemplatedCell.extend({
|
||||
className : 'series-title-cell',
|
||||
template : 'Cells/SeriesTitleTemplate',
|
||||
});
|
||||
14
src/UI/Cells/MovieTitleHistoryCell.js
Normal file
14
src/UI/Cells/MovieTitleHistoryCell.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var TemplatedCell = require('./TemplatedCell');
|
||||
|
||||
module.exports = TemplatedCell.extend({
|
||||
className : 'series-title-cell',
|
||||
template : 'Cells/SeriesTitleTemplate',
|
||||
|
||||
|
||||
render : function() {
|
||||
this.$el.html(this.model.get("movie").get("title")); //Hack, but somehow handlebar helper does not work.
|
||||
debugger;
|
||||
return this;
|
||||
|
||||
}
|
||||
});
|
||||
@@ -1,24 +1,24 @@
|
||||
<div class="row">
|
||||
<div class="series-legend legend col-xs-6 col-sm-4">
|
||||
<ul class='legend-labels'>
|
||||
<li><span class="progress-bar"></span>Continuing (All episodes downloaded)</li>
|
||||
<li><span class="progress-bar-success"></span>Ended (All episodes downloaded)</li>
|
||||
<li><span class="progress-bar-danger"></span>Missing Episodes (Series monitored)</li>
|
||||
<li><span class="progress-bar-warning"></span>Missing Episodes (Series not monitored)</li>
|
||||
<li><span class="progress-bar"></span>Missing, but not yet available.</li>
|
||||
<li><span class="progress-bar-success"></span>Downloaded and imported.</li>
|
||||
<li><span class="progress-bar-danger"></span>Missing and monitored.</li>
|
||||
<li><span class="progress-bar-warning"></span>Missing, but not monitored.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-5 col-sm-7">
|
||||
<div class="row">
|
||||
<div class="series-stats col-sm-4">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Series</dt>
|
||||
<dt>Movies</dt>
|
||||
<dd>{{series}}</dd>
|
||||
|
||||
<dt>Ended</dt>
|
||||
<dd>{{ended}}</dd>
|
||||
<dt>Released</dt>
|
||||
<dd>{{released}}</dd>
|
||||
|
||||
<dt>Continuing</dt>
|
||||
<dd>{{continuing}}</dd>
|
||||
<dt>Announced</dt>
|
||||
<dd>{{announced}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ var ListCollectionView = require('./Overview/SeriesOverviewCollectionView');
|
||||
var EmptyView = require('./EmptyView');
|
||||
var MoviesCollection = require('../MoviesCollection');
|
||||
var InCinemasCell = require('../../Cells/InCinemasCell');
|
||||
var MovieTitleCell = require('../../Cells/MovieTitleCell2');
|
||||
var MovieTitleCell = require('../../Cells/MovieTitleCell');
|
||||
var TemplatedCell = require('../../Cells/TemplatedCell');
|
||||
var ProfileCell = require('../../Cells/ProfileCell');
|
||||
var MovieLinksCell = require('../../Cells/MovieLinksCell');
|
||||
@@ -281,18 +281,18 @@ module.exports = Marionette.Layout.extend({
|
||||
var series = MoviesCollection.models.length;
|
||||
var episodes = 0;
|
||||
var episodeFiles = 0;
|
||||
var ended = 0;
|
||||
var continuing = 0;
|
||||
var announced = 0;
|
||||
var released = 0;
|
||||
var monitored = 0;
|
||||
|
||||
_.each(MoviesCollection.models, function(model) {
|
||||
episodes += model.get('episodeCount');
|
||||
episodeFiles += model.get('episodeFileCount');
|
||||
|
||||
if (model.get('status').toLowerCase() === 'ended') {
|
||||
ended++;
|
||||
if (model.get('status').toLowerCase() === 'released') {
|
||||
released++;
|
||||
} else {
|
||||
continuing++;
|
||||
announced++;
|
||||
}
|
||||
|
||||
if (model.get('monitored')) {
|
||||
@@ -302,9 +302,9 @@ module.exports = Marionette.Layout.extend({
|
||||
|
||||
footerModel.set({
|
||||
series : series,
|
||||
ended : ended,
|
||||
continuing : continuing,
|
||||
monitored : monitored,
|
||||
released : released,
|
||||
announced : announced,
|
||||
monitored : monitored,
|
||||
unmonitored : series - monitored,
|
||||
episodes : episodes,
|
||||
episodeFiles : episodeFiles
|
||||
|
||||
Reference in New Issue
Block a user