Removed Core/Model Core/Provider

This commit is contained in:
Keivan Beigi
2013-09-18 18:09:26 -07:00
parent 0cc182b01d
commit 487519a09f
36 changed files with 72 additions and 177 deletions
@@ -1,4 +1,4 @@
namespace NzbDrone.Core.Model.Xem
namespace NzbDrone.Core.DataAugmentation.Xem.Model
{
public class XemResult<T>
{
@@ -1,4 +1,4 @@
namespace NzbDrone.Core.Model.Xem
namespace NzbDrone.Core.DataAugmentation.Xem.Model
{
public class XemSceneTvdbMapping
{
@@ -1,4 +1,4 @@
namespace NzbDrone.Core.Model.Xem
namespace NzbDrone.Core.DataAugmentation.Xem.Model
{
public class XemValues
{
@@ -1,6 +1,6 @@
using NzbDrone.Core.Messaging.Commands;
namespace NzbDrone.Core.Providers
namespace NzbDrone.Core.DataAugmentation.Xem
{
public class UpdateXemMappingsCommand : Command
{
@@ -2,15 +2,15 @@
using System.Collections.Generic;
using System.Linq;
using NLog;
using NzbDrone.Core.Model.Xem;
using NzbDrone.Core.DataAugmentation.Xem.Model;
using NzbDrone.Core.Rest;
using RestSharp;
namespace NzbDrone.Core.Providers
namespace NzbDrone.Core.DataAugmentation.Xem
{
public interface IXemProxy
{
List<Int32> GetXemSeriesIds();
List<int> GetXemSeriesIds();
List<XemSceneTvdbMapping> GetSceneTvdbMappings(int id);
}
@@ -33,7 +33,7 @@ namespace NzbDrone.Core.Providers
return req;
}
public List<Int32> GetXemSeriesIds()
public List<int> GetXemSeriesIds()
{
_logger.Trace("Fetching Series IDs from");
@@ -41,7 +41,7 @@ namespace NzbDrone.Core.Providers
var request = BuildRequest("havemap");
var response = restClient.ExecuteAndValidate<XemResult<List<Int32>>>(request);
var response = restClient.ExecuteAndValidate<XemResult<List<int>>>(request);
CheckForFailureResult(response);
return response.Data.ToList();
@@ -9,7 +9,7 @@ using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Tv;
using NzbDrone.Core.Tv.Events;
namespace NzbDrone.Core.Providers
namespace NzbDrone.Core.DataAugmentation.Xem
{
public class XemService : IExecute<UpdateXemMappingsCommand>, IHandle<SeriesUpdatedEvent>, IHandleAsync<ApplicationStartedEvent>
{
-24
View File
@@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
namespace NzbDrone.Core.Helpers
{
public static class SortHelper
{
public static string IgnoreArticles(this string input)
{
if (String.IsNullOrEmpty(input))
return String.Empty;
var articles = new List<string> { "The ", "An ", "A " };
foreach (string article in articles)
{
if (input.ToLower().StartsWith(article, StringComparison.InvariantCultureIgnoreCase))
return input.Substring(article.Length).Trim();
}
return input;
}
}
}
-33
View File
@@ -1,33 +0,0 @@
using System;
namespace NzbDrone.Core.Jobs
{
public class JobQueueItem : IEquatable<JobQueueItem>
{
public Type JobType { get; set; }
public dynamic Options { get; set; }
public JobSourceType Source { get; set; }
public bool Equals(JobQueueItem other)
{
return (JobType == other.JobType && Options == other.Options);
}
public override string ToString()
{
if (Options != null)
{
return string.Format("[{0}({1})]", JobType.Name, Options);
}
return string.Format("[{0}]", JobType.Name);
}
public enum JobSourceType
{
User,
Scheduler
}
}
}
+2 -1
View File
@@ -4,7 +4,9 @@ using System.Linq;
using NLog;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Configuration.Events;
using NzbDrone.Core.DataAugmentation;
using NzbDrone.Core.DataAugmentation.Scene;
using NzbDrone.Core.DataAugmentation.Xem;
using NzbDrone.Core.Housekeeping;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Instrumentation.Commands;
@@ -12,7 +14,6 @@ using NzbDrone.Core.Lifecycle;
using NzbDrone.Core.MediaFiles.Commands;
using NzbDrone.Core.Messaging.Commands.Tracking;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Providers;
using NzbDrone.Core.Tv.Commands;
using NzbDrone.Core.Update.Commands;
@@ -1,4 +1,4 @@
namespace NzbDrone.Core.Model
namespace NzbDrone.Core.MediaFiles.MediaInfo
{
public class MediaInfoModel
{
@@ -3,7 +3,6 @@ using System.IO;
using MediaInfoLib;
using NLog;
using NzbDrone.Common;
using NzbDrone.Core.Model;
namespace NzbDrone.Core.MediaFiles.MediaInfo
{
@@ -1,9 +0,0 @@
namespace NzbDrone.Core.Model
{
public enum AtomicParsleyTitleType
{
None = 0,
EpisodeNumber = 1,
Both = 2
}
}
@@ -1,11 +0,0 @@
namespace NzbDrone.Core.Model
{
public class MisnamedEpisodeModel
{
public int EpisodeFileId { get; set; }
public int SeriesId { get; set; }
public string SeriesTitle { get; set; }
public string CurrentName { get; set; }
public string ProperName { get; set; }
}
}
@@ -1,23 +0,0 @@
using System.Collections.Generic;
namespace NzbDrone.Core.Model.Xbmc
{
public class ActivePlayersEdenResult
{
public string Id { get; set; }
public string JsonRpc { get; set; }
public List<ActivePlayer> Result { get; set; }
}
public class ActivePlayer
{
public int PlayerId { get; set; }
public string Type { get; set; }
public ActivePlayer(int playerId, string type)
{
PlayerId = playerId;
Type = type;
}
}
}
@@ -5,7 +5,7 @@ using System.Linq;
using System.Xml.Linq;
using NLog;
using NzbDrone.Common;
using NzbDrone.Core.Model.Xbmc;
using NzbDrone.Core.Notifications.Xbmc.Model;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Notifications.Xbmc
@@ -1,5 +1,5 @@
using System.Collections.Generic;
using NzbDrone.Core.Model.Xbmc;
using NzbDrone.Core.Notifications.Xbmc.Model;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Notifications.Xbmc
@@ -5,7 +5,7 @@ using NLog;
using Newtonsoft.Json.Linq;
using NzbDrone.Common;
using NzbDrone.Common.Serializer;
using NzbDrone.Core.Model.Xbmc;
using NzbDrone.Core.Notifications.Xbmc.Model;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Notifications.Xbmc
@@ -0,0 +1,14 @@
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class ActivePlayer
{
public int PlayerId { get; set; }
public string Type { get; set; }
public ActivePlayer(int playerId, string type)
{
PlayerId = playerId;
Type = type;
}
}
}
@@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace NzbDrone.Core.Model.Xbmc
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class ActivePlayersDharmaResult
{
@@ -0,0 +1,11 @@
using System.Collections.Generic;
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class ActivePlayersEdenResult
{
public string Id { get; set; }
public string JsonRpc { get; set; }
public List<ActivePlayer> Result { get; set; }
}
}
@@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace NzbDrone.Core.Model.Xbmc
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class ErrorResult
{
@@ -1,4 +1,4 @@
namespace NzbDrone.Core.Model.Xbmc
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class TvShow
{
@@ -1,4 +1,4 @@
namespace NzbDrone.Core.Model.Xbmc
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class TvShowResponse
{
@@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace NzbDrone.Core.Model.Xbmc
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class TvShowResult
{
@@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace NzbDrone.Core.Model.Xbmc
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class VersionResult
{
@@ -1,4 +1,4 @@
namespace NzbDrone.Core.Model.Xbmc
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class XbmcJsonResult<T>
{
@@ -1,6 +1,6 @@
using System;
namespace NzbDrone.Core.Model.Xbmc
namespace NzbDrone.Core.Notifications.Xbmc.Model
{
public class XbmcVersion : IComparable<XbmcVersion>
{
@@ -7,8 +7,8 @@ using NzbDrone.Common;
using NzbDrone.Common.Instrumentation;
using NzbDrone.Common.Serializer;
using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.Notifications.Xbmc.Model;
using NzbDrone.Core.Tv;
using NzbDrone.Core.Model.Xbmc;
namespace NzbDrone.Core.Notifications.Xbmc
{
+17 -20
View File
@@ -131,6 +131,12 @@
<Compile Include="DataAugmentation\Scene\SceneMappingProxy.cs" />
<Compile Include="DataAugmentation\Scene\SceneMappingRepository.cs" />
<Compile Include="DataAugmentation\Scene\UpdateSceneMappingCommand.cs" />
<Compile Include="DataAugmentation\Xem\Model\XemResult.cs" />
<Compile Include="DataAugmentation\Xem\Model\XemSceneTvdbMapping.cs" />
<Compile Include="DataAugmentation\Xem\Model\XemValues.cs" />
<Compile Include="DataAugmentation\Xem\UpdateXemMappingsCommand.cs" />
<Compile Include="DataAugmentation\Xem\XemProxy.cs" />
<Compile Include="DataAugmentation\Xem\XemService.cs" />
<Compile Include="Datastore\ConnectionStringFactory.cs" />
<Compile Include="Datastore\Converters\BooleanIntConverter.cs" />
<Compile Include="Datastore\Converters\QualityIntConverter.cs" />
@@ -273,6 +279,16 @@
<Compile Include="Messaging\Events\CommandCreatedEvent.cs" />
<Compile Include="Messaging\Events\CommandExecutedEvent.cs" />
<Compile Include="Messaging\IProcessMessage.cs" />
<Compile Include="Notifications\Xbmc\Model\ActivePlayer.cs" />
<Compile Include="Notifications\Xbmc\Model\ActivePlayersDharmaResult.cs" />
<Compile Include="Notifications\Xbmc\Model\ActivePlayersEdenResult.cs" />
<Compile Include="Notifications\Xbmc\Model\ErrorResult.cs" />
<Compile Include="Notifications\Xbmc\Model\TvShow.cs" />
<Compile Include="Notifications\Xbmc\Model\TvShowResponse.cs" />
<Compile Include="Notifications\Xbmc\Model\TvShowResult.cs" />
<Compile Include="Notifications\Xbmc\Model\VersionResult.cs" />
<Compile Include="Notifications\Xbmc\Model\XbmcJsonResult.cs" />
<Compile Include="Notifications\Xbmc\Model\XbmcVersion.cs" />
<Compile Include="ProgressMessaging\CommandUpdatedEvent.cs" />
<Compile Include="ProgressMessaging\ProgressMessageTarget.cs" />
<Compile Include="Instrumentation\SetLoggingLevel.cs" />
@@ -309,7 +325,6 @@
<Compile Include="Notifications\NotificationService.cs" />
<Compile Include="Notifications\NotificationRepository.cs" />
<Compile Include="Fluent.cs" />
<Compile Include="Helpers\SortHelper.cs" />
<Compile Include="History\HistoryRepository.cs" />
<Compile Include="IndexerSearch\Definitions\DailyEpisodeSearchCriteria.cs" />
<Compile Include="IndexerSearch\Definitions\SearchCriteriaBase.cs" />
@@ -334,7 +349,6 @@
<Compile Include="Indexers\Wombles\WomblesParser.cs" />
<Compile Include="Instrumentation\LogRepository.cs" />
<Compile Include="Jobs\ScheduledTask.cs" />
<Compile Include="Jobs\JobQueueItem.cs" />
<Compile Include="Jobs\JobRepository.cs" />
<Compile Include="Jobs\Scheduler.cs" />
<Compile Include="Lifecycle\ApplicationStartedEvent.cs" />
@@ -378,8 +392,7 @@
<Compile Include="Organizer\FileNameBuilder.cs" />
<Compile Include="Instrumentation\LogService.cs" />
<Compile Include="Instrumentation\DatabaseTarget.cs" />
<Compile Include="Model\AtomicParsleyTitleType.cs" />
<Compile Include="Model\MediaInfoModel.cs" />
<Compile Include="MediaFiles\MediaInfo\MediaInfoModel.cs" />
<Compile Include="Download\Clients\Nzbget\EnqueueResponse.cs" />
<Compile Include="Download\Clients\Nzbget\ErrorModel.cs" />
<Compile Include="Download\Clients\Nzbget\JsonError.cs" />
@@ -388,7 +401,6 @@
<Compile Include="Download\Clients\Nzbget\NzbGetQueueItem.cs" />
<Compile Include="Download\Clients\Nzbget\PriorityType.cs" />
<Compile Include="Download\Clients\Nzbget\VersionModel.cs" />
<Compile Include="Model\MisnamedEpisodeModel.cs" />
<Compile Include="Organizer\NamingConfig.cs" />
<Compile Include="Parser\Language.cs" />
<Compile Include="Parser\Model\LocalEpisode.cs" />
@@ -399,7 +411,6 @@
<Compile Include="Parser\Parser.cs" />
<Compile Include="Parser\ParsingService.cs" />
<Compile Include="Parser\QualityParser.cs" />
<Compile Include="Providers\UpdateXemMappingsCommand.cs" />
<Compile Include="Qualities\QualityProfileInUseException.cs" />
<Compile Include="Qualities\QualitySizeRepository.cs" />
<Compile Include="Qualities\QualityProfileRepository.cs" />
@@ -427,15 +438,6 @@
<Compile Include="Download\Clients\Sabnzbd\SabModel.cs" />
<Compile Include="Download\Clients\Sabnzbd\SabQueueItem.cs" />
<Compile Include="Download\Clients\Sabnzbd\SabVersionModel.cs" />
<Compile Include="Model\Xbmc\ActivePlayersDharmaResult.cs" />
<Compile Include="Model\Xbmc\ActivePlayersEdenResult.cs" />
<Compile Include="Model\Xbmc\TvShowResult.cs" />
<Compile Include="Model\Xbmc\ErrorResult.cs" />
<Compile Include="Model\Xbmc\XbmcJsonResult.cs" />
<Compile Include="Model\Xbmc\XbmcVersion.cs" />
<Compile Include="Model\Xem\XemResult.cs" />
<Compile Include="Model\Xem\XemSceneTvdbMapping.cs" />
<Compile Include="Model\Xem\XemValues.cs" />
<Compile Include="MediaCover\MediaCoverService.cs" />
<Compile Include="Download\Clients\Nzbget\NzbgetClient.cs" />
<Compile Include="Download\Clients\PneumaticClient.cs" />
@@ -443,11 +445,6 @@
<Compile Include="SeriesStats\SeriesStatistics.cs" />
<Compile Include="SeriesStats\SeriesStatisticsRepository.cs" />
<Compile Include="Tv\SeriesTypes.cs" />
<Compile Include="Model\Xbmc\TvShowResponse.cs" />
<Compile Include="Model\Xbmc\TvShow.cs" />
<Compile Include="Model\Xbmc\VersionResult.cs" />
<Compile Include="Providers\XemProxy.cs" />
<Compile Include="Providers\XemService.cs" />
<Compile Include="Qualities\Quality.cs" />
<Compile Include="Tv\Season.cs" />
<Compile Include="Configuration\ConfigService.cs">