mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 11:48:26 -07:00
Fixed: Some TV scrubbing
This commit is contained in:
parent
0926862609
commit
7d4d923903
24 changed files with 100 additions and 175 deletions
|
@ -27,7 +27,6 @@ namespace Lidarr.Api.V1.Calendar
|
||||||
var end = DateTime.Today.AddDays(2);
|
var end = DateTime.Today.AddDays(2);
|
||||||
var includeUnmonitored = Request.GetBooleanQueryParameter("unmonitored");
|
var includeUnmonitored = Request.GetBooleanQueryParameter("unmonitored");
|
||||||
var includeArtist = Request.GetBooleanQueryParameter("includeArtist");
|
var includeArtist = Request.GetBooleanQueryParameter("includeArtist");
|
||||||
var includeEpisodeFile = Request.GetBooleanQueryParameter("includeEpisodeFile");
|
|
||||||
|
|
||||||
//TODO: Add Album Image support to AlbumModuleWithSignalR
|
//TODO: Add Album Image support to AlbumModuleWithSignalR
|
||||||
var includeAlbumImages = Request.GetBooleanQueryParameter("includeAlbumImages");
|
var includeAlbumImages = Request.GetBooleanQueryParameter("includeAlbumImages");
|
||||||
|
|
|
@ -22,12 +22,6 @@ namespace Lidarr.Api.V1.Config
|
||||||
StandardTrackFormat = model.StandardTrackFormat,
|
StandardTrackFormat = model.StandardTrackFormat,
|
||||||
ArtistFolderFormat = model.ArtistFolderFormat,
|
ArtistFolderFormat = model.ArtistFolderFormat,
|
||||||
AlbumFolderFormat = model.AlbumFolderFormat
|
AlbumFolderFormat = model.AlbumFolderFormat
|
||||||
//IncludeSeriesTitle
|
|
||||||
//IncludeEpisodeTitle
|
|
||||||
//IncludeQuality
|
|
||||||
//ReplaceSpaces
|
|
||||||
//Separator
|
|
||||||
//NumberStyle
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,11 +116,6 @@ namespace Lidarr.Api.V1.Indexers
|
||||||
Seeders = torrentInfo.Seeders,
|
Seeders = torrentInfo.Seeders,
|
||||||
Leechers = (torrentInfo.Peers.HasValue && torrentInfo.Seeders.HasValue) ? (torrentInfo.Peers.Value - torrentInfo.Seeders.Value) : (int?)null,
|
Leechers = (torrentInfo.Peers.HasValue && torrentInfo.Seeders.HasValue) ? (torrentInfo.Peers.Value - torrentInfo.Seeders.Value) : (int?)null,
|
||||||
Protocol = releaseInfo.DownloadProtocol,
|
Protocol = releaseInfo.DownloadProtocol,
|
||||||
|
|
||||||
//IsDaily = parsedEpisodeInfo.IsDaily,
|
|
||||||
//IsAbsoluteNumbering = parsedEpisodeInfo.IsAbsoluteNumbering,
|
|
||||||
//IsPossibleSpecialEpisode = parsedEpisodeInfo.IsPossibleSpecialEpisode,
|
|
||||||
//Special = parsedEpisodeInfo.Special,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,10 +61,10 @@ namespace NzbDrone.Core.Test.Download.DownloadApprovedReportsTests
|
||||||
public void should_download_report_if_album_was_not_already_downloaded()
|
public void should_download_report_if_album_was_not_already_downloaded()
|
||||||
{
|
{
|
||||||
var albums = new List<Album> { GetAlbum(1) };
|
var albums = new List<Album> { GetAlbum(1) };
|
||||||
var remoteEpisode = GetRemoteAlbum(albums, new QualityModel(Quality.MP3_192));
|
var remoteAlbum = GetRemoteAlbum(albums, new QualityModel(Quality.MP3_192));
|
||||||
|
|
||||||
var decisions = new List<DownloadDecision>();
|
var decisions = new List<DownloadDecision>();
|
||||||
decisions.Add(new DownloadDecision(remoteEpisode));
|
decisions.Add(new DownloadDecision(remoteAlbum));
|
||||||
|
|
||||||
Subject.ProcessDecisions(decisions);
|
Subject.ProcessDecisions(decisions);
|
||||||
Mocker.GetMock<IDownloadService>().Verify(v => v.DownloadReport(It.IsAny<RemoteAlbum>()), Times.Once());
|
Mocker.GetMock<IDownloadService>().Verify(v => v.DownloadReport(It.IsAny<RemoteAlbum>()), Times.Once());
|
||||||
|
@ -248,13 +248,13 @@ namespace NzbDrone.Core.Test.Download.DownloadApprovedReportsTests
|
||||||
[Test]
|
[Test]
|
||||||
public void should_not_add_to_failed_if_failed_for_a_different_protocol()
|
public void should_not_add_to_failed_if_failed_for_a_different_protocol()
|
||||||
{
|
{
|
||||||
var episodes = new List<Album> { GetAlbum(1) };
|
var albums = new List<Album> { GetAlbum(1) };
|
||||||
var remoteEpisode = GetRemoteAlbum(episodes, new QualityModel(Quality.MP3_320), DownloadProtocol.Usenet);
|
var remoteAlbum = GetRemoteAlbum(albums, new QualityModel(Quality.MP3_320), DownloadProtocol.Usenet);
|
||||||
var remoteEpisode2 = GetRemoteAlbum(episodes, new QualityModel(Quality.MP3_320), DownloadProtocol.Torrent);
|
var remoteAlbum2 = GetRemoteAlbum(albums, new QualityModel(Quality.MP3_320), DownloadProtocol.Torrent);
|
||||||
|
|
||||||
var decisions = new List<DownloadDecision>();
|
var decisions = new List<DownloadDecision>();
|
||||||
decisions.Add(new DownloadDecision(remoteEpisode));
|
decisions.Add(new DownloadDecision(remoteAlbum));
|
||||||
decisions.Add(new DownloadDecision(remoteEpisode2));
|
decisions.Add(new DownloadDecision(remoteAlbum2));
|
||||||
|
|
||||||
Mocker.GetMock<IDownloadService>().Setup(s => s.DownloadReport(It.Is<RemoteAlbum>(r => r.Release.DownloadProtocol == DownloadProtocol.Usenet)))
|
Mocker.GetMock<IDownloadService>().Setup(s => s.DownloadReport(It.Is<RemoteAlbum>(r => r.Release.DownloadProtocol == DownloadProtocol.Usenet)))
|
||||||
.Throws(new DownloadClientUnavailableException("Download client failed"));
|
.Throws(new DownloadClientUnavailableException("Download client failed"));
|
||||||
|
|
|
@ -112,9 +112,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
|
||||||
[Test]
|
[Test]
|
||||||
public void Download_should_download_file_if_it_doesnt_exist()
|
public void Download_should_download_file_if_it_doesnt_exist()
|
||||||
{
|
{
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
Subject.Download(remoteEpisode);
|
Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
Mocker.GetMock<IHttpClient>().Verify(c => c.Get(It.Is<HttpRequest>(v => v.Url.FullUri == _downloadUrl)), Times.Once());
|
Mocker.GetMock<IHttpClient>().Verify(c => c.Get(It.Is<HttpRequest>(v => v.Url.FullUri == _downloadUrl)), Times.Once());
|
||||||
Mocker.GetMock<IDiskProvider>().Verify(c => c.OpenWriteStream(_filePath), Times.Once());
|
Mocker.GetMock<IDiskProvider>().Verify(c => c.OpenWriteStream(_filePath), Times.Once());
|
||||||
|
@ -127,10 +127,10 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.Blackhole
|
||||||
var illegalTitle = "Radiohead - Scotch Mist [2008/FLAC/Lossless]";
|
var illegalTitle = "Radiohead - Scotch Mist [2008/FLAC/Lossless]";
|
||||||
var expectedFilename = Path.Combine(_blackholeFolder, "Radiohead - Scotch Mist [2008+FLAC+Lossless]" + Path.GetExtension(_filePath));
|
var expectedFilename = Path.Combine(_blackholeFolder, "Radiohead - Scotch Mist [2008+FLAC+Lossless]" + Path.GetExtension(_filePath));
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
remoteEpisode.Release.Title = illegalTitle;
|
remoteAlbum.Release.Title = illegalTitle;
|
||||||
|
|
||||||
Subject.Download(remoteEpisode);
|
Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
Mocker.GetMock<IHttpClient>().Verify(c => c.Get(It.Is<HttpRequest>(v => v.Url.FullUri == _downloadUrl)), Times.Once());
|
Mocker.GetMock<IHttpClient>().Verify(c => c.Get(It.Is<HttpRequest>(v => v.Url.FullUri == _downloadUrl)), Times.Once());
|
||||||
Mocker.GetMock<IDiskProvider>().Verify(c => c.OpenWriteStream(expectedFilename), Times.Once());
|
Mocker.GetMock<IDiskProvider>().Verify(c => c.OpenWriteStream(expectedFilename), Times.Once());
|
||||||
|
|
|
@ -204,9 +204,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
@ -216,10 +216,10 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
remoteEpisode.Release.DownloadUrl = magnetUrl;
|
remoteAlbum.Release.DownloadUrl = magnetUrl;
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().Be(expectedHash);
|
id.Should().Be(expectedHash);
|
||||||
}
|
}
|
||||||
|
|
|
@ -375,9 +375,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||||
GivenTvDirectory();
|
GivenTvDirectory();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -392,9 +392,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||||
GivenMusicCategory();
|
GivenMusicCategory();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -408,9 +408,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||||
GivenSerialNumber();
|
GivenSerialNumber();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -483,13 +483,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||||
[Test]
|
[Test]
|
||||||
public void Download_should_throw_and_not_add_task_if_cannot_get_serial_number()
|
public void Download_should_throw_and_not_add_task_if_cannot_get_serial_number()
|
||||||
{
|
{
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
Mocker.GetMock<ISerialNumberProvider>()
|
Mocker.GetMock<ISerialNumberProvider>()
|
||||||
.Setup(s => s.GetSerialNumber(_settings))
|
.Setup(s => s.GetSerialNumber(_settings))
|
||||||
.Throws(new ApplicationException("Some unknown exception, HttpException or DownloadClientException"));
|
.Throws(new ApplicationException("Some unknown exception, HttpException or DownloadClientException"));
|
||||||
|
|
||||||
Assert.Throws(Is.InstanceOf<Exception>(), () => Subject.Download(remoteEpisode));
|
Assert.Throws(Is.InstanceOf<Exception>(), () => Subject.Download(remoteAlbum));
|
||||||
|
|
||||||
Mocker.GetMock<IDownloadStationTaskProxy>()
|
Mocker.GetMock<IDownloadStationTaskProxy>()
|
||||||
.Verify(v => v.AddTaskFromUrl(It.IsAny<string>(), null, _settings), Times.Never());
|
.Verify(v => v.AddTaskFromUrl(It.IsAny<string>(), null, _settings), Times.Never());
|
||||||
|
|
|
@ -254,9 +254,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||||
GivenTvDirectory();
|
GivenTvDirectory();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -271,9 +271,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||||
GivenMusicCategory();
|
GivenMusicCategory();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -287,9 +287,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||||
GivenSerialNumber();
|
GivenSerialNumber();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -362,13 +362,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||||
[Test]
|
[Test]
|
||||||
public void Download_should_throw_and_not_add_task_if_cannot_get_serial_number()
|
public void Download_should_throw_and_not_add_task_if_cannot_get_serial_number()
|
||||||
{
|
{
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
Mocker.GetMock<ISerialNumberProvider>()
|
Mocker.GetMock<ISerialNumberProvider>()
|
||||||
.Setup(s => s.GetSerialNumber(_settings))
|
.Setup(s => s.GetSerialNumber(_settings))
|
||||||
.Throws(new ApplicationException("Some unknown exception, HttpException or DownloadClientException"));
|
.Throws(new ApplicationException("Some unknown exception, HttpException or DownloadClientException"));
|
||||||
|
|
||||||
Assert.Throws(Is.InstanceOf<Exception>(), () => Subject.Download(remoteEpisode));
|
Assert.Throws(Is.InstanceOf<Exception>(), () => Subject.Download(remoteAlbum));
|
||||||
|
|
||||||
Mocker.GetMock<IDownloadStationTaskProxy>()
|
Mocker.GetMock<IDownloadStationTaskProxy>()
|
||||||
.Verify(v => v.AddTaskFromUrl(It.IsAny<string>(), null, _settings), Times.Never());
|
.Verify(v => v.AddTaskFromUrl(It.IsAny<string>(), null, _settings), Times.Never());
|
||||||
|
|
|
@ -200,9 +200,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.HadoukenTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
@ -279,14 +279,14 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.HadoukenTests
|
||||||
[Test]
|
[Test]
|
||||||
public void Download_from_magnet_link_should_return_hash_uppercase()
|
public void Download_from_magnet_link_should_return_hash_uppercase()
|
||||||
{
|
{
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
remoteEpisode.Release.DownloadUrl = "magnet:?xt=urn:btih:a45129e59d8750f9da982f53552b1e4f0457ee9f";
|
remoteAlbum.Release.DownloadUrl = "magnet:?xt=urn:btih:a45129e59d8750f9da982f53552b1e4f0457ee9f";
|
||||||
|
|
||||||
Mocker.GetMock<IHadoukenProxy>()
|
Mocker.GetMock<IHadoukenProxy>()
|
||||||
.Setup(v => v.AddTorrentUri(It.IsAny<HadoukenSettings>(), It.IsAny<string>()));
|
.Setup(v => v.AddTorrentUri(It.IsAny<HadoukenSettings>(), It.IsAny<string>()));
|
||||||
|
|
||||||
var result = Subject.Download(remoteEpisode);
|
var result = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
Assert.IsFalse(result.Any(c => char.IsLower(c)));
|
Assert.IsFalse(result.Any(c => char.IsLower(c)));
|
||||||
}
|
}
|
||||||
|
@ -294,13 +294,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.HadoukenTests
|
||||||
[Test]
|
[Test]
|
||||||
public void Download_from_torrent_file_should_return_hash_uppercase()
|
public void Download_from_torrent_file_should_return_hash_uppercase()
|
||||||
{
|
{
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
Mocker.GetMock<IHadoukenProxy>()
|
Mocker.GetMock<IHadoukenProxy>()
|
||||||
.Setup(v => v.AddTorrentFile(It.IsAny<HadoukenSettings>(), It.IsAny<byte[]>()))
|
.Setup(v => v.AddTorrentFile(It.IsAny<HadoukenSettings>(), It.IsAny<byte[]>()))
|
||||||
.Returns("hash");
|
.Returns("hash");
|
||||||
|
|
||||||
var result = Subject.Download(remoteEpisode);
|
var result = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
Assert.IsFalse(result.Any(c => char.IsLower(c)));
|
Assert.IsFalse(result.Any(c => char.IsLower(c)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,9 +204,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbVortexTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
@ -216,9 +216,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbVortexTests
|
||||||
{
|
{
|
||||||
GivenFailedDownload();
|
GivenFailedDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
Assert.Throws<DownloadClientException>(() => Subject.Download(remoteEpisode));
|
Assert.Throws<DownloadClientException>(() => Subject.Download(remoteAlbum));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
|
@ -336,9 +336,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
@ -348,9 +348,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
||||||
{
|
{
|
||||||
GivenFailedDownload();
|
GivenFailedDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
Assert.Throws<DownloadClientException>(() => Subject.Download(remoteEpisode));
|
Assert.Throws<DownloadClientException>(() => Subject.Download(remoteAlbum));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Moq;
|
using Moq;
|
||||||
|
@ -116,9 +116,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.RTorrentTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,10 +296,10 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
remoteEpisode.Release.Title = title;
|
remoteAlbum.Release.Title = title;
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
Mocker.GetMock<ISabnzbdProxy>()
|
Mocker.GetMock<ISabnzbdProxy>()
|
||||||
.Verify(v => v.DownloadNzb(It.IsAny<byte[]>(), filename, It.IsAny<string>(), It.IsAny<int>(), It.IsAny<SabnzbdSettings>()), Times.Once());
|
.Verify(v => v.DownloadNzb(It.IsAny<byte[]>(), filename, It.IsAny<string>(), It.IsAny<int>(), It.IsAny<SabnzbdSettings>()), Times.Once());
|
||||||
|
@ -310,9 +310,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
@ -351,14 +351,14 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabnzbdTests
|
||||||
.Setup(s => s.DownloadNzb(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), (int)SabnzbdPriority.High, It.IsAny<SabnzbdSettings>()))
|
.Setup(s => s.DownloadNzb(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), (int)SabnzbdPriority.High, It.IsAny<SabnzbdSettings>()))
|
||||||
.Returns(new SabnzbdAddResponse());
|
.Returns(new SabnzbdAddResponse());
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
remoteEpisode.Albums = Builder<Album>.CreateListOfSize(1)
|
remoteAlbum.Albums = Builder<Album>.CreateListOfSize(1)
|
||||||
.All()
|
.All()
|
||||||
.With(e => e.ReleaseDate = DateTime.Today)
|
.With(e => e.ReleaseDate = DateTime.Today)
|
||||||
.Build()
|
.Build()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
Subject.Download(remoteEpisode);
|
Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
Mocker.GetMock<ISabnzbdProxy>()
|
Mocker.GetMock<ISabnzbdProxy>()
|
||||||
.Verify(v => v.DownloadNzb(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), (int)SabnzbdPriority.High, It.IsAny<SabnzbdSettings>()), Times.Once());
|
.Verify(v => v.DownloadNzb(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), (int)SabnzbdPriority.High, It.IsAny<SabnzbdSettings>()), Times.Once());
|
||||||
|
|
|
@ -58,9 +58,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
@ -71,9 +71,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
||||||
GivenTvDirectory();
|
GivenTvDirectory();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -87,9 +87,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
||||||
GivenMusicCategory();
|
GivenMusicCategory();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -105,9 +105,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
||||||
|
|
||||||
_transmissionConfigItems["download-dir"] += "/";
|
_transmissionConfigItems["download-dir"] += "/";
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -120,9 +120,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -135,10 +135,10 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
remoteEpisode.Release.DownloadUrl = magnetUrl;
|
remoteAlbum.Release.DownloadUrl = magnetUrl;
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().Be(expectedHash);
|
id.Should().Be(expectedHash);
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,9 +232,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.UTorrentTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
@ -256,10 +256,10 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.UTorrentTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
remoteEpisode.Release.DownloadUrl = magnetUrl;
|
remoteAlbum.Release.DownloadUrl = magnetUrl;
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().Be(expectedHash);
|
id.Should().Be(expectedHash);
|
||||||
}
|
}
|
||||||
|
@ -355,9 +355,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.UTorrentTests
|
||||||
GivenRedirectToMagnet();
|
GivenRedirectToMagnet();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
@ -368,9 +368,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.UTorrentTests
|
||||||
GivenRedirectToTorrent();
|
GivenRedirectToTorrent();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,9 +67,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
}
|
}
|
||||||
|
@ -80,9 +80,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
||||||
GivenTvDirectory();
|
GivenTvDirectory();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -96,9 +96,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
||||||
GivenMusicCategory();
|
GivenMusicCategory();
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -114,9 +114,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
||||||
|
|
||||||
_transmissionConfigItems["download-dir"] += "/";
|
_transmissionConfigItems["download-dir"] += "/";
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -129,9 +129,9 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().NotBeNullOrEmpty();
|
id.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
@ -144,10 +144,10 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.VuzeTests
|
||||||
{
|
{
|
||||||
GivenSuccessfulDownload();
|
GivenSuccessfulDownload();
|
||||||
|
|
||||||
var remoteEpisode = CreateRemoteAlbum();
|
var remoteAlbum = CreateRemoteAlbum();
|
||||||
remoteEpisode.Release.DownloadUrl = magnetUrl;
|
remoteAlbum.Release.DownloadUrl = magnetUrl;
|
||||||
|
|
||||||
var id = Subject.Download(remoteEpisode);
|
var id = Subject.Download(remoteAlbum);
|
||||||
|
|
||||||
id.Should().Be(expectedHash);
|
id.Should().Be(expectedHash);
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,7 +365,6 @@
|
||||||
<Compile Include="ParserTests\PathParserFixture.cs" />
|
<Compile Include="ParserTests\PathParserFixture.cs" />
|
||||||
<Compile Include="ParserTests\QualityParserFixture.cs" />
|
<Compile Include="ParserTests\QualityParserFixture.cs" />
|
||||||
<Compile Include="ParserTests\ReleaseGroupParserFixture.cs" />
|
<Compile Include="ParserTests\ReleaseGroupParserFixture.cs" />
|
||||||
<Compile Include="ParserTests\SeasonParserFixture.cs" />
|
|
||||||
<Compile Include="ParserTests\ArtistTitleInfoFixture.cs" />
|
<Compile Include="ParserTests\ArtistTitleInfoFixture.cs" />
|
||||||
<Compile Include="Profiles\ProfileRepositoryFixture.cs" />
|
<Compile Include="Profiles\ProfileRepositoryFixture.cs" />
|
||||||
<Compile Include="Profiles\ProfileServiceFixture.cs" />
|
<Compile Include="Profiles\ProfileServiceFixture.cs" />
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
using FluentAssertions;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using NzbDrone.Core.Test.Framework;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.ParserTests
|
|
||||||
{
|
|
||||||
|
|
||||||
[TestFixture]
|
|
||||||
public class SeasonParserFixture : CoreTest
|
|
||||||
{
|
|
||||||
[TestCase("30.Rock.Season.04.HDTV.XviD-DIMENSION", "30 Rock", 4)]
|
|
||||||
[TestCase("Parks.and.Recreation.S02.720p.x264-DIMENSION", "Parks and Recreation", 2)]
|
|
||||||
[TestCase("The.Office.US.S03.720p.x264-DIMENSION", "The Office US", 3)]
|
|
||||||
[TestCase(@"Sons.of.Anarchy.S03.720p.BluRay-CLUE\REWARD", "Sons of Anarchy", 3)]
|
|
||||||
[TestCase("Adventure Time S02 720p HDTV x264 CRON", "Adventure Time", 2)]
|
|
||||||
[TestCase("Sealab.2021.S04.iNTERNAL.DVDRip.XviD-VCDVaULT", "Sealab 2021", 4)]
|
|
||||||
[TestCase("Hawaii Five 0 S01 720p WEB DL DD5 1 H 264 NT", "Hawaii Five 0", 1)]
|
|
||||||
[TestCase("30 Rock S03 WS PDTV XviD FUtV", "30 Rock", 3)]
|
|
||||||
[TestCase("The Office Season 4 WS PDTV XviD FUtV", "The Office", 4)]
|
|
||||||
[TestCase("Eureka Season 1 720p WEB DL DD 5 1 h264 TjHD", "Eureka", 1)]
|
|
||||||
[TestCase("The Office Season4 WS PDTV XviD FUtV", "The Office", 4)]
|
|
||||||
[TestCase("Eureka S 01 720p WEB DL DD 5 1 h264 TjHD", "Eureka", 1)]
|
|
||||||
[TestCase("Doctor Who Confidential Season 3", "Doctor Who Confidential", 3)]
|
|
||||||
[TestCase("Fleming.S01.720p.WEBDL.DD5.1.H.264-NTb", "Fleming", 1)]
|
|
||||||
[TestCase("Holmes.Makes.It.Right.S02.720p.HDTV.AAC5.1.x265-NOGRP", "Holmes Makes It Right", 2)]
|
|
||||||
[TestCase("My.Series.S2014.720p.HDTV.x264-ME", "My Series", 2014)]
|
|
||||||
public void should_parse_full_season_release(string postTitle, string title, int season)
|
|
||||||
{
|
|
||||||
var result = Parser.Parser.ParseAlbumTitle(postTitle);
|
|
||||||
//result.SeasonNumber.Should().Be(season);
|
|
||||||
//result.SeriesTitle.Should().Be(title);
|
|
||||||
//result.EpisodeNumbers.Should().BeEmpty();
|
|
||||||
//result.AbsoluteEpisodeNumbers.Should().BeEmpty();
|
|
||||||
//result.FullSeason.Should().BeTrue();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestCase("Acropolis Now S05 EXTRAS DVDRip XviD RUNNER")]
|
|
||||||
[TestCase("Punky Brewster S01 EXTRAS DVDRip XviD RUNNER")]
|
|
||||||
[TestCase("Instant Star S03 EXTRAS DVDRip XviD OSiTV")]
|
|
||||||
public void should_parse_season_extras(string postTitle)
|
|
||||||
{
|
|
||||||
var result = Parser.Parser.ParseAlbumTitle(postTitle);
|
|
||||||
|
|
||||||
result.Should().BeNull();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestCase("Lie.to.Me.S03.SUBPACK.DVDRip.XviD-REWARD")]
|
|
||||||
[TestCase("The.Middle.S02.SUBPACK.DVDRip.XviD-REWARD")]
|
|
||||||
[TestCase("CSI.S11.SUBPACK.DVDRip.XviD-REWARD")]
|
|
||||||
public void should_parse_season_subpack(string postTitle)
|
|
||||||
{
|
|
||||||
var result = Parser.Parser.ParseAlbumTitle(postTitle);
|
|
||||||
|
|
||||||
result.Should().BeNull();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -52,8 +52,8 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
||||||
if (mostRecent != null && mostRecent.EventType == HistoryEventType.Grabbed)
|
if (mostRecent != null && mostRecent.EventType == HistoryEventType.Grabbed)
|
||||||
{
|
{
|
||||||
var recent = mostRecent.Date.After(DateTime.UtcNow.AddHours(-12));
|
var recent = mostRecent.Date.After(DateTime.UtcNow.AddHours(-12));
|
||||||
// The artist will be the same as the one in history since it's the same episode.
|
// The artist will be the same as the one in history since it's the same album.
|
||||||
// Instead of fetching the series from the DB reuse the known series.
|
// Instead of fetching the artist from the DB reuse the known artist.
|
||||||
var preferredWordScore = _preferredWordServiceCalculator.Calculate(subject.Artist, mostRecent.SourceTitle);
|
var preferredWordScore = _preferredWordServiceCalculator.Calculate(subject.Artist, mostRecent.SourceTitle);
|
||||||
|
|
||||||
var cutoffUnmet = _upgradableSpecification.CutoffNotMet(
|
var cutoffUnmet = _upgradableSpecification.CutoffNotMet(
|
||||||
|
|
|
@ -213,7 +213,7 @@ namespace NzbDrone.Core.Download.Pending
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return best quality release for each episode
|
//Return best quality release for each album
|
||||||
var deduped = queued.GroupBy(q => q.Album.Id).Select(g =>
|
var deduped = queued.GroupBy(q => q.Album.Id).Select(g =>
|
||||||
{
|
{
|
||||||
var artist = g.First().Artist;
|
var artist = g.First().Artist;
|
||||||
|
|
|
@ -116,11 +116,6 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Wdtv
|
||||||
details.Add(new XElement("track_number", track.AbsoluteTrackNumber.ToString("00")));
|
details.Add(new XElement("track_number", track.AbsoluteTrackNumber.ToString("00")));
|
||||||
details.Add(new XElement("member", string.Join(" / ", artist.Metadata.Value.Members.ConvertAll(c => c.Name + " - " + c.Instrument))));
|
details.Add(new XElement("member", string.Join(" / ", artist.Metadata.Value.Members.ConvertAll(c => c.Name + " - " + c.Instrument))));
|
||||||
|
|
||||||
|
|
||||||
//Todo: get guest stars, writer and director
|
|
||||||
//details.Add(new XElement("credits", tvdbEpisode.Writer.FirstOrDefault()));
|
|
||||||
//details.Add(new XElement("director", tvdbEpisode.Directors.FirstOrDefault()));
|
|
||||||
|
|
||||||
doc.Add(details);
|
doc.Add(details);
|
||||||
doc.Save(xw);
|
doc.Save(xw);
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.History
|
||||||
public interface IHistoryService
|
public interface IHistoryService
|
||||||
{
|
{
|
||||||
PagingSpec<History> Paged(PagingSpec<History> pagingSpec);
|
PagingSpec<History> Paged(PagingSpec<History> pagingSpec);
|
||||||
History MostRecentForAlbum(int episodeId);
|
History MostRecentForAlbum(int albumId);
|
||||||
History MostRecentForDownloadId(string downloadId);
|
History MostRecentForDownloadId(string downloadId);
|
||||||
History Get(int historyId);
|
History Get(int historyId);
|
||||||
List<History> GetByArtist(int artistId, HistoryEventType? eventType);
|
List<History> GetByArtist(int artistId, HistoryEventType? eventType);
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace NzbDrone.Core.MediaFiles
|
||||||
|
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.Error(ex, "Unable to cleanup EpisodeFile in DB: {0}", trackFile.Id);
|
_logger.Error(ex, "Unable to cleanup TrackFile in DB: {0}", trackFile.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace NzbDrone.Integration.Test.ApiTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_be_able_to_get_unmonitored_episodes()
|
public void should_be_able_to_get_unmonitored_albums()
|
||||||
{
|
{
|
||||||
var artist = EnsureArtist("aaaa_aaaaa_asaaaaa", "Alien Ant Farm", false);
|
var artist = EnsureArtist("aaaa_aaaaa_asaaaaa", "Alien Ant Farm", false);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue