From e43e7d2b8d91446a32e784b3cef6a6a6c3aa0b78 Mon Sep 17 00:00:00 2001 From: flightlevel Date: Wed, 24 May 2017 01:30:59 +1000 Subject: [PATCH 1/2] Encourage Torznab use with Jackett (#1559) --- README.md | 3 ++- .../Indexers/TorrentPotato/TorrentPotato.cs | 10 +--------- .../Indexers/TorrentPotato/TorrentPotatoSettings.cs | 2 +- src/NzbDrone.Core/Indexers/Torznab/Torznab.cs | 1 + 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 106da2bff..de14afb57 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,8 @@ Radarr is currently undergoing rapid development and pull requests are actively * All indexers supported by Sonarr also supported * New PassThePopcorn Indexer * QBittorrent, Deluge, rTorrent, Transmission and uTorrent download client (Other clients are coming) -* New TorrentPotato Indexer (Works well with [Jackett](https://github.com/Jackett/Jackett)) +* New TorrentPotato Indexer +* Torznab Indexer now supports Movies (Works well with [Jackett](https://github.com/Jackett/Jackett)) * Scanning PreDB to know when a new release is available * Importing movies from various online sources, such as IMDb Watchlists (A complete list can be found [here](https://github.com/Radarr/Radarr/issues/114)) * Full integration with Kodi, Plex (notification, library update) diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotato.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotato.cs index 2eeb09f37..862dffb21 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotato.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotato.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using NLog; using NzbDrone.Common.Extensions; @@ -26,14 +26,6 @@ namespace NzbDrone.Core.Indexers.TorrentPotato } - public override IEnumerable DefaultDefinitions - { - get - { - yield return GetDefinition("Jackett", new TorrentPotatoSettings { BaseUrl = "http://localhost:9117/potato/YOURINDEXER"}); - } - } - private IndexerDefinition GetDefinition(string name, TorrentPotatoSettings settings) { return new IndexerDefinition diff --git a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs index 96f29aad0..a4f9b2951 100644 --- a/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs +++ b/src/NzbDrone.Core/Indexers/TorrentPotato/TorrentPotatoSettings.cs @@ -28,7 +28,7 @@ namespace NzbDrone.Core.Indexers.TorrentPotato [FieldDefinition(1, Label = "Username", HelpText = "The username you use at your indexer.")] public string User { get; set; } - [FieldDefinition(2, Label = "Passkey", HelpText = "The password you use at your Indexer (or your API key if you're using Jackett).")] + [FieldDefinition(2, Label = "Passkey", HelpText = "The password you use at your Indexer.")] public string Passkey { get; set; } public NzbDroneValidationResult Validate() { diff --git a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs index 6aab4c280..51539e304 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs @@ -41,6 +41,7 @@ namespace NzbDrone.Core.Indexers.Torznab { get { + yield return GetDefinition("Jackett", GetSettings("http://localhost:9117/torznab/YOURINDEXER")); yield return GetDefinition("HD4Free.xyz", GetSettings("http://hd4free.xyz")); } } From 6767f602fb17bb7e537c5da1420fe87a68bcdb6e Mon Sep 17 00:00:00 2001 From: Sentir101 Date: Thu, 25 May 2017 15:44:43 +0200 Subject: [PATCH 2/2] Refresh IsDuplicate in bulk import when the tmdbId changes (#1570) --- .../AddMovies/BulkImport/BulkImportSelectAllCell.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/UI/AddMovies/BulkImport/BulkImportSelectAllCell.js b/src/UI/AddMovies/BulkImport/BulkImportSelectAllCell.js index 66a51ce8c..82563f701 100644 --- a/src/UI/AddMovies/BulkImport/BulkImportSelectAllCell.js +++ b/src/UI/AddMovies/BulkImport/BulkImportSelectAllCell.js @@ -13,9 +13,7 @@ module.exports = SelectAllCell.extend({ initialize : function() { this._originalInit.apply(this, arguments); - var tmdbId = this.model.get('tmdbId'); - var existingMovie = FullMovieCollection.where({ tmdbId: tmdbId }); - this.isDuplicate = existingMovie.length > 0 ? true : false; + this._refreshIsDuplicate(); this.listenTo(this.model, 'change', this._refresh); }, @@ -39,6 +37,13 @@ module.exports = SelectAllCell.extend({ }, _refresh: function() { + this._refreshIsDuplicate(); this.render(); + }, + + _refreshIsDuplicate: function() { + var tmdbId = this.model.get('tmdbId'); + var existingMovie = FullMovieCollection.where({ tmdbId: tmdbId }); + this.isDuplicate = existingMovie.length > 0 ? true : false; } });