mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Compare commits
42 Commits
v0.2.0.152
...
v0.2.0.182
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bb21fedab | ||
|
|
91c820f98b | ||
|
|
7d3118aece | ||
|
|
4f4ad77ad1 | ||
|
|
42f205a731 | ||
|
|
cbb2b778a6 | ||
|
|
b3e03a648d | ||
|
|
acf45a79e8 | ||
|
|
b5d8ac852e | ||
|
|
4aec0e8fc6 | ||
|
|
ecea417fd8 | ||
|
|
6a41f6a435 | ||
|
|
da2d075aa8 | ||
|
|
10dc3993df | ||
|
|
7e5020db9a | ||
|
|
c48fe9de12 | ||
|
|
421e827a95 | ||
|
|
34d8045cf4 | ||
|
|
c6de163748 | ||
|
|
d9e2b22e74 | ||
|
|
65c0137964 | ||
|
|
ae19424ce7 | ||
|
|
7527ec52b7 | ||
|
|
640fcf3eaf | ||
|
|
3ce8232777 | ||
|
|
864b441d8e | ||
|
|
bc2ff149b4 | ||
|
|
dea305e921 | ||
|
|
e2eab31548 | ||
|
|
fe62e18f0d | ||
|
|
f1fa1553cf | ||
|
|
b576ae813d | ||
|
|
99123be936 | ||
|
|
dd0a033b0f | ||
|
|
c64597c9f1 | ||
|
|
6d2f81e3ed | ||
|
|
4263808360 | ||
|
|
c5ca2babf7 | ||
|
|
08db74d6e6 | ||
|
|
b309a9b01f | ||
|
|
2730745607 | ||
|
|
ae0df2aef0 |
@@ -12,7 +12,7 @@ namespace NzbDrone.Api.Movies
|
|||||||
private readonly IRenameMovieFileService _renameMovieFileService;
|
private readonly IRenameMovieFileService _renameMovieFileService;
|
||||||
|
|
||||||
public RenameMovieModule(IRenameMovieFileService renameMovieFileService)
|
public RenameMovieModule(IRenameMovieFileService renameMovieFileService)
|
||||||
: base("rename")
|
: base("renameMovie")
|
||||||
{
|
{
|
||||||
_renameMovieFileService = renameMovieFileService;
|
_renameMovieFileService = renameMovieFileService;
|
||||||
|
|
||||||
|
|||||||
@@ -260,6 +260,7 @@
|
|||||||
<Compile Include="Wanted\CutoffModule.cs" />
|
<Compile Include="Wanted\CutoffModule.cs" />
|
||||||
<Compile Include="Wanted\LegacyMissingModule.cs" />
|
<Compile Include="Wanted\LegacyMissingModule.cs" />
|
||||||
<Compile Include="Wanted\MissingModule.cs" />
|
<Compile Include="Wanted\MissingModule.cs" />
|
||||||
|
<Compile Include="Wanted\MovieMissingModule.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
@@ -294,4 +295,4 @@
|
|||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace NzbDrone.Api.Wanted
|
|||||||
ISeriesService seriesService,
|
ISeriesService seriesService,
|
||||||
IQualityUpgradableSpecification qualityUpgradableSpecification,
|
IQualityUpgradableSpecification qualityUpgradableSpecification,
|
||||||
IBroadcastSignalRMessage signalRBroadcaster)
|
IBroadcastSignalRMessage signalRBroadcaster)
|
||||||
: base(episodeService, seriesService, qualityUpgradableSpecification, signalRBroadcaster, "wanted/missing")
|
: base(episodeService, seriesService, qualityUpgradableSpecification, signalRBroadcaster, "wanted/missing_episodes")
|
||||||
{
|
{
|
||||||
GetResourcePaged = GetMissingEpisodes;
|
GetResourcePaged = GetMissingEpisodes;
|
||||||
}
|
}
|
||||||
|
|||||||
77
src/NzbDrone.Api/Wanted/MovieMissingModule.cs
Normal file
77
src/NzbDrone.Api/Wanted/MovieMissingModule.cs
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
using NzbDrone.Api.Movie;
|
||||||
|
using NzbDrone.Api.Movies;
|
||||||
|
using NzbDrone.Core.DecisionEngine;
|
||||||
|
using NzbDrone.Core.Tv;
|
||||||
|
using NzbDrone.Core.Datastore;
|
||||||
|
using NzbDrone.SignalR;
|
||||||
|
using NzbDrone.Core.Download;
|
||||||
|
using NzbDrone.Core.MediaFiles.Events;
|
||||||
|
using NzbDrone.Core.Messaging.Events;
|
||||||
|
using System;
|
||||||
|
using NzbDrone.Core.Datastore.Events;
|
||||||
|
|
||||||
|
namespace NzbDrone.Api.Wanted
|
||||||
|
{
|
||||||
|
class MovieMissingModule : NzbDroneRestModuleWithSignalR<MovieResource, Core.Tv.Movie>,
|
||||||
|
IHandle<MovieGrabbedEvent>,
|
||||||
|
IHandle<MovieDownloadedEvent>
|
||||||
|
{
|
||||||
|
protected readonly IMovieService _movieService;
|
||||||
|
|
||||||
|
public MovieMissingModule(IMovieService movieService,
|
||||||
|
IQualityUpgradableSpecification qualityUpgradableSpecification,
|
||||||
|
IBroadcastSignalRMessage signalRBroadcaster)
|
||||||
|
: base(signalRBroadcaster, "wanted/missing")
|
||||||
|
{
|
||||||
|
|
||||||
|
_movieService = movieService;
|
||||||
|
GetResourcePaged = GetMissingMovies;
|
||||||
|
}
|
||||||
|
|
||||||
|
private PagingResource<MovieResource> GetMissingMovies(PagingResource<MovieResource> pagingResource)
|
||||||
|
{
|
||||||
|
var pagingSpec = pagingResource.MapToPagingSpec<MovieResource, Core.Tv.Movie>("physicalRelease", SortDirection.Descending);
|
||||||
|
|
||||||
|
if (pagingResource.FilterKey == "monitored" && pagingResource.FilterValue == "false")
|
||||||
|
{
|
||||||
|
pagingSpec.FilterExpression = v => v.Monitored == false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pagingSpec.FilterExpression = v => v.Monitored == true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var resource = ApplyToPage(_movieService.MoviesWithoutFiles, pagingSpec, v => MapToResource(v, false));
|
||||||
|
|
||||||
|
return resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
private MovieResource GetMovie(int id)
|
||||||
|
{
|
||||||
|
var movie = _movieService.GetMovie(id);
|
||||||
|
var resource = MapToResource(movie, true);
|
||||||
|
return resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
private MovieResource MapToResource(Core.Tv.Movie movie, bool includeMovieFile)
|
||||||
|
{
|
||||||
|
var resource = movie.ToResource();
|
||||||
|
return resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Handle(MovieGrabbedEvent message)
|
||||||
|
{
|
||||||
|
var resource = message.Movie.Movie.ToResource();
|
||||||
|
|
||||||
|
//add a grabbed field in MovieResource?
|
||||||
|
//resource.Grabbed = true;
|
||||||
|
|
||||||
|
BroadcastResourceChange(ModelAction.Updated, resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Handle(MovieDownloadedEvent message)
|
||||||
|
{
|
||||||
|
BroadcastResourceChange(ModelAction.Updated, message.Movie.Movie.Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -92,14 +92,14 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
|||||||
protected void GivenFailedDownload()
|
protected void GivenFailedDownload()
|
||||||
{
|
{
|
||||||
Mocker.GetMock<INzbgetProxy>()
|
Mocker.GetMock<INzbgetProxy>()
|
||||||
.Setup(s => s.DownloadNzb(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>(), It.IsAny<NzbgetSettings>()))
|
.Setup(s => s.DownloadNzb(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>(), It.IsAny<bool>(), It.IsAny<NzbgetSettings>()))
|
||||||
.Returns((string)null);
|
.Returns((string)null);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void GivenSuccessfulDownload()
|
protected void GivenSuccessfulDownload()
|
||||||
{
|
{
|
||||||
Mocker.GetMock<INzbgetProxy>()
|
Mocker.GetMock<INzbgetProxy>()
|
||||||
.Setup(s => s.DownloadNzb(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>(), It.IsAny<NzbgetSettings>()))
|
.Setup(s => s.DownloadNzb(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<int>(), It.IsAny<bool>(), It.IsAny<NzbgetSettings>()))
|
||||||
.Returns(Guid.NewGuid().ToString().Replace("-", ""));
|
.Returns(Guid.NewGuid().ToString().Replace("-", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
using System.Data;
|
||||||
|
using FluentMigrator;
|
||||||
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Datastore.Migration
|
||||||
|
{
|
||||||
|
[Migration(121)]
|
||||||
|
public class update_filedate_config : NzbDroneMigrationBase
|
||||||
|
{
|
||||||
|
protected override void MainDbUpgrade()
|
||||||
|
{
|
||||||
|
Execute.WithConnection(SetTitleSlug);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetTitleSlug(IDbConnection conn, IDbTransaction tran)
|
||||||
|
{
|
||||||
|
using (IDbCommand getSeriesCmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
getSeriesCmd.Transaction = tran;
|
||||||
|
getSeriesCmd.CommandText = @"SELECT Id, Value FROM Config WHERE Key = 'filedate'";
|
||||||
|
using (IDataReader seriesReader = getSeriesCmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (seriesReader.Read())
|
||||||
|
{
|
||||||
|
var id = seriesReader.GetInt32(0);
|
||||||
|
var value = seriesReader.GetString(1);
|
||||||
|
|
||||||
|
using (IDbCommand updateCmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
updateCmd.Transaction = tran;
|
||||||
|
updateCmd.CommandText = "UPDATE Config SET Value = 'Release' WHERE Id = ?";
|
||||||
|
updateCmd.AddParameter(id);
|
||||||
|
|
||||||
|
updateCmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ToUrlSlug(string value)
|
||||||
|
{
|
||||||
|
//First to lower case
|
||||||
|
value = value.ToLowerInvariant();
|
||||||
|
|
||||||
|
//Remove all accents
|
||||||
|
var bytes = Encoding.GetEncoding("Cyrillic").GetBytes(value);
|
||||||
|
value = Encoding.ASCII.GetString(bytes);
|
||||||
|
|
||||||
|
//Replace spaces
|
||||||
|
value = Regex.Replace(value, @"\s", "-", RegexOptions.Compiled);
|
||||||
|
|
||||||
|
//Remove invalid chars
|
||||||
|
value = Regex.Replace(value, @"[^a-z0-9\s-_]", "", RegexOptions.Compiled);
|
||||||
|
|
||||||
|
//Trim dashes from end
|
||||||
|
value = value.Trim('-', '_');
|
||||||
|
|
||||||
|
//Replace double occurences of - or _
|
||||||
|
value = Regex.Replace(value, @"([-_]){2,}", "$1", RegexOptions.Compiled);
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -68,6 +68,17 @@ namespace NzbDrone.Core.DecisionEngine
|
|||||||
private int CompareProtocol(DownloadDecision x, DownloadDecision y)
|
private int CompareProtocol(DownloadDecision x, DownloadDecision y)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if (x.IsForMovie)
|
||||||
|
{
|
||||||
|
return CompareBy(x.RemoteMovie, y.RemoteMovie, remoteEpisode =>
|
||||||
|
{
|
||||||
|
var delayProfile = _delayProfileService.BestForTags(remoteEpisode.Movie.Tags);
|
||||||
|
var downloadProtocol = remoteEpisode.Release.DownloadProtocol;
|
||||||
|
return downloadProtocol == delayProfile.PreferredProtocol;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var result = CompareBy(x.RemoteEpisode, y.RemoteEpisode, remoteEpisode =>
|
var result = CompareBy(x.RemoteEpisode, y.RemoteEpisode, remoteEpisode =>
|
||||||
{
|
{
|
||||||
var delayProfile = _delayProfileService.BestForTags(remoteEpisode.Series.Tags);
|
var delayProfile = _delayProfileService.BestForTags(remoteEpisode.Series.Tags);
|
||||||
@@ -75,15 +86,7 @@ namespace NzbDrone.Core.DecisionEngine
|
|||||||
return downloadProtocol == delayProfile.PreferredProtocol;
|
return downloadProtocol == delayProfile.PreferredProtocol;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (x.IsForMovie)
|
|
||||||
{
|
|
||||||
result = CompareBy(x.RemoteMovie, y.RemoteMovie, remoteEpisode =>
|
|
||||||
{
|
|
||||||
var delayProfile = _delayProfileService.BestForTags(remoteEpisode.Movie.Tags);
|
|
||||||
var downloadProtocol = remoteEpisode.Release.DownloadProtocol;
|
|
||||||
return downloadProtocol == delayProfile.PreferredProtocol;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -125,8 +128,8 @@ namespace NzbDrone.Core.DecisionEngine
|
|||||||
|
|
||||||
private int CompareAgeIfUsenet(DownloadDecision x, DownloadDecision y)
|
private int CompareAgeIfUsenet(DownloadDecision x, DownloadDecision y)
|
||||||
{
|
{
|
||||||
if (x.RemoteEpisode.Release.DownloadProtocol != DownloadProtocol.Usenet ||
|
if (x.RemoteMovie.Release.DownloadProtocol != DownloadProtocol.Usenet ||
|
||||||
y.RemoteEpisode.Release.DownloadProtocol != DownloadProtocol.Usenet)
|
y.RemoteMovie.Release.DownloadProtocol != DownloadProtocol.Usenet)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace NzbDrone.Core.DecisionEngine
|
|||||||
|
|
||||||
public List<DownloadDecision> GetRssDecision(List<ReleaseInfo> reports)
|
public List<DownloadDecision> GetRssDecision(List<ReleaseInfo> reports)
|
||||||
{
|
{
|
||||||
return GetDecisions(reports).ToList();
|
return GetMovieDecisions(reports).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DownloadDecision> GetSearchDecision(List<ReleaseInfo> reports, SearchCriteriaBase searchCriteriaBase)
|
public List<DownloadDecision> GetSearchDecision(List<ReleaseInfo> reports, SearchCriteriaBase searchCriteriaBase)
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ namespace NzbDrone.Core.DecisionEngine
|
|||||||
public List<DownloadDecision> PrioritizeDecisionsForMovies(List<DownloadDecision> decisions)
|
public List<DownloadDecision> PrioritizeDecisionsForMovies(List<DownloadDecision> decisions)
|
||||||
{
|
{
|
||||||
return decisions.Where(c => c.RemoteMovie.Movie != null)
|
return decisions.Where(c => c.RemoteMovie.Movie != null)
|
||||||
/*.GroupBy(c => c.RemoteMovie.Movie.Id, (movieId, downloadDecisions) =>
|
.GroupBy(c => c.RemoteMovie.Movie.Id, (movieId, downloadDecisions) =>
|
||||||
{
|
{
|
||||||
return downloadDecisions.OrderByDescending(decision => decision, new DownloadDecisionComparer(_delayProfileService));
|
return downloadDecisions.OrderByDescending(decision => decision, new DownloadDecisionComparer(_delayProfileService));
|
||||||
})
|
})
|
||||||
.SelectMany(c => c)*/
|
.SelectMany(c => c)
|
||||||
.Union(decisions.Where(c => c.RemoteMovie.Movie == null))
|
.Union(decisions.Where(c => c.RemoteMovie.Movie == null))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,9 +32,12 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
|||||||
protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContents)
|
protected override string AddFromNzbFile(RemoteEpisode remoteEpisode, string filename, byte[] fileContents)
|
||||||
{
|
{
|
||||||
var category = Settings.TvCategory;
|
var category = Settings.TvCategory;
|
||||||
|
|
||||||
var priority = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;
|
var priority = remoteEpisode.IsRecentEpisode() ? Settings.RecentTvPriority : Settings.OlderTvPriority;
|
||||||
|
|
||||||
var response = _proxy.DownloadNzb(fileContents, filename, category, priority, Settings);
|
var addpaused = Settings.AddPaused;
|
||||||
|
|
||||||
|
var response = _proxy.DownloadNzb(fileContents, filename, category, priority, addpaused, Settings);
|
||||||
|
|
||||||
if (response == null)
|
if (response == null)
|
||||||
{
|
{
|
||||||
@@ -47,9 +50,12 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
|||||||
protected override string AddFromNzbFile(RemoteMovie remoteMovie, string filename, byte[] fileContents)
|
protected override string AddFromNzbFile(RemoteMovie remoteMovie, string filename, byte[] fileContents)
|
||||||
{
|
{
|
||||||
var category = Settings.TvCategory; // TODO: Update this to MovieCategory?
|
var category = Settings.TvCategory; // TODO: Update this to MovieCategory?
|
||||||
|
|
||||||
var priority = Settings.RecentTvPriority;
|
var priority = Settings.RecentTvPriority;
|
||||||
|
|
||||||
var response = _proxy.DownloadNzb(fileContents, filename, category, priority, Settings);
|
var addpaused = Settings.AddPaused;
|
||||||
|
|
||||||
|
var response = _proxy.DownloadNzb(fileContents, filename, category, priority, addpaused, Settings);
|
||||||
|
|
||||||
if(response == null)
|
if(response == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
|||||||
{
|
{
|
||||||
public interface INzbgetProxy
|
public interface INzbgetProxy
|
||||||
{
|
{
|
||||||
string DownloadNzb(byte[] nzbData, string title, string category, int priority, NzbgetSettings settings);
|
string DownloadNzb(byte[] nzbData, string title, string category, int priority, bool addpaused, NzbgetSettings settings);
|
||||||
NzbgetGlobalStatus GetGlobalStatus(NzbgetSettings settings);
|
NzbgetGlobalStatus GetGlobalStatus(NzbgetSettings settings);
|
||||||
List<NzbgetQueueItem> GetQueue(NzbgetSettings settings);
|
List<NzbgetQueueItem> GetQueue(NzbgetSettings settings);
|
||||||
List<NzbgetHistoryItem> GetHistory(NzbgetSettings settings);
|
List<NzbgetHistoryItem> GetHistory(NzbgetSettings settings);
|
||||||
@@ -45,12 +45,12 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
|||||||
return version >= minimumVersion;
|
return version >= minimumVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string DownloadNzb(byte[] nzbData, string title, string category, int priority, NzbgetSettings settings)
|
public string DownloadNzb(byte[] nzbData, string title, string category, int priority, bool addpaused, NzbgetSettings settings)
|
||||||
{
|
{
|
||||||
if (HasVersion(16, settings))
|
if (HasVersion(16, settings))
|
||||||
{
|
{
|
||||||
var droneId = Guid.NewGuid().ToString().Replace("-", "");
|
var droneId = Guid.NewGuid().ToString().Replace("-", "");
|
||||||
var response = ProcessRequest<int>(settings, "append", title, nzbData, category, priority, false, false, string.Empty, 0, "all", new string[] { "drone", droneId });
|
var response = ProcessRequest<int>(settings, "append", title, nzbData, category, priority, false, addpaused, string.Empty, 0, "all", new string[] { "drone", droneId });
|
||||||
if (response <= 0)
|
if (response <= 0)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
|||||||
[FieldDefinition(7, Label = "Use SSL", Type = FieldType.Checkbox)]
|
[FieldDefinition(7, Label = "Use SSL", Type = FieldType.Checkbox)]
|
||||||
public bool UseSsl { get; set; }
|
public bool UseSsl { get; set; }
|
||||||
|
|
||||||
|
[FieldDefinition(8, Label = "Add Paused", Type = FieldType.Checkbox)]
|
||||||
|
public bool AddPaused { get; set; }
|
||||||
|
|
||||||
public NzbDroneValidationResult Validate()
|
public NzbDroneValidationResult Validate()
|
||||||
{
|
{
|
||||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using NzbDrone.Common.Http;
|
using NzbDrone.Common.Http;
|
||||||
@@ -36,7 +37,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
|
|||||||
torrentInfo.Size = (long)torrent.size*1000*1000;
|
torrentInfo.Size = (long)torrent.size*1000*1000;
|
||||||
torrentInfo.DownloadUrl = torrent.download_url;
|
torrentInfo.DownloadUrl = torrent.download_url;
|
||||||
torrentInfo.InfoUrl = torrent.details_url;
|
torrentInfo.InfoUrl = torrent.details_url;
|
||||||
torrentInfo.PublishDate = torrent.publishdate.ToUniversalTime();
|
torrentInfo.PublishDate = torrent.publish_date.ToUniversalTime();
|
||||||
torrentInfo.Seeders = torrent.seeders;
|
torrentInfo.Seeders = torrent.seeders;
|
||||||
torrentInfo.Peers = torrent.leechers + torrent.seeders;
|
torrentInfo.Peers = torrent.leechers + torrent.seeders;
|
||||||
torrentInfo.Freeleech = torrent.freeleech;
|
torrentInfo.Freeleech = torrent.freeleech;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato
|
|||||||
public int size { get; set; }
|
public int size { get; set; }
|
||||||
public int leechers { get; set; }
|
public int leechers { get; set; }
|
||||||
public int seeders { get; set; }
|
public int seeders { get; set; }
|
||||||
public DateTime publishdate { get; set; }
|
public DateTime publish_date { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,13 @@ namespace NzbDrone.Core.Indexers.Torznab
|
|||||||
protected override ReleaseInfo ProcessItem(XElement item, ReleaseInfo releaseInfo)
|
protected override ReleaseInfo ProcessItem(XElement item, ReleaseInfo releaseInfo)
|
||||||
{
|
{
|
||||||
var torrentInfo = base.ProcessItem(item, releaseInfo) as TorrentInfo;
|
var torrentInfo = base.ProcessItem(item, releaseInfo) as TorrentInfo;
|
||||||
torrentInfo.ImdbId = int.Parse(GetImdbId(item).Substring(2));
|
if (GetImdbId(item) != null)
|
||||||
|
{
|
||||||
|
if (torrentInfo != null)
|
||||||
|
{
|
||||||
|
torrentInfo.ImdbId = int.Parse(GetImdbId(item).Substring(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
return torrentInfo;
|
return torrentInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,9 +64,9 @@ namespace NzbDrone.Core.Jobs
|
|||||||
new ScheduledTask{ Interval = 0.25f, TypeName = typeof(CheckForFinishedDownloadCommand).FullName},
|
new ScheduledTask{ Interval = 0.25f, TypeName = typeof(CheckForFinishedDownloadCommand).FullName},
|
||||||
new ScheduledTask{ Interval = 5, TypeName = typeof(MessagingCleanupCommand).FullName},
|
new ScheduledTask{ Interval = 5, TypeName = typeof(MessagingCleanupCommand).FullName},
|
||||||
new ScheduledTask{ Interval = 6*60, TypeName = typeof(ApplicationUpdateCommand).FullName},
|
new ScheduledTask{ Interval = 6*60, TypeName = typeof(ApplicationUpdateCommand).FullName},
|
||||||
new ScheduledTask{ Interval = 3*60, TypeName = typeof(UpdateSceneMappingCommand).FullName},
|
// new ScheduledTask{ Interval = 3*60, TypeName = typeof(UpdateSceneMappingCommand).FullName},
|
||||||
new ScheduledTask{ Interval = 6*60, TypeName = typeof(CheckHealthCommand).FullName},
|
new ScheduledTask{ Interval = 6*60, TypeName = typeof(CheckHealthCommand).FullName},
|
||||||
new ScheduledTask{ Interval = 12*60, TypeName = typeof(RefreshSeriesCommand).FullName},
|
new ScheduledTask{ Interval = 24*60, TypeName = typeof(RefreshMovieCommand).FullName},
|
||||||
new ScheduledTask{ Interval = 24*60, TypeName = typeof(HousekeepingCommand).FullName},
|
new ScheduledTask{ Interval = 24*60, TypeName = typeof(HousekeepingCommand).FullName},
|
||||||
new ScheduledTask{ Interval = 7*24*60, TypeName = typeof(BackupCommand).FullName},
|
new ScheduledTask{ Interval = 7*24*60, TypeName = typeof(BackupCommand).FullName},
|
||||||
|
|
||||||
@@ -80,6 +80,7 @@ namespace NzbDrone.Core.Jobs
|
|||||||
{
|
{
|
||||||
Interval = _configService.DownloadedEpisodesScanInterval,
|
Interval = _configService.DownloadedEpisodesScanInterval,
|
||||||
TypeName = typeof(DownloadedEpisodesScanCommand).FullName
|
TypeName = typeof(DownloadedEpisodesScanCommand).FullName
|
||||||
|
//TypeName = typeof(DownloadedMovieScanCommand).FullName
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
public enum FileDateType
|
public enum FileDateType
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
LocalAirDate = 1,
|
Cinemas = 1,
|
||||||
UtcAirDate = 2
|
Release = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,11 @@ namespace NzbDrone.Core.MediaFiles.MediaInfo
|
|||||||
return AudioChannelPositionsText.ContainsIgnoreCase("LFE") ? AudioChannels - 1 + 0.1m : AudioChannels;
|
return AudioChannelPositionsText.ContainsIgnoreCase("LFE") ? AudioChannels - 1 + 0.1m : AudioChannels;
|
||||||
}
|
}
|
||||||
|
|
||||||
return AudioChannelPositions.Split('/').Sum(s => decimal.Parse(s, CultureInfo.InvariantCulture));
|
decimal channels = 0;
|
||||||
|
|
||||||
|
decimal.TryParse(AudioChannelPositions.Split('/').First(), out channels);
|
||||||
|
|
||||||
|
return channels;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||||||
|
|
||||||
switch (_configService.FileDate)
|
switch (_configService.FileDate)
|
||||||
{
|
{
|
||||||
case FileDateType.LocalAirDate:
|
case FileDateType.Release:
|
||||||
{
|
{
|
||||||
var airDate = episodes.First().AirDate;
|
var airDate = episodes.First().AirDate;
|
||||||
var airTime = series.AirTime;
|
var airTime = series.AirTime;
|
||||||
@@ -62,7 +62,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||||||
return ChangeFileDateToLocalAirDate(episodeFilePath, airDate, airTime);
|
return ChangeFileDateToLocalAirDate(episodeFilePath, airDate, airTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
case FileDateType.UtcAirDate:
|
case FileDateType.Cinemas:
|
||||||
{
|
{
|
||||||
var airDateUtc = episodes.First().AirDateUtc;
|
var airDateUtc = episodes.First().AirDateUtc;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace NzbDrone.Core.MediaFiles
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class UpdateMovieFileService : IUpdateMovieFileService,
|
public class UpdateMovieFileService : IUpdateMovieFileService,
|
||||||
IHandle<SeriesScannedEvent>
|
IHandle<MovieScannedEvent>
|
||||||
{
|
{
|
||||||
private readonly IDiskProvider _diskProvider;
|
private readonly IDiskProvider _diskProvider;
|
||||||
private readonly IConfigService _configService;
|
private readonly IConfigService _configService;
|
||||||
@@ -47,10 +47,60 @@ namespace NzbDrone.Core.MediaFiles
|
|||||||
{
|
{
|
||||||
var movieFilePath = Path.Combine(movie.Path, movieFile.RelativePath);
|
var movieFilePath = Path.Combine(movie.Path, movieFile.RelativePath);
|
||||||
|
|
||||||
|
switch (_configService.FileDate)
|
||||||
|
{
|
||||||
|
case FileDateType.Release:
|
||||||
|
{
|
||||||
|
var airDate = movie.PhysicalRelease;
|
||||||
|
|
||||||
|
if (airDate == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ChangeFileDate(movieFilePath, airDate.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
case FileDateType.Cinemas:
|
||||||
|
{
|
||||||
|
var airDate = movie.InCinemas;
|
||||||
|
|
||||||
|
if (airDate == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ChangeFileDate(movieFilePath, airDate.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Handle(SeriesScannedEvent message)
|
private bool ChangeFileDate(string filePath, DateTime date)
|
||||||
|
{
|
||||||
|
DateTime oldDateTime = _diskProvider.FileGetLastWrite(filePath);
|
||||||
|
|
||||||
|
if (!DateTime.Equals(date, oldDateTime))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_diskProvider.FileSetLastWriteTime(filePath, date);
|
||||||
|
_logger.Debug("Date of file [{0}] changed from '{1}' to '{2}'", filePath, oldDateTime, date);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.Warn(ex, "Unable to set date of file [" + filePath + "]");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Handle(MovieScannedEvent message)
|
||||||
{
|
{
|
||||||
if (_configService.FileDate == FileDateType.None)
|
if (_configService.FileDate == FileDateType.None)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,9 +89,9 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||||||
movie.TmdbId = TmdbId;
|
movie.TmdbId = TmdbId;
|
||||||
movie.ImdbId = resource.imdb_id;
|
movie.ImdbId = resource.imdb_id;
|
||||||
movie.Title = resource.title;
|
movie.Title = resource.title;
|
||||||
movie.TitleSlug = ToUrlSlug(movie.Title);
|
movie.TitleSlug = ToUrlSlug(resource.title);
|
||||||
movie.CleanTitle = Parser.Parser.CleanSeriesTitle(movie.Title);
|
movie.CleanTitle = Parser.Parser.CleanSeriesTitle(resource.title);
|
||||||
movie.SortTitle = Parser.Parser.NormalizeTitle(movie.Title);
|
movie.SortTitle = Parser.Parser.NormalizeTitle(resource.title);
|
||||||
movie.Overview = resource.overview;
|
movie.Overview = resource.overview;
|
||||||
movie.Website = resource.homepage;
|
movie.Website = resource.homepage;
|
||||||
if (resource.release_date.IsNotNullOrWhiteSpace())
|
if (resource.release_date.IsNotNullOrWhiteSpace())
|
||||||
@@ -152,19 +152,25 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||||||
|
|
||||||
if (resource.videos != null)
|
if (resource.videos != null)
|
||||||
{
|
{
|
||||||
foreach(Video video in resource.videos.results)
|
foreach (Video video in resource.videos.results)
|
||||||
{
|
{
|
||||||
if(video.type == "Trailer" && video.site == "YouTube")
|
if (video.type == "Trailer" && video.site == "YouTube")
|
||||||
{
|
{
|
||||||
movie.YouTubeTrailerId = video.key;
|
if (video.key != null)
|
||||||
break;
|
{
|
||||||
|
movie.YouTubeTrailerId = video.key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resource.production_companies != null && resource.production_companies.Count() > 0)
|
if (resource.production_companies != null)
|
||||||
{
|
{
|
||||||
movie.Studio = resource.production_companies[0].name;
|
if (resource.production_companies.Any())
|
||||||
|
{
|
||||||
|
movie.Studio = resource.production_companies[0].name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return movie;
|
return movie;
|
||||||
@@ -203,6 +209,8 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||||||
{
|
{
|
||||||
var lowerTitle = title.ToLower();
|
var lowerTitle = title.ToLower();
|
||||||
|
|
||||||
|
lowerTitle = lowerTitle.Replace(".", "");
|
||||||
|
|
||||||
var parserResult = Parser.Parser.ParseMovieTitle(title, true);
|
var parserResult = Parser.Parser.ParseMovieTitle(title, true);
|
||||||
|
|
||||||
var yearTerm = "";
|
var yearTerm = "";
|
||||||
@@ -210,7 +218,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||||||
if (parserResult != null && parserResult.MovieTitle != title)
|
if (parserResult != null && parserResult.MovieTitle != title)
|
||||||
{
|
{
|
||||||
//Parser found something interesting!
|
//Parser found something interesting!
|
||||||
lowerTitle = parserResult.MovieTitle.ToLower();
|
lowerTitle = parserResult.MovieTitle.ToLower().Replace(".", " "); //TODO Update so not every period gets replaced (e.g. R.I.P.D.)
|
||||||
if (parserResult.Year > 1800)
|
if (parserResult.Year > 1800)
|
||||||
{
|
{
|
||||||
yearTerm = parserResult.Year.ToString();
|
yearTerm = parserResult.Year.ToString();
|
||||||
@@ -343,25 +351,19 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||||||
{
|
{
|
||||||
imdbMovie.SortTitle = Parser.Parser.NormalizeTitle(result.title);
|
imdbMovie.SortTitle = Parser.Parser.NormalizeTitle(result.title);
|
||||||
imdbMovie.Title = result.title;
|
imdbMovie.Title = result.title;
|
||||||
string titleSlug = ToUrlSlug(result.title);
|
imdbMovie.TitleSlug = ToUrlSlug(result.title);
|
||||||
imdbMovie.TitleSlug = titleSlug.ToLower().Replace(" ", "-");
|
|
||||||
|
|
||||||
if (result.release_date.IsNotNullOrWhiteSpace())
|
if (result.release_date.IsNotNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
imdbMovie.Year = DateTime.Parse(result.release_date).Year;
|
imdbMovie.Year = DateTime.Parse(result.release_date).Year;
|
||||||
}
|
}
|
||||||
//var slugResult = _movieService.FindByTitleSlug(imdbMovie.TitleSlug);
|
|
||||||
//if (slugResult != null)
|
imdbMovie.TitleSlug += "-" + imdbMovie.Year;
|
||||||
//{
|
|
||||||
// _logger.Debug("Movie with this title slug already exists. Adding year...");
|
|
||||||
//}
|
|
||||||
imdbMovie.TitleSlug += "-" + imdbMovie.Year.ToString();
|
|
||||||
|
|
||||||
imdbMovie.Images = new List<MediaCover.MediaCover>();
|
imdbMovie.Images = new List<MediaCover.MediaCover>();
|
||||||
imdbMovie.Overview = result.overview;
|
imdbMovie.Overview = result.overview;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string url = result.poster_path;
|
|
||||||
var imdbPoster = _configService.GetCoverForURL(result.poster_path, MediaCoverTypes.Poster);
|
var imdbPoster = _configService.GetCoverForURL(result.poster_path, MediaCoverTypes.Poster);
|
||||||
imdbMovie.Images.Add(imdbPoster);
|
imdbMovie.Images.Add(imdbPoster);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
public enum PushoverPriority
|
public enum PushoverPriority
|
||||||
{
|
{
|
||||||
Silent = -1,
|
Silent = -2,
|
||||||
Quiet = -1,
|
Quiet = -1,
|
||||||
Normal = 0,
|
Normal = 0,
|
||||||
High = 1,
|
High = 1,
|
||||||
|
|||||||
@@ -183,6 +183,7 @@
|
|||||||
<Compile Include="Datastore\Migration\002_remove_tvrage_imdb_unique_constraint.cs" />
|
<Compile Include="Datastore\Migration\002_remove_tvrage_imdb_unique_constraint.cs" />
|
||||||
<Compile Include="Datastore\Migration\003_remove_clean_title_from_scene_mapping.cs" />
|
<Compile Include="Datastore\Migration\003_remove_clean_title_from_scene_mapping.cs" />
|
||||||
<Compile Include="Datastore\Migration\004_updated_history.cs" />
|
<Compile Include="Datastore\Migration\004_updated_history.cs" />
|
||||||
|
<Compile Include="Datastore\Migration\121_update_filedate_config.cs" />
|
||||||
<Compile Include="Datastore\Migration\120_add_studio_to_table.cs" />
|
<Compile Include="Datastore\Migration\120_add_studio_to_table.cs" />
|
||||||
<Compile Include="Datastore\Migration\119_add_youtube_trailer_id_table .cs" />
|
<Compile Include="Datastore\Migration\119_add_youtube_trailer_id_table .cs" />
|
||||||
<Compile Include="Datastore\Migration\118_update_movie_slug.cs" />
|
<Compile Include="Datastore\Migration\118_update_movie_slug.cs" />
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ namespace NzbDrone.Core.Organizer
|
|||||||
|
|
||||||
AddMovieTokens(tokenHandlers, movie);
|
AddMovieTokens(tokenHandlers, movie);
|
||||||
AddReleaseDateTokens(tokenHandlers, movie.Year); //In case we want to separate the year
|
AddReleaseDateTokens(tokenHandlers, movie.Year); //In case we want to separate the year
|
||||||
|
AddImdbIdTokens(tokenHandlers, movie.ImdbId);
|
||||||
AddQualityTokens(tokenHandlers, movie, movieFile);
|
AddQualityTokens(tokenHandlers, movie, movieFile);
|
||||||
AddMediaInfoTokens(tokenHandlers, movieFile);
|
AddMediaInfoTokens(tokenHandlers, movieFile);
|
||||||
AddMovieFileTokens(tokenHandlers, movieFile);
|
AddMovieFileTokens(tokenHandlers, movieFile);
|
||||||
@@ -301,6 +302,7 @@ namespace NzbDrone.Core.Organizer
|
|||||||
|
|
||||||
AddMovieTokens(tokenHandlers, movie);
|
AddMovieTokens(tokenHandlers, movie);
|
||||||
AddReleaseDateTokens(tokenHandlers, movie.Year);
|
AddReleaseDateTokens(tokenHandlers, movie.Year);
|
||||||
|
AddImdbIdTokens(tokenHandlers, movie.ImdbId);
|
||||||
|
|
||||||
return CleanFolderName(ReplaceTokens(namingConfig.MovieFolderFormat, tokenHandlers, namingConfig));
|
return CleanFolderName(ReplaceTokens(namingConfig.MovieFolderFormat, tokenHandlers, namingConfig));
|
||||||
}
|
}
|
||||||
@@ -318,7 +320,7 @@ namespace NzbDrone.Core.Organizer
|
|||||||
{
|
{
|
||||||
string result = name;
|
string result = name;
|
||||||
string[] badCharacters = { "\\", "/", "<", ">", "?", "*", ":", "|", "\"" };
|
string[] badCharacters = { "\\", "/", "<", ">", "?", "*", ":", "|", "\"" };
|
||||||
string[] goodCharacters = { "+", "+", "", "", "!", "-", "-", "", "" };
|
string[] goodCharacters = { "+", "+", "", "", "!", "-", "", "", "" };
|
||||||
|
|
||||||
for (int i = 0; i < badCharacters.Length; i++)
|
for (int i = 0; i < badCharacters.Length; i++)
|
||||||
{
|
{
|
||||||
@@ -477,6 +479,11 @@ namespace NzbDrone.Core.Organizer
|
|||||||
tokenHandlers["{Release Year}"] = m => string.Format("{0}", releaseYear.ToString()); //Do I need m.CustomFormat?
|
tokenHandlers["{Release Year}"] = m => string.Format("{0}", releaseYear.ToString()); //Do I need m.CustomFormat?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AddImdbIdTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, string imdbId)
|
||||||
|
{
|
||||||
|
tokenHandlers["{IMDb Id}"] = m => $"{imdbId}";
|
||||||
|
}
|
||||||
|
|
||||||
private void AddSeasonTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, int seasonNumber)
|
private void AddSeasonTokens(Dictionary<string, Func<TokenMatch, string>> tokenHandlers, int seasonNumber)
|
||||||
{
|
{
|
||||||
tokenHandlers["{Season}"] = m => seasonNumber.ToString(m.CustomFormat);
|
tokenHandlers["{Season}"] = m => seasonNumber.ToString(m.CustomFormat);
|
||||||
@@ -508,6 +515,7 @@ namespace NzbDrone.Core.Organizer
|
|||||||
{
|
{
|
||||||
tokenHandlers["{Original Title}"] = m => GetOriginalTitle(episodeFile);
|
tokenHandlers["{Original Title}"] = m => GetOriginalTitle(episodeFile);
|
||||||
tokenHandlers["{Original Filename}"] = m => GetOriginalFileName(episodeFile);
|
tokenHandlers["{Original Filename}"] = m => GetOriginalFileName(episodeFile);
|
||||||
|
//tokenHandlers["{IMDb Id}"] = m =>
|
||||||
tokenHandlers["{Release Group}"] = m => episodeFile.ReleaseGroup ?? m.DefaultValue("Sonarr");
|
tokenHandlers["{Release Group}"] = m => episodeFile.ReleaseGroup ?? m.DefaultValue("Sonarr");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ namespace NzbDrone.Core.Organizer
|
|||||||
_movie = new Movie
|
_movie = new Movie
|
||||||
{
|
{
|
||||||
Title = "Movie Title",
|
Title = "Movie Title",
|
||||||
Year = 2010
|
Year = 2010,
|
||||||
|
ImdbId = "tt0066921"
|
||||||
};
|
};
|
||||||
|
|
||||||
_standardSeries = new Series
|
_standardSeries = new Series
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using System.Linq;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NzbDrone.Core.Datastore;
|
using NzbDrone.Core.Datastore;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
|
using NzbDrone.Core.Datastore.Extensions;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Tv
|
namespace NzbDrone.Core.Tv
|
||||||
{
|
{
|
||||||
@@ -15,6 +15,7 @@ namespace NzbDrone.Core.Tv
|
|||||||
Movie FindByImdbId(string imdbid);
|
Movie FindByImdbId(string imdbid);
|
||||||
Movie FindByTitleSlug(string slug);
|
Movie FindByTitleSlug(string slug);
|
||||||
List<Movie> MoviesBetweenDates(DateTime start, DateTime end, bool includeUnmonitored);
|
List<Movie> MoviesBetweenDates(DateTime start, DateTime end, bool includeUnmonitored);
|
||||||
|
PagingSpec<Movie> MoviesWithoutFiles(PagingSpec<Movie> pagingSpec);
|
||||||
List<Movie> GetMoviesByFileId(int fileId);
|
List<Movie> GetMoviesByFileId(int fileId);
|
||||||
void SetFileId(int fileId, int movieId);
|
void SetFileId(int fileId, int movieId);
|
||||||
}
|
}
|
||||||
@@ -132,5 +133,21 @@ namespace NzbDrone.Core.Tv
|
|||||||
|
|
||||||
return query.ToList();
|
return query.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PagingSpec<Movie> MoviesWithoutFiles(PagingSpec<Movie> pagingSpec)
|
||||||
|
{
|
||||||
|
|
||||||
|
var query = Query.Where(pagingSpec.FilterExpression)
|
||||||
|
.AndWhere(m => m.MovieFileId == 0)
|
||||||
|
.AndWhere(m => m.Status == MovieStatusType.Released)
|
||||||
|
.OrderBy(pagingSpec.OrderByClause(), pagingSpec.ToSortDirection())
|
||||||
|
.Skip(pagingSpec.PagingOffset())
|
||||||
|
.Take(pagingSpec.PageSize);
|
||||||
|
|
||||||
|
pagingSpec.Records = query.ToList();
|
||||||
|
pagingSpec.TotalRecords = pagingSpec.Records.Count;
|
||||||
|
|
||||||
|
return pagingSpec;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ using NzbDrone.Core.Parser;
|
|||||||
using NzbDrone.Core.Tv.Events;
|
using NzbDrone.Core.Tv.Events;
|
||||||
using NzbDrone.Core.MediaFiles;
|
using NzbDrone.Core.MediaFiles;
|
||||||
using NzbDrone.Core.MediaFiles.Events;
|
using NzbDrone.Core.MediaFiles.Events;
|
||||||
|
using NzbDrone.Core.Datastore;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Tv
|
namespace NzbDrone.Core.Tv
|
||||||
{
|
{
|
||||||
@@ -27,6 +28,7 @@ namespace NzbDrone.Core.Tv
|
|||||||
Movie FindByTitleSlug(string slug);
|
Movie FindByTitleSlug(string slug);
|
||||||
Movie GetMovieByFileId(int fileId);
|
Movie GetMovieByFileId(int fileId);
|
||||||
List<Movie> GetMoviesBetweenDates(DateTime start, DateTime end, bool includeUnmonitored);
|
List<Movie> GetMoviesBetweenDates(DateTime start, DateTime end, bool includeUnmonitored);
|
||||||
|
PagingSpec<Movie> MoviesWithoutFiles(PagingSpec<Movie> pagingSpec);
|
||||||
void DeleteMovie(int movieId, bool deleteFiles);
|
void DeleteMovie(int movieId, bool deleteFiles);
|
||||||
List<Movie> GetAllMovies();
|
List<Movie> GetAllMovies();
|
||||||
Movie UpdateMovie(Movie movie);
|
Movie UpdateMovie(Movie movie);
|
||||||
@@ -232,5 +234,12 @@ namespace NzbDrone.Core.Tv
|
|||||||
|
|
||||||
return episodes;
|
return episodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PagingSpec<Movie> MoviesWithoutFiles(PagingSpec<Movie> pagingSpec)
|
||||||
|
{
|
||||||
|
var movieResult = _movieRepository.MoviesWithoutFiles(pagingSpec);
|
||||||
|
|
||||||
|
return movieResult;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,178 +9,178 @@ var ErrorView = require('./ErrorView');
|
|||||||
var LoadingView = require('../Shared/LoadingView');
|
var LoadingView = require('../Shared/LoadingView');
|
||||||
|
|
||||||
module.exports = Marionette.Layout.extend({
|
module.exports = Marionette.Layout.extend({
|
||||||
template : 'AddMovies/AddMoviesViewTemplate',
|
template : 'AddMovies/AddMoviesViewTemplate',
|
||||||
|
|
||||||
regions : {
|
regions : {
|
||||||
searchResult : '#search-result'
|
searchResult : '#search-result'
|
||||||
},
|
},
|
||||||
|
|
||||||
ui : {
|
ui : {
|
||||||
moviesSearch : '.x-movies-search',
|
moviesSearch : '.x-movies-search',
|
||||||
searchBar : '.x-search-bar',
|
searchBar : '.x-search-bar',
|
||||||
loadMore : '.x-load-more'
|
loadMore : '.x-load-more'
|
||||||
},
|
},
|
||||||
|
|
||||||
events : {
|
events : {
|
||||||
'click .x-load-more' : '_onLoadMore'
|
'click .x-load-more' : '_onLoadMore'
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize : function(options) {
|
||||||
console.log(options);
|
console.log(options);
|
||||||
|
|
||||||
this.isExisting = options.isExisting;
|
|
||||||
this.collection = new AddMoviesCollection();
|
|
||||||
|
|
||||||
if (this.isExisting) {
|
this.isExisting = options.isExisting;
|
||||||
this.collection.unmappedFolderModel = this.model;
|
this.collection = new AddMoviesCollection();
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isExisting) {
|
if (this.isExisting) {
|
||||||
this.className = 'existing-movies';
|
this.collection.unmappedFolderModel = this.model;
|
||||||
} else {
|
}
|
||||||
this.className = 'new-movies';
|
|
||||||
}
|
|
||||||
|
|
||||||
this.listenTo(vent, vent.Events.MoviesAdded, this._onMoviesAdded);
|
if (this.isExisting) {
|
||||||
this.listenTo(this.collection, 'sync', this._showResults);
|
this.className = 'existing-movies';
|
||||||
|
} else {
|
||||||
|
this.className = 'new-movies';
|
||||||
|
}
|
||||||
|
|
||||||
this.resultCollectionView = new SearchResultCollectionView({
|
this.listenTo(vent, vent.Events.MoviesAdded, this._onMoviesAdded);
|
||||||
collection : this.collection,
|
this.listenTo(this.collection, 'sync', this._showResults);
|
||||||
isExisting : this.isExisting
|
|
||||||
});
|
|
||||||
|
|
||||||
this.throttledSearch = _.debounce(this.search, 1000, { trailing : true }).bind(this);
|
this.resultCollectionView = new SearchResultCollectionView({
|
||||||
},
|
collection : this.collection,
|
||||||
|
isExisting : this.isExisting
|
||||||
|
});
|
||||||
|
|
||||||
onRender : function() {
|
this.throttledSearch = _.debounce(this.search, 1000, { trailing : true }).bind(this);
|
||||||
var self = this;
|
},
|
||||||
|
|
||||||
this.$el.addClass(this.className);
|
onRender : function() {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
this.ui.moviesSearch.keyup(function(e) {
|
this.$el.addClass(this.className);
|
||||||
|
|
||||||
if (_.contains([
|
this.ui.moviesSearch.keyup(function(e) {
|
||||||
9,
|
|
||||||
16,
|
|
||||||
17,
|
|
||||||
18,
|
|
||||||
19,
|
|
||||||
20,
|
|
||||||
33,
|
|
||||||
34,
|
|
||||||
35,
|
|
||||||
36,
|
|
||||||
37,
|
|
||||||
38,
|
|
||||||
39,
|
|
||||||
40,
|
|
||||||
91,
|
|
||||||
92,
|
|
||||||
93
|
|
||||||
], e.keyCode)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
self._abortExistingSearch();
|
if (_.contains([
|
||||||
self.throttledSearch({
|
9,
|
||||||
term : self.ui.moviesSearch.val()
|
16,
|
||||||
});
|
17,
|
||||||
});
|
18,
|
||||||
|
19,
|
||||||
|
20,
|
||||||
|
33,
|
||||||
|
34,
|
||||||
|
35,
|
||||||
|
36,
|
||||||
|
37,
|
||||||
|
38,
|
||||||
|
39,
|
||||||
|
40,
|
||||||
|
91,
|
||||||
|
92,
|
||||||
|
93
|
||||||
|
], e.keyCode)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._clearResults();
|
self._abortExistingSearch();
|
||||||
|
self.throttledSearch({
|
||||||
|
term : self.ui.moviesSearch.val()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
if (this.isExisting) {
|
this._clearResults();
|
||||||
this.ui.searchBar.hide();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onShow : function() {
|
if (this.isExisting) {
|
||||||
this.ui.moviesSearch.focus();
|
this.ui.searchBar.hide();
|
||||||
},
|
}
|
||||||
|
},
|
||||||
|
|
||||||
search : function(options) {
|
onShow : function() {
|
||||||
var self = this;
|
this.ui.moviesSearch.focus();
|
||||||
|
},
|
||||||
|
|
||||||
this.collection.reset();
|
search : function(options) {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
if (!options.term || options.term === this.collection.term) {
|
this.collection.reset();
|
||||||
return Marionette.$.Deferred().resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.searchResult.show(new LoadingView());
|
if (!options.term || options.term === this.collection.term) {
|
||||||
this.collection.term = options.term;
|
return Marionette.$.Deferred().resolve();
|
||||||
this.currentSearchPromise = this.collection.fetch({
|
}
|
||||||
data : { term : options.term }
|
|
||||||
});
|
|
||||||
|
|
||||||
this.currentSearchPromise.fail(function() {
|
this.searchResult.show(new LoadingView());
|
||||||
self._showError();
|
this.collection.term = options.term;
|
||||||
});
|
this.currentSearchPromise = this.collection.fetch({
|
||||||
|
data : { term : options.term }
|
||||||
|
});
|
||||||
|
|
||||||
return this.currentSearchPromise;
|
this.currentSearchPromise.fail(function() {
|
||||||
},
|
self._showError();
|
||||||
|
});
|
||||||
|
|
||||||
_onMoviesAdded : function(options) {
|
return this.currentSearchPromise;
|
||||||
if (this.isExisting && options.movie.get('path') === this.model.get('folder').path) {
|
},
|
||||||
this.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (!this.isExisting) {
|
_onMoviesAdded : function(options) {
|
||||||
this.resultCollectionView.setExisting(options.movie.get('tmdbId'));
|
if (this.isExisting && options.movie.get('path') === this.model.get('folder').path) {
|
||||||
/*this.collection.term = '';
|
this.close();
|
||||||
this.collection.reset();
|
}
|
||||||
this._clearResults();
|
|
||||||
this.ui.moviesSearch.val('');
|
|
||||||
this.ui.moviesSearch.focus();*/ //TODO: Maybe add option wheter to clear search result.
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_onLoadMore : function() {
|
else if (!this.isExisting) {
|
||||||
var showingAll = this.resultCollectionView.showMore();
|
this.resultCollectionView.setExisting(options.movie.get('tmdbId'));
|
||||||
this.ui.searchBar.show();
|
/*this.collection.term = '';
|
||||||
|
this.collection.reset();
|
||||||
|
this._clearResults();
|
||||||
|
this.ui.moviesSearch.val('');
|
||||||
|
this.ui.moviesSearch.focus();*/ //TODO: Maybe add option wheter to clear search result.
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
if (showingAll) {
|
_onLoadMore : function() {
|
||||||
this.ui.loadMore.hide();
|
var showingAll = this.resultCollectionView.showMore();
|
||||||
}
|
this.ui.searchBar.show();
|
||||||
},
|
|
||||||
|
|
||||||
_clearResults : function() {
|
if (showingAll) {
|
||||||
|
this.ui.loadMore.hide();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
if (!this.isExisting) {
|
_clearResults : function() {
|
||||||
this.searchResult.show(new EmptyView());
|
|
||||||
} else {
|
|
||||||
this.searchResult.close();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_showResults : function() {
|
if (!this.isExisting) {
|
||||||
if (!this.isClosed) {
|
this.searchResult.show(new EmptyView());
|
||||||
if (this.collection.length === 0) {
|
} else {
|
||||||
this.ui.searchBar.show();
|
this.searchResult.close();
|
||||||
this.searchResult.show(new NotFoundView({ term : this.collection.term }));
|
}
|
||||||
} else {
|
},
|
||||||
this.searchResult.show(this.resultCollectionView);
|
|
||||||
if (!this.showingAll && this.isExisting) {
|
|
||||||
this.ui.loadMore.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_abortExistingSearch : function() {
|
_showResults : function() {
|
||||||
if (this.currentSearchPromise && this.currentSearchPromise.readyState > 0 && this.currentSearchPromise.readyState < 4) {
|
if (!this.isClosed) {
|
||||||
console.log('aborting previous pending search request.');
|
if (this.collection.length === 0) {
|
||||||
this.currentSearchPromise.abort();
|
this.ui.searchBar.show();
|
||||||
} else {
|
this.searchResult.show(new NotFoundView({ term : this.collection.term }));
|
||||||
this._clearResults();
|
} else {
|
||||||
}
|
this.searchResult.show(this.resultCollectionView);
|
||||||
},
|
if (!this.showingAll) {
|
||||||
|
this.ui.loadMore.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_showError : function() {
|
_abortExistingSearch : function() {
|
||||||
if (!this.isClosed) {
|
if (this.currentSearchPromise && this.currentSearchPromise.readyState > 0 && this.currentSearchPromise.readyState < 4) {
|
||||||
this.ui.searchBar.show();
|
console.log('aborting previous pending search request.');
|
||||||
this.searchResult.show(new ErrorView({ term : this.collection.term }));
|
this.currentSearchPromise.abort();
|
||||||
this.collection.term = '';
|
} else {
|
||||||
}
|
this._clearResults();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_showError : function() {
|
||||||
|
if (!this.isClosed) {
|
||||||
|
this.ui.searchBar.show();
|
||||||
|
this.searchResult.show(new ErrorView({ term : this.collection.term }));
|
||||||
|
this.collection.term = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,59 +4,62 @@ var MoviesCollection = require('../Movies/MoviesCollection');
|
|||||||
var vent = require('vent');
|
var vent = require('vent');
|
||||||
|
|
||||||
module.exports = Marionette.CollectionView.extend({
|
module.exports = Marionette.CollectionView.extend({
|
||||||
itemView : SearchResultView,
|
itemView : SearchResultView,
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize : function(options) {
|
||||||
this.showExisting = true;
|
this.showExisting = true;
|
||||||
this.isExisting = options.isExisting;
|
this.isExisting = options.isExisting;
|
||||||
this.showing = 1;
|
this.showing = 5;
|
||||||
vent.on(vent.Commands.ShowExistingCommand, this._onExistingToggle.bind(this));
|
if (this.isExisting) {
|
||||||
},
|
this.showing = 1;
|
||||||
|
}
|
||||||
|
vent.on(vent.Commands.ShowExistingCommand, this._onExistingToggle.bind(this));
|
||||||
|
},
|
||||||
|
|
||||||
_onExistingToggle : function(data) {
|
_onExistingToggle : function(data) {
|
||||||
this.showExisting = data.showExisting;
|
this.showExisting = data.showExisting;
|
||||||
|
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
showAll : function() {
|
showAll : function() {
|
||||||
this.showingAll = true;
|
this.showingAll = true;
|
||||||
this.render();
|
this.render();
|
||||||
},
|
},
|
||||||
|
|
||||||
showMore : function() {
|
showMore : function() {
|
||||||
this.showing += 5;
|
this.showing += 5;
|
||||||
this.render();
|
this.render();
|
||||||
|
|
||||||
return this.showing >= this.collection.length;
|
return this.showing >= this.collection.length;
|
||||||
},
|
},
|
||||||
|
|
||||||
setExisting : function(tmdbid) {
|
setExisting : function(tmdbid) {
|
||||||
var movies = this.collection.where({ tmdbId : tmdbid });
|
var movies = this.collection.where({ tmdbId : tmdbid });
|
||||||
console.warn(movies);
|
console.warn(movies);
|
||||||
//debugger;
|
//debugger;
|
||||||
if (movies.length > 0) {
|
if (movies.length > 0) {
|
||||||
this.children.findByModel(movies[0])._configureTemplateHelpers();
|
this.children.findByModel(movies[0])._configureTemplateHelpers();
|
||||||
//this.children.findByModel(movies[0])._configureTemplateHelpers();
|
//this.children.findByModel(movies[0])._configureTemplateHelpers();
|
||||||
this.children.findByModel(movies[0]).render();
|
this.children.findByModel(movies[0]).render();
|
||||||
//this.templateHelpers.existing = existingMovies[0].toJSON();
|
//this.templateHelpers.existing = existingMovies[0].toJSON();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
appendHtml : function(collectionView, itemView, index) {
|
appendHtml : function(collectionView, itemView, index) {
|
||||||
var tmdbId = itemView.model.get('tmdbId');
|
var tmdbId = itemView.model.get('tmdbId');
|
||||||
var existingMovies = MoviesCollection.where({ tmdbId: tmdbId });
|
var existingMovies = MoviesCollection.where({ tmdbId: tmdbId });
|
||||||
if(existingMovies.length > 0) {
|
if(existingMovies.length > 0) {
|
||||||
if(this.showExisting) {
|
if(this.showExisting) {
|
||||||
if (index < this.showing || index === 0) {
|
if (index < this.showing || index === 0) {
|
||||||
collectionView.$el.append(itemView.el);
|
collectionView.$el.append(itemView.el);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (index < this.showing || index === 0) {
|
if (index < this.showing || index === 0) {
|
||||||
collectionView.$el.append(itemView.el);
|
collectionView.$el.append(itemView.el);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
42
src/UI/Cells/MovieStatusWithTextCell.js
Normal file
42
src/UI/Cells/MovieStatusWithTextCell.js
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
var NzbDroneCell = require('./NzbDroneCell');
|
||||||
|
|
||||||
|
//used in Wanted tab
|
||||||
|
module.exports = NzbDroneCell.extend({
|
||||||
|
className : 'movie-status-text-cell',
|
||||||
|
|
||||||
|
render : function() {
|
||||||
|
this.$el.empty();
|
||||||
|
var monitored = this.model.get('monitored');
|
||||||
|
var status = this.model.get('status');
|
||||||
|
var inCinemas = this.model.get("inCinemas");
|
||||||
|
var date = new Date(inCinemas);
|
||||||
|
var timeSince = new Date().getTime() - date.getTime();
|
||||||
|
var numOfMonths = timeSince / 1000 / 60 / 60 / 24 / 30;
|
||||||
|
|
||||||
|
if (status === 'released') {
|
||||||
|
this.$el.html('<div class="released-banner"><i class="icon-sonarr-movie-released grid-icon" title=""></i> Released</div>');
|
||||||
|
this._setStatusWeight(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numOfMonths > 3) {
|
||||||
|
this.$el.html('<div class="released-banner"><i class="icon-sonarr-movie-released grid-icon" title=""></i> Released</div>');//TODO: Update for PreDB.me
|
||||||
|
this._setStatusWeight(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numOfMonths < 3) {
|
||||||
|
this.$el.html('<div class="cinemas-banner"><i class="icon-sonarr-movie-cinemas grid-icon" title=""></i> In Cinemas</div>');
|
||||||
|
this._setStatusWeight(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status === "announced") {
|
||||||
|
this.$el.html('<div class="announced-banner"><i class="icon-sonarr-movie-announced grid-icon" title=""></i> Announced</div>');
|
||||||
|
this._setStatusWeight(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
_setStatusWeight : function(weight) {
|
||||||
|
this.model.set('statusWeight', weight, { silent : true });
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -55,6 +55,10 @@
|
|||||||
width : 150px;
|
width : 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.movie-status-text-cell {
|
||||||
|
width : 150px;
|
||||||
|
}
|
||||||
|
|
||||||
.history-event-type-cell {
|
.history-event-type-cell {
|
||||||
width : 10px;
|
width : 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ module.exports = Marionette.Layout.extend({
|
|||||||
element : this.ui.rename,
|
element : this.ui.rename,
|
||||||
command : {
|
command : {
|
||||||
name : 'renameMovieFiles',
|
name : 'renameMovieFiles',
|
||||||
movieId : this.model.id,
|
movieId : this.model.id,
|
||||||
seasonNumber : -1
|
seasonNumber : -1
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
Are you sure you want to update all files in the {{numberOfMovies}} selected movies?
|
Are you sure you want to update all files in the {{numberOfMovies}} selected movies?
|
||||||
|
|
||||||
{{debug}}
|
|
||||||
<ul class="selected-series">
|
<ul class="selected-series">
|
||||||
{{#each movie}}
|
{{#each movies}}
|
||||||
<li>{{title}}</li>
|
<li>{{title}}</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<div class="labels">
|
<div class="labels">
|
||||||
|
<span class="label label-{{DownloadedStatusColor}}" title="{{DownloadedQuality}}">{{DownloadedStatus}}</span>
|
||||||
{{#if website}}
|
{{#if website}}
|
||||||
<a href="{{homepage}}" class="label label-info">Homepage</a>
|
<a href="{{homepage}}" class="label label-info">Homepage</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
.card;
|
.card;
|
||||||
.clickable;
|
.clickable;
|
||||||
margin-bottom : 20px;
|
margin-bottom : 20px;
|
||||||
height : 344px;
|
height : 363px;
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
display : block;
|
display : block;
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: @screen-xs-max) {
|
@media (max-width: @screen-xs-max) {
|
||||||
height : 268px;
|
height : 283px;
|
||||||
margin : 5px;
|
margin : 5px;
|
||||||
padding : 6px 5px;
|
padding : 6px 5px;
|
||||||
|
|
||||||
|
|||||||
@@ -1,44 +1,44 @@
|
|||||||
<!-- Static navbar -->
|
<!-- Static navbar -->
|
||||||
<div class="navbar navbar-nzbdrone" role="navigation">
|
<div class="navbar navbar-nzbdrone" role="navigation">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle navbar-inverse" data-toggle="collapse" data-target=".navbar-collapse">
|
<button type="button" class="navbar-toggle navbar-inverse" data-toggle="collapse" data-target=".navbar-collapse">
|
||||||
<span class="sr-only">Toggle navigation</span>
|
<span class="sr-only">Toggle navigation</span>
|
||||||
<span class="icon-sonarr-navbar-collapsed fa-lg"></span>
|
<span class="icon-sonarr-navbar-collapsed fa-lg"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="{{UrlBase}}/">
|
<a class="navbar-brand" href="{{UrlBase}}/">
|
||||||
<!--<img src="{{UrlBase}}/Content/Images/logo.png?v=2" alt="Radarr">-->
|
<!--<img src="{{UrlBase}}/Content/Images/logo.png?v=2" alt="Radarr">-->
|
||||||
<img src="{{UrlBase}}/Content/Images/logos/128.png" class="visible-lg"/>
|
<img src="{{UrlBase}}/Content/Images/logos/128.png" class="visible-lg"/>
|
||||||
<img src="{{UrlBase}}/Content/Images/logos/64.png" class="visible-md visible-sm"/>
|
<img src="{{UrlBase}}/Content/Images/logos/64.png" class="visible-md visible-sm"/>
|
||||||
<span class="visible-xs">
|
<span class="visible-xs">
|
||||||
<img src="{{UrlBase}}/Content/Images/logos/32.png"/>
|
<img src="{{UrlBase}}/Content/Images/logos/32.png"/>
|
||||||
<span class="logo-text">Radarr</span>
|
<span class="logo-text">Radarr</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-collapse collapse x-navbar-collapse">
|
<div class="navbar-collapse collapse x-navbar-collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li><a href="{{UrlBase}}/" class="x-series-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-series"></i> Movies</a></li>
|
<li><a href="{{UrlBase}}/" class="x-series-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-series"></i> Movies</a></li>
|
||||||
<li><a href="{{UrlBase}}/calendar" class="x-calendar-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-calendar"></i> Calendar</a></li>
|
<li><a href="{{UrlBase}}/calendar" class="x-calendar-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-calendar"></i> Calendar</a></li>
|
||||||
<li><a href="{{UrlBase}}/activity" class="x-activity-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-activity"></i> Activity<span id="x-queue-count" class="navbar-info"></span></a></li>
|
<li><a href="{{UrlBase}}/activity" class="x-activity-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-activity"></i> Activity<span id="x-queue-count" class="navbar-info"></span></a></li>
|
||||||
<li><a href="{{UrlBase}}/wanted" class="x-wanted-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-wanted"></i> Wanted</a></li>
|
<li><a href="{{UrlBase}}/wanted" class="x-wanted-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-wanted"></i> Wanted</a></li>
|
||||||
<li><a href="{{UrlBase}}/settings" class="x-settings-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-settings"></i> Settings</a></li>
|
<li><a href="{{UrlBase}}/settings" class="x-settings-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-settings"></i> Settings</a></li>
|
||||||
<li><a href="{{UrlBase}}/system" class="x-system-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-system"></i> System<span id="x-health" class="navbar-info"></span></a></li>
|
<li><a href="{{UrlBase}}/system" class="x-system-nav"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-system"></i> System<span id="x-health" class="navbar-info"></span></a></li>
|
||||||
<li><a href="https://sonarr.tv/donate" target="_blank"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-donate"></i> Donate</a></li>
|
<li><a href="https://radarr.video/donate.html" target="_blank"><i class="icon-sonarr-navbar-icon icon-sonarr-navbar-donate"></i> Donate</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li class="active screen-size"></li>
|
<li class="active screen-size"></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!--/.nav-collapse -->
|
</div><!--/.nav-collapse -->
|
||||||
</div><!--/.container-fluid -->
|
</div><!--/.container-fluid -->
|
||||||
|
|
||||||
<div class="col-md-12 search">
|
<div class="col-md-12 search">
|
||||||
<div class="col-md-6 col-md-offset-3">
|
<div class="col-md-6 col-md-offset-3">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
<input type="text" class="col-md-6 form-control x-series-search" placeholder="Search the movies in your library">
|
<input type="text" class="col-md-6 form-control x-series-search" placeholder="Search the movies in your library">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,43 +1,8 @@
|
|||||||
// var Backbone = require('backbone');
|
|
||||||
// var RenamePreviewModel = require('./RenamePreviewModel');
|
|
||||||
|
|
||||||
// module.exports = Backbone.Collection.extend({
|
|
||||||
// url : window.NzbDrone.ApiRoot + '/rename',
|
|
||||||
// model : RenamePreviewModel,
|
|
||||||
|
|
||||||
// originalFetch : Backbone.Collection.prototype.fetch,
|
|
||||||
|
|
||||||
// initialize : function(options) {
|
|
||||||
// if (!options.seriesId) {
|
|
||||||
// throw 'seriesId is required';
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this.seriesId = options.seriesId;
|
|
||||||
// this.seasonNumber = options.seasonNumber;
|
|
||||||
// },
|
|
||||||
|
|
||||||
// fetch : function(options) {
|
|
||||||
// if (!this.seriesId) {
|
|
||||||
// throw 'seriesId is required';
|
|
||||||
// }
|
|
||||||
|
|
||||||
// options = options || {};
|
|
||||||
// options.data = {};
|
|
||||||
// options.data.seriesId = this.seriesId;
|
|
||||||
|
|
||||||
// if (this.seasonNumber !== undefined) {
|
|
||||||
// options.data.seasonNumber = this.seasonNumber;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return this.originalFetch.call(this, options);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
var Backbone = require('backbone');
|
var Backbone = require('backbone');
|
||||||
var RenamePreviewModel = require('./RenamePreviewModel');
|
var RenamePreviewModel = require('./RenamePreviewModel');
|
||||||
|
|
||||||
module.exports = Backbone.Collection.extend({
|
module.exports = Backbone.Collection.extend({
|
||||||
url : window.NzbDrone.ApiRoot + '/rename',
|
url : window.NzbDrone.ApiRoot + '/renameMovie',
|
||||||
model : RenamePreviewModel,
|
model : RenamePreviewModel,
|
||||||
|
|
||||||
originalFetch : Backbone.Collection.prototype.fetch,
|
originalFetch : Backbone.Collection.prototype.fetch,
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ module.exports = Marionette.ItemView.extend({
|
|||||||
template : 'Rename/RenamePreviewFormatViewTemplate',
|
template : 'Rename/RenamePreviewFormatViewTemplate',
|
||||||
|
|
||||||
templateHelpers : function() {
|
templateHelpers : function() {
|
||||||
var type = this.model.get('seriesType');
|
//var type = this.model.get('seriesType');
|
||||||
return {
|
return {
|
||||||
rename : this.naming.get('renameEpisodes'),
|
rename : this.naming.get('renameEpisodes'),
|
||||||
format : this.naming.get(type + 'EpisodeFormat')
|
format : this.naming.get('standardMovieFormat')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,98 +1,98 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>File Management</legend>
|
<legend>File Management</legend>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">Ignore Deleted Movies</label>
|
<label class="col-sm-3 control-label">Ignore Deleted Movies</label>
|
||||||
|
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<label class="checkbox toggle well">
|
<label class="checkbox toggle well">
|
||||||
<input type="checkbox" name="autoUnmonitorPreviouslyDownloadedEpisodes"/>
|
<input type="checkbox" name="autoUnmonitorPreviouslyDownloadedEpisodes"/>
|
||||||
<p>
|
<p>
|
||||||
<span>Yes</span>
|
<span>Yes</span>
|
||||||
<span>No</span>
|
<span>No</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="btn btn-primary slide-button"/>
|
<div class="btn btn-primary slide-button"/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<span class="help-inline-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-sonarr-form-info" title="Movies deleted from disk are automatically unmonitored in Radarr"/>
|
<i class="icon-sonarr-form-info" title="Movies deleted from disk are automatically unmonitored in Radarr"/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group advanced-setting">
|
<div class="form-group advanced-setting">
|
||||||
<label class="col-sm-3 control-label">Download Propers</label>
|
<label class="col-sm-3 control-label">Download Propers</label>
|
||||||
|
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<label class="checkbox toggle well">
|
<label class="checkbox toggle well">
|
||||||
<input type="checkbox" name="autoDownloadPropers"/>
|
<input type="checkbox" name="autoDownloadPropers"/>
|
||||||
<p>
|
<p>
|
||||||
<span>Yes</span>
|
<span>Yes</span>
|
||||||
<span>No</span>
|
<span>No</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="btn btn-primary slide-button"/>
|
<div class="btn btn-primary slide-button"/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<span class="help-inline-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-sonarr-form-info" title="Should Radarr automatically upgrade to propers when available?"/>
|
<i class="icon-sonarr-form-info" title="Should Radarr automatically upgrade to propers when available?"/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group advanced-setting">
|
<div class="form-group advanced-setting">
|
||||||
<label class="col-sm-3 control-label">Analyse video files</label>
|
<label class="col-sm-3 control-label">Analyse video files</label>
|
||||||
|
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<label class="checkbox toggle well">
|
<label class="checkbox toggle well">
|
||||||
<input type="checkbox" name="enableMediaInfo"/>
|
<input type="checkbox" name="enableMediaInfo"/>
|
||||||
<p>
|
<p>
|
||||||
<span>Yes</span>
|
<span>Yes</span>
|
||||||
<span>No</span>
|
<span>No</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="btn btn-primary slide-button"/>
|
<div class="btn btn-primary slide-button"/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<span class="help-inline-checkbox">
|
<span class="help-inline-checkbox">
|
||||||
<i class="icon-sonarr-form-info" title="Extract video information such as resolution, runtime and codec information from files. This requires Radarr to read parts of the file which may cause high disk or network activity during scans."/>
|
<i class="icon-sonarr-form-info" title="Extract video information such as resolution, runtime and codec information from files. This requires Radarr to read parts of the file which may cause high disk or network activity during scans."/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group advanced-setting">
|
<div class="form-group advanced-setting">
|
||||||
<label class="col-sm-3 control-label">Change File Date</label>
|
<label class="col-sm-3 control-label">Change File Date</label>
|
||||||
|
|
||||||
<div class="col-sm-1 col-sm-push-2 help-inline">
|
<div class="col-sm-1 col-sm-push-2 help-inline">
|
||||||
<i class="icon-sonarr-form-info" title="Change file date on import/rescan"/>
|
<i class="icon-sonarr-form-info" title="Change file date on import/rescan"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-2 col-sm-pull-1">
|
|
||||||
<select class="form-control" name="fileDate">
|
|
||||||
<option value="none">None</option>
|
|
||||||
<option value="localAirDate">Local Air Date</option>
|
|
||||||
<option value="utcAirDate">UTC Air Date</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="col-sm-2 col-sm-pull-1">
|
||||||
<label class="col-sm-3 control-label">Recycling Bin</label>
|
<select class="form-control" name="fileDate">
|
||||||
|
<option value="none">None</option>
|
||||||
|
<option value="cinemas">In Cinemas Date</option>
|
||||||
|
<option value="release">Physical Release Date</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-1 col-sm-push-8 help-inline">
|
<div class="form-group">
|
||||||
<i class="icon-sonarr-form-info" title="Episode files will go here when deleted instead of being permanently deleted"/>
|
<label class="col-sm-3 control-label">Recycling Bin</label>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-sm-8 col-sm-pull-1">
|
<div class="col-sm-1 col-sm-push-8 help-inline">
|
||||||
<input type="text" name="recycleBin" class="form-control x-path"/>
|
<i class="icon-sonarr-form-info" title="Episode files will go here when deleted instead of being permanently deleted"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="col-sm-8 col-sm-pull-1">
|
||||||
|
<input type="text" name="recycleBin" class="form-control x-path"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
{{> MediaInfoNamingPartial}}
|
{{> MediaInfoNamingPartial}}
|
||||||
{{> ReleaseGroupNamingPartial}}
|
{{> ReleaseGroupNamingPartial}}
|
||||||
{{> OriginalTitleNamingPartial}}
|
{{> OriginalTitleNamingPartial}}
|
||||||
|
{{> ImdbIdNamingPartial}}
|
||||||
{{> SeparatorNamingPartial}}
|
{{> SeparatorNamingPartial}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -161,6 +162,7 @@
|
|||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{{> MovieTitleNamingPartial}}
|
{{> MovieTitleNamingPartial}}
|
||||||
{{> ReleaseYearNamingPartial}}
|
{{> ReleaseYearNamingPartial}}
|
||||||
|
{{> ImdbIdNamingPartial}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<li><a href="#" data-token="IMDb Id">IMDb Id</a></li>
|
||||||
@@ -1,32 +1,32 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>More Info</legend>
|
<legend>More Info</legend>
|
||||||
|
|
||||||
<dl class="dl-horizontal info">
|
<dl class="dl-horizontal info">
|
||||||
<dt>Discord</dt>
|
<dt>Discord</dt>
|
||||||
<dd><a href="https://discord.gg/AD3UP37">Radarr on Discord</a>
|
<dd><a href="https://discord.gg/AD3UP37">Radarr on Discord</a>
|
||||||
|
|
||||||
<dt>Reddit</dt>
|
<dt>Reddit</dt>
|
||||||
<dd><a href="https://www.reddit.com/r/radarr/">Radarr Subreddit</a>
|
<dd><a href="https://www.reddit.com/r/radarr/">Radarr Subreddit</a>
|
||||||
{{!--<dt>Home page</dt>
|
<dt>Home page</dt>
|
||||||
<dd><a href="https://radarr.tdb/">radarr.tdb</a></dd>
|
<dd><a href="https://radarr.video/">radarr.video</a></dd>
|
||||||
|
|
||||||
<dt>Wiki</dt>
|
{{!--<dt>Wiki</dt>
|
||||||
<dd><a href="https://wiki.radarr.tdb/">wiki.radarr.tdb</a></dd>
|
<dd><a href="https://wiki.radarr.tdb/">wiki.radarr.tdb</a></dd>
|
||||||
|
|
||||||
<dt>Forums</dt>
|
<dt>Forums</dt>
|
||||||
<dd><a href="https://forums.sonarr.tv/">forums.sonarr.tv</a></dd>
|
<dd><a href="https://forums.sonarr.tv/">forums.sonarr.tv</a></dd>
|
||||||
|
|
||||||
<dt>Twitter</dt>
|
<dt>Twitter</dt>
|
||||||
<dd><a href="https://twitter.com/sonarrtv">@sonarrtv</a></dd>
|
<dd><a href="https://twitter.com/sonarrtv">@sonarrtv</a></dd>
|
||||||
|
|
||||||
<dt>IRC</dt>
|
<dt>IRC</dt>
|
||||||
<dd><a href="irc://irc.freenode.net/#sonarr">#sonarr on Freenode</a> or (<a href="http://webchat.freenode.net/?channels=#sonarr">webchat</a>)</dd>--}}
|
<dd><a href="irc://irc.freenode.net/#sonarr">#sonarr on Freenode</a> or (<a href="http://webchat.freenode.net/?channels=#sonarr">webchat</a>)</dd>--}}
|
||||||
|
|
||||||
<dt>Source</dt>
|
<dt>Source</dt>
|
||||||
<dd><a href="https://github.com/Radarr/Radarr">Radarr on Github</a></dd>
|
<dd><a href="https://github.com/Radarr/Radarr">Radarr on Github</a></dd>
|
||||||
|
|
||||||
<dt>Feature Requests</dt>
|
<dt>Feature Requests</dt>
|
||||||
<!--<dd><a href="https://forums.sonarr.tv/">forums.sonarr.tv</a></dd>-->
|
<!--<dd><a href="https://forums.sonarr.tv/">forums.sonarr.tv</a></dd>-->
|
||||||
<dd><a href="https://github.com/Radarr/Radarr/issues">Github Issues</a></dd>
|
<dd><a href="https://github.com/Radarr/Radarr/issues">Github Issues</a></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
var EpisodeModel = require('../../Series/EpisodeModel');
|
var MovieModel = require('../../Movies/MovieModel');
|
||||||
var PagableCollection = require('backbone.pageable');
|
var PagableCollection = require('backbone.pageable');
|
||||||
var AsFilteredCollection = require('../../Mixins/AsFilteredCollection');
|
var AsFilteredCollection = require('../../Mixins/AsFilteredCollection');
|
||||||
var AsSortedCollection = require('../../Mixins/AsSortedCollection');
|
var AsSortedCollection = require('../../Mixins/AsSortedCollection');
|
||||||
@@ -7,13 +7,13 @@ var AsPersistedStateCollection = require('../../Mixins/AsPersistedStateCollectio
|
|||||||
|
|
||||||
var Collection = PagableCollection.extend({
|
var Collection = PagableCollection.extend({
|
||||||
url : window.NzbDrone.ApiRoot + '/wanted/missing',
|
url : window.NzbDrone.ApiRoot + '/wanted/missing',
|
||||||
model : EpisodeModel,
|
model : MovieModel,
|
||||||
tableName : 'wanted.missing',
|
tableName : 'wanted.missing',
|
||||||
|
|
||||||
state : {
|
state : {
|
||||||
pageSize : 15,
|
pageSize : 15,
|
||||||
sortKey : 'airDateUtc',
|
sortKey : 'inCinemas',
|
||||||
order : 1
|
order : -1
|
||||||
},
|
},
|
||||||
|
|
||||||
queryParams : {
|
queryParams : {
|
||||||
@@ -39,10 +39,6 @@ var Collection = PagableCollection.extend({
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
sortMappings : {
|
|
||||||
'series' : { sortKey : 'series.sortTitle' }
|
|
||||||
},
|
|
||||||
|
|
||||||
parseState : function(resp) {
|
parseState : function(resp) {
|
||||||
return { totalRecords : resp.totalRecords };
|
return { totalRecords : resp.totalRecords };
|
||||||
},
|
},
|
||||||
@@ -58,4 +54,4 @@ var Collection = PagableCollection.extend({
|
|||||||
Collection = AsFilteredCollection.call(Collection);
|
Collection = AsFilteredCollection.call(Collection);
|
||||||
Collection = AsSortedCollection.call(Collection);
|
Collection = AsSortedCollection.call(Collection);
|
||||||
|
|
||||||
module.exports = AsPersistedStateCollection.call(Collection);
|
module.exports = AsPersistedStateCollection.call(Collection);
|
||||||
|
|||||||
@@ -5,11 +5,9 @@ var Marionette = require('marionette');
|
|||||||
var Backgrid = require('backgrid');
|
var Backgrid = require('backgrid');
|
||||||
var MissingCollection = require('./MissingCollection');
|
var MissingCollection = require('./MissingCollection');
|
||||||
var SelectAllCell = require('../../Cells/SelectAllCell');
|
var SelectAllCell = require('../../Cells/SelectAllCell');
|
||||||
var SeriesTitleCell = require('../../Cells/SeriesTitleCell');
|
var MovieTitleCell = require('../../Cells/MovieTitleCell');
|
||||||
var EpisodeNumberCell = require('../../Cells/EpisodeNumberCell');
|
|
||||||
var EpisodeTitleCell = require('../../Cells/EpisodeTitleCell');
|
|
||||||
var RelativeDateCell = require('../../Cells/RelativeDateCell');
|
var RelativeDateCell = require('../../Cells/RelativeDateCell');
|
||||||
var EpisodeStatusCell = require('../../Cells/EpisodeStatusCell');
|
var MovieStatusWithTextCell = require('../../Cells/MovieStatusWithTextCell');
|
||||||
var GridPager = require('../../Shared/Grid/Pager');
|
var GridPager = require('../../Shared/Grid/Pager');
|
||||||
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
||||||
var LoadingView = require('../../Shared/LoadingView');
|
var LoadingView = require('../../Shared/LoadingView');
|
||||||
@@ -39,35 +37,29 @@ module.exports = Marionette.Layout.extend({
|
|||||||
headerCell : 'select-all',
|
headerCell : 'select-all',
|
||||||
sortable : false
|
sortable : false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name : 'series',
|
|
||||||
label : 'Series Title',
|
|
||||||
cell : SeriesTitleCell,
|
|
||||||
sortValue : 'series.sortTitle'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name : 'this',
|
name : 'this',
|
||||||
label : 'Episode',
|
label : 'Movie Title',
|
||||||
cell : EpisodeNumberCell,
|
cell : MovieTitleCell,
|
||||||
sortable : false
|
sortable : false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'this',
|
name : 'inCinemas',
|
||||||
label : 'Episode Title',
|
label : 'In Cinemas',
|
||||||
cell : EpisodeTitleCell,
|
cell : RelativeDateCell
|
||||||
sortable : false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'airDateUtc',
|
name : 'physicalRelease',
|
||||||
label : 'Air Date',
|
label : 'PhysicalRelease',
|
||||||
cell : RelativeDateCell
|
cell : RelativeDateCell
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'status',
|
name : 'status',
|
||||||
label : 'Status',
|
label : 'Status',
|
||||||
cell : EpisodeStatusCell,
|
cell : MovieStatusWithTextCell,
|
||||||
sortable : false
|
sortable : false
|
||||||
}
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
initialize : function() {
|
initialize : function() {
|
||||||
@@ -206,8 +198,8 @@ module.exports = Marionette.Layout.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
_searchMissing : function() {
|
_searchMissing : function() {
|
||||||
if (window.confirm('Are you sure you want to search for {0} missing episodes? '.format(this.collection.state.totalRecords) +
|
if (window.confirm('Are you sure you want to search for {0} missing movies? '.format(this.collection.state.totalRecords) +
|
||||||
'One API request to each indexer will be used for each episode. ' + 'This cannot be stopped once started.')) {
|
'One API request to each indexer will be used for each movie. ' + 'This cannot be stopped once started.')) {
|
||||||
CommandController.Execute('missingEpisodeSearch', { name : 'missingEpisodeSearch' });
|
CommandController.Execute('missingEpisodeSearch', { name : 'missingEpisodeSearch' });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -237,4 +229,4 @@ module.exports = Marionette.Layout.extend({
|
|||||||
_manualImport : function () {
|
_manualImport : function () {
|
||||||
vent.trigger(vent.Commands.ShowManualImport);
|
vent.trigger(vent.Commands.ShowManualImport);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user