mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-22 22:43:31 -07:00
Merge remote-tracking branch 'refs/remotes/galli-leo/develop' into develop
This commit is contained in:
commit
14bf63e21d
27 changed files with 175 additions and 67 deletions
|
@ -1,4 +1,9 @@
|
||||||
# Radarr [](https://travis-ci.org/galli-leo/Radarr)#
|
# Radarr
|
||||||
|
|
||||||
|
| Service | Master | Develop |
|
||||||
|
|----------|:---------------------------:|:----------------------------:|
|
||||||
|
| AppVeyor | [](https://ci.appveyor.com/project/galli-leo/Radarr) | [](https://ci.appveyor.com/project/galli-leo/Radarr) |
|
||||||
|
| Travis | [](https://travis-ci.org/galli-leo/Radarr) | [](https://travis-ci.org/galli-leo/Radarr) |
|
||||||
|
|
||||||
This fork of Sonarr aims to turn it into something like Couchpotato.
|
This fork of Sonarr aims to turn it into something like Couchpotato.
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,10 @@ namespace NzbDrone.Api.Movie
|
||||||
public MovieStatusType Status { get; set; }
|
public MovieStatusType Status { get; set; }
|
||||||
public string Overview { get; set; }
|
public string Overview { get; set; }
|
||||||
public DateTime? InCinemas { get; set; }
|
public DateTime? InCinemas { get; set; }
|
||||||
|
public DateTime? PhysicalRelease { get; set; }
|
||||||
public List<MediaCover> Images { get; set; }
|
public List<MediaCover> Images { get; set; }
|
||||||
public string Website { get; set; }
|
public string Website { get; set; }
|
||||||
|
public bool Downloaded { get; set; }
|
||||||
public string RemotePoster { get; set; }
|
public string RemotePoster { get; set; }
|
||||||
public int Year { get; set; }
|
public int Year { get; set; }
|
||||||
|
|
||||||
|
@ -79,6 +80,8 @@ namespace NzbDrone.Api.Movie
|
||||||
{
|
{
|
||||||
if (model == null) return null;
|
if (model == null) return null;
|
||||||
|
|
||||||
|
long Size = model.MovieFile.Value != null ? model.MovieFile.Value.Size : 0;
|
||||||
|
|
||||||
return new MovieResource
|
return new MovieResource
|
||||||
{
|
{
|
||||||
Id = model.Id,
|
Id = model.Id,
|
||||||
|
@ -87,6 +90,9 @@ namespace NzbDrone.Api.Movie
|
||||||
//AlternateTitles
|
//AlternateTitles
|
||||||
SortTitle = model.SortTitle,
|
SortTitle = model.SortTitle,
|
||||||
InCinemas = model.InCinemas,
|
InCinemas = model.InCinemas,
|
||||||
|
PhysicalRelease = model.PhysicalRelease,
|
||||||
|
|
||||||
|
Downloaded = model.MovieFile.Value != null,
|
||||||
//TotalEpisodeCount
|
//TotalEpisodeCount
|
||||||
//EpisodeCount
|
//EpisodeCount
|
||||||
//EpisodeFileCount
|
//EpisodeFileCount
|
||||||
|
@ -104,6 +110,8 @@ namespace NzbDrone.Api.Movie
|
||||||
|
|
||||||
Monitored = model.Monitored,
|
Monitored = model.Monitored,
|
||||||
|
|
||||||
|
SizeOnDisk = Size,
|
||||||
|
|
||||||
Runtime = model.Runtime,
|
Runtime = model.Runtime,
|
||||||
LastInfoSync = model.LastInfoSync,
|
LastInfoSync = model.LastInfoSync,
|
||||||
CleanTitle = model.CleanTitle,
|
CleanTitle = model.CleanTitle,
|
||||||
|
@ -134,6 +142,7 @@ namespace NzbDrone.Api.Movie
|
||||||
//AlternateTitles
|
//AlternateTitles
|
||||||
SortTitle = resource.SortTitle,
|
SortTitle = resource.SortTitle,
|
||||||
InCinemas = resource.InCinemas,
|
InCinemas = resource.InCinemas,
|
||||||
|
PhysicalRelease = resource.PhysicalRelease,
|
||||||
//TotalEpisodeCount
|
//TotalEpisodeCount
|
||||||
//EpisodeCount
|
//EpisodeCount
|
||||||
//EpisodeFileCount
|
//EpisodeFileCount
|
||||||
|
|
|
@ -16,10 +16,10 @@ namespace NzbDrone.Common.Extensions
|
||||||
private const string UPDATE_CLIENT_EXE = "Radarr.Update.exe";
|
private const string UPDATE_CLIENT_EXE = "Radarr.Update.exe";
|
||||||
private const string BACKUP_FOLDER = "Backups";
|
private const string BACKUP_FOLDER = "Backups";
|
||||||
|
|
||||||
private static readonly string UPDATE_SANDBOX_FOLDER_NAME = "nzbdrone_update" + Path.DirectorySeparatorChar;
|
private static readonly string UPDATE_SANDBOX_FOLDER_NAME = "radarr_update" + Path.DirectorySeparatorChar;
|
||||||
private static readonly string UPDATE_PACKAGE_FOLDER_NAME = "";
|
private static readonly string UPDATE_PACKAGE_FOLDER_NAME = "Radarr" + Path.DirectorySeparatorChar;
|
||||||
private static readonly string UPDATE_BACKUP_FOLDER_NAME = "nzbdrone_backup" + Path.DirectorySeparatorChar;
|
private static readonly string UPDATE_BACKUP_FOLDER_NAME = "radarr_backup" + Path.DirectorySeparatorChar;
|
||||||
private static readonly string UPDATE_BACKUP_APPDATA_FOLDER_NAME = "nzbdrone_appdata_backup" + Path.DirectorySeparatorChar;
|
private static readonly string UPDATE_BACKUP_APPDATA_FOLDER_NAME = "radarr_appdata_backup" + Path.DirectorySeparatorChar;
|
||||||
private static readonly string UPDATE_CLIENT_FOLDER_NAME = "NzbDrone.Update" + Path.DirectorySeparatorChar;
|
private static readonly string UPDATE_CLIENT_FOLDER_NAME = "NzbDrone.Update" + Path.DirectorySeparatorChar;
|
||||||
private static readonly string UPDATE_LOG_FOLDER_NAME = "UpdateLogs" + Path.DirectorySeparatorChar;
|
private static readonly string UPDATE_LOG_FOLDER_NAME = "UpdateLogs" + Path.DirectorySeparatorChar;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace NzbDrone.Common
|
||||||
|
|
||||||
public class ServiceProvider : IServiceProvider
|
public class ServiceProvider : IServiceProvider
|
||||||
{
|
{
|
||||||
public const string NZBDRONE_SERVICE_NAME = "NzbDrone";
|
public const string NZBDRONE_SERVICE_NAME = "Radarr";
|
||||||
|
|
||||||
private readonly IProcessProvider _processProvider;
|
private readonly IProcessProvider _processProvider;
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
|
@ -78,7 +78,7 @@ namespace NzbDrone.Common
|
||||||
serviceInstaller.Context = context;
|
serviceInstaller.Context = context;
|
||||||
serviceInstaller.DisplayName = serviceName;
|
serviceInstaller.DisplayName = serviceName;
|
||||||
serviceInstaller.ServiceName = serviceName;
|
serviceInstaller.ServiceName = serviceName;
|
||||||
serviceInstaller.Description = "NzbDrone Application Server";
|
serviceInstaller.Description = "Radarr Application Server";
|
||||||
serviceInstaller.StartType = ServiceStartMode.Automatic;
|
serviceInstaller.StartType = ServiceStartMode.Automatic;
|
||||||
serviceInstaller.ServicesDependedOn = new[] { "EventLog", "Tcpip", "http" };
|
serviceInstaller.ServicesDependedOn = new[] { "EventLog", "Tcpip", "http" };
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,8 @@ namespace NzbDrone.Core.Configuration
|
||||||
|
|
||||||
public bool AnalyticsEnabled => GetValueBoolean("AnalyticsEnabled", true, persist: false);
|
public bool AnalyticsEnabled => GetValueBoolean("AnalyticsEnabled", true, persist: false);
|
||||||
|
|
||||||
public string Branch => GetValue("Branch", "master").ToLowerInvariant();
|
// TODO: Change back to "master" for the first stable release.
|
||||||
|
public string Branch => GetValue("Branch", "develop").ToLowerInvariant();
|
||||||
|
|
||||||
public string LogLevel => GetValue("LogLevel", "Info");
|
public string LogLevel => GetValue("LogLevel", "Info");
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using FluentMigrator;
|
||||||
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Datastore.Migration
|
||||||
|
{
|
||||||
|
[Migration(110)]
|
||||||
|
public class add_phyiscal_release : NzbDroneMigrationBase
|
||||||
|
{
|
||||||
|
protected override void MainDbUpgrade()
|
||||||
|
{
|
||||||
|
Alter.Table("Movies").AddColumn("PhysicalRelease").AsDateTime().Nullable();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -61,6 +61,27 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
||||||
public float vote_average { get; set; }
|
public float vote_average { get; set; }
|
||||||
public int vote_count { get; set; }
|
public int vote_count { get; set; }
|
||||||
public AlternativeTitles alternative_titles { get; set; }
|
public AlternativeTitles alternative_titles { get; set; }
|
||||||
|
public ReleaseDatesResource release_dates { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ReleaseDatesResource
|
||||||
|
{
|
||||||
|
public List<ReleaseDates> results { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ReleaseDate
|
||||||
|
{
|
||||||
|
public string certification { get; set; }
|
||||||
|
public string iso_639_1 { get; set; }
|
||||||
|
public string note { get; set; }
|
||||||
|
public string release_date { get; set; }
|
||||||
|
public int type { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ReleaseDates
|
||||||
|
{
|
||||||
|
public string iso_3166_1 { get; set; }
|
||||||
|
public List<ReleaseDate> release_dates { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Belongs_To_Collection
|
public class Belongs_To_Collection
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||||
.SetSegment("route", "movie")
|
.SetSegment("route", "movie")
|
||||||
.SetSegment("id", TmdbId.ToString())
|
.SetSegment("id", TmdbId.ToString())
|
||||||
.SetSegment("secondaryRoute", "")
|
.SetSegment("secondaryRoute", "")
|
||||||
.AddQueryParam("append_to_response", "alternative_titles")
|
.AddQueryParam("append_to_response", "alternative_titles,release_dates")
|
||||||
.AddQueryParam("country", "US")
|
.AddQueryParam("country", "US")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
@ -102,6 +102,27 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||||
movie.AlternativeTitles.Add(title.title);
|
movie.AlternativeTitles.Add(title.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach(ReleaseDates releaseDates in resource.release_dates.results)
|
||||||
|
{
|
||||||
|
foreach(ReleaseDate releaseDate in releaseDates.release_dates)
|
||||||
|
{
|
||||||
|
if (releaseDate.type == 5 || releaseDate.type == 4)
|
||||||
|
{
|
||||||
|
if (movie.PhysicalRelease.HasValue)
|
||||||
|
{
|
||||||
|
if (movie.PhysicalRelease.Value.After(DateTime.Parse(releaseDate.release_date)))
|
||||||
|
{
|
||||||
|
movie.PhysicalRelease = DateTime.Parse(releaseDate.release_date); //Use oldest release date available.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
movie.PhysicalRelease = DateTime.Parse(releaseDate.release_date);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
movie.Ratings = new Ratings();
|
movie.Ratings = new Ratings();
|
||||||
movie.Ratings.Votes = resource.vote_count;
|
movie.Ratings.Votes = resource.vote_count;
|
||||||
movie.Ratings.Value = (decimal)resource.vote_average;
|
movie.Ratings.Value = (decimal)resource.vote_average;
|
||||||
|
|
|
@ -286,6 +286,7 @@
|
||||||
<Compile Include="Datastore\Migration\098_remove_titans_of_tv.cs">
|
<Compile Include="Datastore\Migration\098_remove_titans_of_tv.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Datastore\Migration\110_add_physical_release_to_table.cs" />
|
||||||
<Compile Include="Datastore\Migration\109_add_movie_formats_to_naming_config.cs" />
|
<Compile Include="Datastore\Migration\109_add_movie_formats_to_naming_config.cs" />
|
||||||
<Compile Include="Datastore\Migration\Framework\MigrationContext.cs" />
|
<Compile Include="Datastore\Migration\Framework\MigrationContext.cs" />
|
||||||
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
|
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
|
||||||
|
|
|
@ -41,6 +41,7 @@ namespace NzbDrone.Core.Tv
|
||||||
public string RootFolderPath { get; set; }
|
public string RootFolderPath { get; set; }
|
||||||
public DateTime Added { get; set; }
|
public DateTime Added { get; set; }
|
||||||
public DateTime? InCinemas { get; set; }
|
public DateTime? InCinemas { get; set; }
|
||||||
|
public DateTime? PhysicalRelease { get; set; }
|
||||||
public LazyLoaded<Profile> Profile { get; set; }
|
public LazyLoaded<Profile> Profile { get; set; }
|
||||||
public HashSet<int> Tags { get; set; }
|
public HashSet<int> Tags { get; set; }
|
||||||
public AddMovieOptions AddOptions { get; set; }
|
public AddMovieOptions AddOptions { get; set; }
|
||||||
|
|
|
@ -83,6 +83,7 @@ namespace NzbDrone.Core.Tv
|
||||||
movie.Website = movieInfo.Website;
|
movie.Website = movieInfo.Website;
|
||||||
movie.AlternativeTitles = movieInfo.AlternativeTitles;
|
movie.AlternativeTitles = movieInfo.AlternativeTitles;
|
||||||
movie.Year = movieInfo.Year;
|
movie.Year = movieInfo.Year;
|
||||||
|
movie.PhysicalRelease = movieInfo.PhysicalRelease;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,6 @@ namespace NzbDrone.Core.Update.Commands
|
||||||
{
|
{
|
||||||
public override bool SendUpdatesToClient => true;
|
public override bool SendUpdatesToClient => true;
|
||||||
|
|
||||||
public override string CompletionMessage => "Restarting Sonarr to apply updates";
|
public override string CompletionMessage => "Restarting Radarr to apply updates";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ namespace NzbDrone.Core.Update
|
||||||
_diskTransferService.TransferFolder(_appFolderInfo.GetUpdateClientFolder(), updateSandboxFolder, TransferMode.Move, false);
|
_diskTransferService.TransferFolder(_appFolderInfo.GetUpdateClientFolder(), updateSandboxFolder, TransferMode.Move, false);
|
||||||
|
|
||||||
_logger.Info("Starting update client {0}", _appFolderInfo.GetUpdateClientExePath());
|
_logger.Info("Starting update client {0}", _appFolderInfo.GetUpdateClientExePath());
|
||||||
_logger.ProgressInfo("Sonarr will restart shortly.");
|
_logger.ProgressInfo("Radarr will restart shortly.");
|
||||||
|
|
||||||
_processProvider.Start(_appFolderInfo.GetUpdateClientExePath(), GetUpdaterArgs(updateSandboxFolder));
|
_processProvider.Start(_appFolderInfo.GetUpdateClientExePath(), GetUpdaterArgs(updateSandboxFolder));
|
||||||
}
|
}
|
||||||
|
@ -178,8 +178,9 @@ namespace NzbDrone.Core.Update
|
||||||
{
|
{
|
||||||
var processId = _processProvider.GetCurrentProcess().Id.ToString();
|
var processId = _processProvider.GetCurrentProcess().Id.ToString();
|
||||||
var executingApplication = _runtimeInfo.ExecutingApplication;
|
var executingApplication = _runtimeInfo.ExecutingApplication;
|
||||||
|
var args = string.Join(" ", processId, updateSandboxFolder.TrimEnd(Path.DirectorySeparatorChar).WrapInQuotes(), executingApplication.WrapInQuotes(), _startupContext.PreservedArguments);
|
||||||
return string.Join(" ", processId, updateSandboxFolder.TrimEnd(Path.DirectorySeparatorChar).WrapInQuotes(), executingApplication.WrapInQuotes(), _startupContext.PreservedArguments);
|
_logger.Info("Updater Arguments: " + args);
|
||||||
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnsureAppDataSafety()
|
private void EnsureAppDataSafety()
|
||||||
|
@ -187,7 +188,7 @@ namespace NzbDrone.Core.Update
|
||||||
if (_appFolderInfo.StartUpFolder.IsParentPath(_appFolderInfo.AppDataFolder) ||
|
if (_appFolderInfo.StartUpFolder.IsParentPath(_appFolderInfo.AppDataFolder) ||
|
||||||
_appFolderInfo.StartUpFolder.PathEquals(_appFolderInfo.AppDataFolder))
|
_appFolderInfo.StartUpFolder.PathEquals(_appFolderInfo.AppDataFolder))
|
||||||
{
|
{
|
||||||
throw new UpdateFailedException("Your Sonarr configuration '{0}' is being stored in application folder '{1}' which will cause data lost during the upgrade. Please remove any symlinks or redirects before trying again.", _appFolderInfo.AppDataFolder, _appFolderInfo.StartUpFolder);
|
throw new UpdateFailedException("Your Radarr configuration '{0}' is being stored in application folder '{1}' which will cause data lost during the upgrade. Please remove any symlinks or redirects before trying again.", _appFolderInfo.AppDataFolder, _appFolderInfo.StartUpFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,7 @@ namespace NzbDrone.Core.Update
|
||||||
|
|
||||||
public UpdatePackage AvailableUpdate()
|
public UpdatePackage AvailableUpdate()
|
||||||
{
|
{
|
||||||
//For new let's just use develop, afterwards we can change it back to the config: _configFileProvider.Branch
|
return _updatePackageProvider.GetLatestUpdate(_configFileProvider.Branch, BuildInfo.Version);
|
||||||
return _updatePackageProvider.GetLatestUpdate("develop", BuildInfo.Version);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@ namespace NzbDrone.Update
|
||||||
var startupArgument = new StartupContext(args);
|
var startupArgument = new StartupContext(args);
|
||||||
NzbDroneLogger.Register(startupArgument, true, true);
|
NzbDroneLogger.Register(startupArgument, true, true);
|
||||||
|
|
||||||
Logger.Info("Starting Sonarr Update Client");
|
Logger.Info("Starting Radarr Update Client");
|
||||||
|
|
||||||
_container = UpdateContainerBuilder.Build(startupArgument);
|
_container = UpdateContainerBuilder.Build(startupArgument);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace NzbDrone.Update
|
||||||
{
|
{
|
||||||
var assemblies = new List<string>
|
var assemblies = new List<string>
|
||||||
{
|
{
|
||||||
"NzbDrone.Update",
|
"Radarr.Update",
|
||||||
"NzbDrone.Common"
|
"NzbDrone.Common"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ namespace NzbDrone.Update.UpdateEngine
|
||||||
public void Start(string installationFolder, int processId)
|
public void Start(string installationFolder, int processId)
|
||||||
{
|
{
|
||||||
_logger.Info("Installation Folder: {0}", installationFolder);
|
_logger.Info("Installation Folder: {0}", installationFolder);
|
||||||
_logger.Info("Updating Sonarr from version {0} to version {1}", _detectExistingVersion.GetExistingVersion(installationFolder), BuildInfo.Version);
|
_logger.Info("Updating Radarr from version {0} to version {1}", _detectExistingVersion.GetExistingVersion(installationFolder), BuildInfo.Version);
|
||||||
|
|
||||||
Verify(installationFolder, processId);
|
Verify(installationFolder, processId);
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ namespace NzbDrone.Update.UpdateEngine
|
||||||
{
|
{
|
||||||
if (_processProvider.Exists(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME) || _processProvider.Exists(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
if (_processProvider.Exists(ProcessProvider.NZB_DRONE_CONSOLE_PROCESS_NAME) || _processProvider.Exists(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
||||||
{
|
{
|
||||||
_logger.Error("Sonarr was restarted prematurely by external process.");
|
_logger.Error("Radarr was restarted prematurely by external process.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ namespace NzbDrone.Update.UpdateEngine
|
||||||
|
|
||||||
if (_processProvider.Exists(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
if (_processProvider.Exists(ProcessProvider.NZB_DRONE_PROCESS_NAME))
|
||||||
{
|
{
|
||||||
_logger.Info("Sonarr was restarted by external process.");
|
_logger.Info("Radarr was restarted by external process.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ var Collection = PageableCollection.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
sortMappings : {
|
sortMappings : {
|
||||||
'movie' : { sortKey : 'movie.sortTitle' }
|
'movie' : { sortKey : 'movie.title' }
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize : function(options) {
|
initialize : function(options) {
|
||||||
|
|
6
src/UI/Cells/MovieDownloadStatusCell.js
Normal file
6
src/UI/Cells/MovieDownloadStatusCell.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
var TemplatedCell = require('./TemplatedCell');
|
||||||
|
|
||||||
|
module.exports = TemplatedCell.extend({
|
||||||
|
className : 'movie-title-cell',
|
||||||
|
template : 'Cells/MovieDownloadStatusTemplate',
|
||||||
|
});
|
1
src/UI/Cells/MovieDownloadStatusTemplate.hbs
Normal file
1
src/UI/Cells/MovieDownloadStatusTemplate.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<span class="label label-{{DownloadedStatusColor}}">{{DownloadedStatus}}</span>
|
|
@ -127,17 +127,56 @@ Handlebars.registerHelper('GetBannerStatus', function() {
|
||||||
else if (!monitored) {
|
else if (!monitored) {
|
||||||
return new Handlebars.SafeString('<div class="announced-banner"><i class="icon-sonarr-series-unmonitored grid-icon" title=""></i> Not Monitored</div>');
|
return new Handlebars.SafeString('<div class="announced-banner"><i class="icon-sonarr-series-unmonitored grid-icon" title=""></i> Not Monitored</div>');
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Handlebars.registerHelper('DownloadedStatusColor', function() {
|
||||||
|
if (!this.monitored) {
|
||||||
|
if (this.downloaded) {
|
||||||
|
return "default";
|
||||||
|
}
|
||||||
|
return "warning";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.downloaded) {
|
||||||
|
return "success";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.status != "released") {
|
||||||
|
return "primary";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "danger";
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Handlebars.registerHelper('DownloadedStatus', function() {
|
||||||
|
|
||||||
|
if (this.downloaded) {
|
||||||
|
return "Downloaded";
|
||||||
|
}
|
||||||
|
if (!this.monitored) {
|
||||||
|
return "Not Monitored";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return "Missing";
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
Handlebars.registerHelper('inCinemas', function() {
|
Handlebars.registerHelper('inCinemas', function() {
|
||||||
var monthNames = ["January", "February", "March", "April", "May", "June",
|
var monthNames = ["January", "February", "March", "April", "May", "June",
|
||||||
"July", "August", "September", "October", "November", "December"
|
"July", "August", "September", "October", "November", "December"
|
||||||
];
|
];
|
||||||
|
if (this.physicalRelease) {
|
||||||
|
var d = new Date(this.physicalRelease);
|
||||||
|
var day = d.getDate();
|
||||||
|
var month = monthNames[d.getMonth()];
|
||||||
|
var year = d.getFullYear();
|
||||||
|
return "Available: " + day + ". " + month + " " + year;
|
||||||
|
}
|
||||||
var cinemasDate = new Date(this.inCinemas);
|
var cinemasDate = new Date(this.inCinemas);
|
||||||
var year = cinemasDate.getFullYear();
|
var year = cinemasDate.getFullYear();
|
||||||
var month = monthNames[cinemasDate.getMonth()];
|
var month = monthNames[cinemasDate.getMonth()];
|
||||||
return "In Cinemas " + month + " " + year;
|
return "In Cinemas: " + month + " " + year;
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('tvRageUrl', function() {
|
Handlebars.registerHelper('tvRageUrl', function() {
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="label label-default">Announced</span>
|
<span class="label label-default">Announced</span>
|
||||||
{{/if_eq}}
|
{{/if_eq}}
|
||||||
|
<span class="label label-{{DownloadedStatusColor}}">{{DownloadedStatus}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<span class="series-info-links">
|
<span class="series-info-links">
|
||||||
|
|
|
@ -12,6 +12,7 @@ var ProfileCell = require('../../Cells/ProfileCell');
|
||||||
var MovieLinksCell = require('../../Cells/MovieLinksCell');
|
var MovieLinksCell = require('../../Cells/MovieLinksCell');
|
||||||
var MovieActionCell = require('../../Cells/MovieActionCell');
|
var MovieActionCell = require('../../Cells/MovieActionCell');
|
||||||
var MovieStatusCell = require('../../Cells/MovieStatusCell');
|
var MovieStatusCell = require('../../Cells/MovieStatusCell');
|
||||||
|
var MovieDownloadStatusCell = require('../../Cells/MovieDownloadStatusCell');
|
||||||
var FooterView = require('./FooterView');
|
var FooterView = require('./FooterView');
|
||||||
var FooterModel = require('./FooterModel');
|
var FooterModel = require('./FooterModel');
|
||||||
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
||||||
|
@ -38,7 +39,6 @@ module.exports = Marionette.Layout.extend({
|
||||||
label : 'Title',
|
label : 'Title',
|
||||||
cell : MovieTitleCell,
|
cell : MovieTitleCell,
|
||||||
cellValue : 'this',
|
cellValue : 'this',
|
||||||
sortValue : 'sortTitle'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'profileId',
|
name : 'profileId',
|
||||||
|
@ -56,6 +56,11 @@ module.exports = Marionette.Layout.extend({
|
||||||
cell : MovieLinksCell,
|
cell : MovieLinksCell,
|
||||||
className : "movie-links-cell"
|
className : "movie-links-cell"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name : "this",
|
||||||
|
label : "Status",
|
||||||
|
cell : MovieDownloadStatusCell,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name : 'this',
|
name : 'this',
|
||||||
label : '',
|
label : '',
|
||||||
|
@ -123,25 +128,17 @@ module.exports = Marionette.Layout.extend({
|
||||||
title : 'Title',
|
title : 'Title',
|
||||||
name : 'title'
|
name : 'title'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title : 'Seasons',
|
|
||||||
name : 'seasonCount'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title : 'Quality',
|
title : 'Quality',
|
||||||
name : 'profileId'
|
name : 'profileId'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title : 'Network',
|
title : 'In Cinemas',
|
||||||
name : 'network'
|
name : 'inCinemas'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title : 'Next Airing',
|
title : "Status",
|
||||||
name : 'nextAiring'
|
name : "status",
|
||||||
},
|
|
||||||
{
|
|
||||||
title : 'Episodes',
|
|
||||||
name : 'percentOfEpisodes'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -165,27 +162,6 @@ module.exports = Marionette.Layout.extend({
|
||||||
tooltip : 'Monitored Only',
|
tooltip : 'Monitored Only',
|
||||||
icon : 'icon-sonarr-monitored',
|
icon : 'icon-sonarr-monitored',
|
||||||
callback : this._setFilter
|
callback : this._setFilter
|
||||||
},
|
|
||||||
{
|
|
||||||
key : 'continuing',
|
|
||||||
title : '',
|
|
||||||
tooltip : 'Continuing Only',
|
|
||||||
icon : 'icon-sonarr-series-continuing',
|
|
||||||
callback : this._setFilter
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key : 'ended',
|
|
||||||
title : '',
|
|
||||||
tooltip : 'Ended Only',
|
|
||||||
icon : 'icon-sonarr-series-ended',
|
|
||||||
callback : this._setFilter
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key : 'missing',
|
|
||||||
title : '',
|
|
||||||
tooltip : 'Missing',
|
|
||||||
icon : 'icon-sonarr-missing',
|
|
||||||
callback : this._setFilter
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,6 +40,8 @@
|
||||||
<span class="label label-default">{{inCinemas}}</span>
|
<span class="label label-default">{{inCinemas}}</span>
|
||||||
|
|
||||||
{{profile profileId}}
|
{{profile profileId}}
|
||||||
|
|
||||||
|
<span class="label label-{{DownloadedStatusColor}}">{{DownloadedStatus}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-xs-4">
|
<div class="col-md-4 col-xs-4">
|
||||||
<span class="movie-info-links">
|
<span class="movie-info-links">
|
||||||
|
|
|
@ -15,10 +15,10 @@ var Collection = PageableCollection.extend({
|
||||||
tableName : 'movie',
|
tableName : 'movie',
|
||||||
|
|
||||||
state : {
|
state : {
|
||||||
sortKey : 'sortTitle',
|
sortKey : 'title',
|
||||||
order : -1,
|
order : 1,
|
||||||
pageSize : 100000,
|
pageSize : 100000,
|
||||||
secondarySortKey : 'sortTitle',
|
secondarySortKey : 'title',
|
||||||
secondarySortOrder : -1
|
secondarySortOrder : -1
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ var Collection = PageableCollection.extend({
|
||||||
|
|
||||||
sortMappings : {
|
sortMappings : {
|
||||||
title : {
|
title : {
|
||||||
sortKey : 'sortTitle'
|
sortKey : 'title'
|
||||||
},
|
},
|
||||||
|
|
||||||
nextAiring : {
|
nextAiring : {
|
||||||
|
|
|
@ -41,7 +41,7 @@ module.exports = Marionette.AppRouter.extend({
|
||||||
var label = window.location.pathname === window.NzbDrone.UrlBase + '/system/updates' ? 'Reload' : 'View Changes';
|
var label = window.location.pathname === window.NzbDrone.UrlBase + '/system/updates' ? 'Reload' : 'View Changes';
|
||||||
|
|
||||||
Messenger.show({
|
Messenger.show({
|
||||||
message : 'Sonarr has been updated',
|
message : 'Radarr has been updated',
|
||||||
hideAfter : 0,
|
hideAfter : 0,
|
||||||
id : 'sonarrUpdated',
|
id : 'sonarrUpdated',
|
||||||
actions : {
|
actions : {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue