forked from MediaBrowser/Emby.Plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request MediaBrowser#121 from softworkz/TvMaze
TV Maze Provider - Initial check in
- Loading branch information
Showing
27 changed files
with
2,145 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
using MediaBrowser.Controller.Entities.TV; | ||
using MediaBrowser.Controller.Providers; | ||
using MediaBrowser.Providers.TV.TvMaze; | ||
|
||
namespace MediaBrowser.Plugins.TvMazeProvider | ||
{ | ||
public class TvMazeExternalId : IExternalId | ||
{ | ||
public string Name | ||
{ | ||
get { return "TV Maze Series"; } | ||
} | ||
|
||
public string Key | ||
{ | ||
get { return MetadataProviders.TvMaze.ToString(); } | ||
} | ||
|
||
public string UrlFormatString | ||
{ | ||
get { return "http://www.tvmaze.com/shows/{0}"; } | ||
} | ||
|
||
public bool Supports(Model.Entities.IHasProviderIds item) | ||
{ | ||
return item is Series; | ||
} | ||
} | ||
|
||
public class TvMazeEpisodeExternalId : IExternalId | ||
{ | ||
public string Name | ||
{ | ||
get { return "TV Maze Episode"; } | ||
} | ||
|
||
public string Key | ||
{ | ||
get { return MetadataProviders.TvMaze.ToString(); } | ||
} | ||
|
||
public string UrlFormatString | ||
{ | ||
get { return "http://www.tvmaze.com/episodes/{0}"; } | ||
} | ||
|
||
public bool Supports(Model.Entities.IHasProviderIds item) | ||
{ | ||
return item is Episode; | ||
} | ||
} | ||
|
||
public class TvMazeSeasonExternalId : IExternalId | ||
{ | ||
public string Name | ||
{ | ||
get { return "TV Maze Season"; } | ||
} | ||
|
||
public string Key | ||
{ | ||
get { return MetadataProviders.TvMaze.ToString(); } | ||
} | ||
|
||
public string UrlFormatString | ||
{ | ||
get { return "http://www.tvmaze.com/seasons/{0}/season"; } | ||
} | ||
|
||
public bool Supports(Model.Entities.IHasProviderIds item) | ||
{ | ||
return item is Season; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MediaBrowser.Providers.TV.TvMaze | ||
{ | ||
public enum MetadataProviders | ||
{ | ||
TvMaze, | ||
Tvdb, | ||
TvRage, | ||
Imdb | ||
} | ||
} |
112 changes: 112 additions & 0 deletions
112
MediaBrowser.Plugins.TvMazeProvider/MediaBrowser.Plugins.TvMazeProvider.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{5BAAE6C6-4C7C-4B6F-A475-07AF0FEF8620}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>MediaBrowser.Plugins.TvMazeProvider</RootNamespace> | ||
<AssemblyName>MediaBrowser.Plugins.TvMazeProvider</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> | ||
<RestorePackages>true</RestorePackages> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="CommonIO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\CommonIO.1.0.0.9\lib\net45\CommonIO.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="Interfaces.IO"> | ||
<HintPath>..\packages\Interfaces.IO.1.0.0.5\lib\portable-net45+sl4+wp71+win8+wpa81\Interfaces.IO.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="MediaBrowser.Common, Version=3.1.6052.21679, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MediaBrowser.Common.3.0.654\lib\net45\MediaBrowser.Common.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="MediaBrowser.Controller, Version=3.1.6052.21678, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MediaBrowser.Server.Core.3.0.654\lib\net45\MediaBrowser.Controller.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="MediaBrowser.Model, Version=3.1.6052.21679, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\MediaBrowser.Common.3.0.654\lib\net45\MediaBrowser.Model.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="Patterns.Logging, Version=1.0.5494.41209, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Web" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="..\SharedVersion.cs"> | ||
<Link>Properties\SharedVersion.cs</Link> | ||
</Compile> | ||
<Compile Include="Globals.cs" /> | ||
<Compile Include="TvMazePlugin.cs" /> | ||
<Compile Include="ExternalId.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="TvMaze\Models\MazeCastCredit.cs" /> | ||
<Compile Include="TvMaze\Models\MazeCastMember.cs" /> | ||
<Compile Include="TvMaze\Models\MazeChannel.cs" /> | ||
<Compile Include="TvMaze\Models\MazeCountry.cs" /> | ||
<Compile Include="TvMaze\Models\MazeCrewCredit.cs" /> | ||
<Compile Include="TvMaze\Models\MazeEpisode.cs" /> | ||
<Compile Include="TvMaze\Models\MazeExternals.cs" /> | ||
<Compile Include="TvMaze\Models\MazeHuman.cs" /> | ||
<Compile Include="TvMaze\Models\MazeImage.cs" /> | ||
<Compile Include="TvMaze\Models\MazeLink.cs" /> | ||
<Compile Include="TvMaze\Models\MazeLinks.cs" /> | ||
<Compile Include="TvMaze\Models\MazeRating.cs" /> | ||
<Compile Include="TvMaze\Models\MazeSearchContainer.cs" /> | ||
<Compile Include="TvMaze\Models\MazeSeason.cs" /> | ||
<Compile Include="TvMaze\Models\MazeSeries.cs" /> | ||
<Compile Include="TvMaze\TvMazeAdapter.cs" /> | ||
<Compile Include="TvMaze\TvMazeEpisodeProvider.cs" /> | ||
<Compile Include="TvMaze\TvMazeSeasonImageProvider.cs" /> | ||
<Compile Include="TvMaze\TvMazeSeasonProvider.cs" /> | ||
<Compile Include="TvMaze\TvMazeSeriesProvider.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\..\MediaBrowser\ProgramData-Server\Plugins\" /y</PostBuildEvent> | ||
</PropertyGroup> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
23 changes: 23 additions & 0 deletions
23
MediaBrowser.Plugins.TvMazeProvider/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("MediaBrowser.Plugins.TvMazeProvider")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("softworkz")] | ||
[assembly: AssemblyProduct("TV Maze Metadata Provider")] | ||
[assembly: AssemblyCopyright("Copyright © Emby 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("6C39CA29-6EC8-4E72-A471-9D23136ADAF3")] |
27 changes: 27 additions & 0 deletions
27
MediaBrowser.Plugins.TvMazeProvider/TvMaze/Models/MazeCastCredit.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
namespace MediaBrowser.Providers.TV.TvMaze.Models | ||
{ | ||
/// <summary> | ||
/// Another show the Actor has been in. | ||
/// </summary> | ||
public class MazeCastCredit | ||
{ | ||
/// <summary> | ||
/// Accessible links for relevant Cast information. | ||
/// </summary> | ||
public CastLink _links { get; set; } | ||
/// <summary> | ||
/// Accessible links for relevant Cast information. | ||
/// </summary> | ||
public class CastLink | ||
{ | ||
/// <summary> | ||
/// Link to the Character Page that this actor plays in a particular show. | ||
/// </summary> | ||
public MazeLink character { get; set; } | ||
/// <summary> | ||
/// Link to the show that this actor stars in. | ||
/// </summary> | ||
public MazeLink show { get; set; } | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
MediaBrowser.Plugins.TvMazeProvider/TvMaze/Models/MazeCastMember.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
namespace MediaBrowser.Providers.TV.TvMaze.Models | ||
{ | ||
/// <summary> | ||
/// Information about a particular Actor. | ||
/// </summary> | ||
public class MazeCastMember | ||
{ | ||
/// <summary> | ||
/// Actor's information. | ||
/// </summary> | ||
public MazeHuman person { get; set; } | ||
/// <summary> | ||
/// Actors' Character information. | ||
/// </summary> | ||
public MazeHuman character { get; set; } | ||
/// <summary> | ||
/// Collection of all Shows the Actor has played a part in. | ||
/// </summary> | ||
public IReadOnlyCollection<MazeCastCredit> castCredit { get; set; } | ||
/// <summary> | ||
/// Collection of all shows the Actor has done some behind the scenes work in. | ||
/// </summary> | ||
public IReadOnlyCollection<MazeCrewCredit> crewCredit { get; set; } | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
MediaBrowser.Plugins.TvMazeProvider/TvMaze/Models/MazeChannel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace MediaBrowser.Providers.TV.TvMaze.Models | ||
{ | ||
/// <summary> | ||
/// Information about a particular Network or WebChannel. | ||
/// </summary> | ||
public class MazeChannel | ||
{ | ||
/// <summary> | ||
/// Channel ID (Network or WebChannel, check Required for Ambiguity.) | ||
/// </summary> | ||
public int id { get; set; } | ||
/// <summary> | ||
/// Name of the Channel. | ||
/// </summary> | ||
public string name { get; set; } | ||
/// <summary> | ||
/// Country the Network originates from. | ||
/// </summary> | ||
public MazeCountry country { get; set; } | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
MediaBrowser.Plugins.TvMazeProvider/TvMaze/Models/MazeCountry.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace MediaBrowser.Providers.TV.TvMaze.Models | ||
{ | ||
/// <summary> | ||
/// Information about a particular Country and Timezone information. | ||
/// </summary> | ||
public class MazeCountry | ||
{ | ||
/// <summary> | ||
/// Full Name of Country. | ||
/// </summary> | ||
public string name { get; set; } | ||
/// <summary> | ||
/// ISO 2 Letter Country Code. | ||
/// </summary> | ||
public string code { get; set; } | ||
/// <summary> | ||
/// Timezone this particular show is on. | ||
/// </summary> | ||
public string timezone { get; set; } | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
MediaBrowser.Plugins.TvMazeProvider/TvMaze/Models/MazeCrewCredit.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace MediaBrowser.Providers.TV.TvMaze.Models | ||
{ | ||
/// <summary> | ||
/// Another role the Actor has been in. | ||
/// </summary> | ||
public class MazeCrewCredit | ||
{ | ||
/// <summary> | ||
/// Type of Role. | ||
/// </summary> | ||
public string type { get; set; } | ||
/// <summary> | ||
/// Accessible links for relevant Cast information. | ||
/// </summary> | ||
public CrewLinks _links { get; set; } | ||
|
||
/// <summary> | ||
/// Accessible links for relevant Cast information. | ||
/// </summary> | ||
public class CrewLinks | ||
{ | ||
/// <summary> | ||
/// Link to the show in which this role was performed. | ||
/// </summary> | ||
public MazeLink show { get; set; } | ||
} | ||
} | ||
} |
Oops, something went wrong.