Git Product home page Git Product logo

tvshow-info's Introduction

TVshow-info

A .NET class library for getting information about a TV show episode.

Uses a MEF-based providers to get episode information. The library ships with providers for Rovi and TheTVDB. Want to provide information using a different online source? You can create your own pluggable provider!

Build status

Quick Start

Install the NuGet package from the package manager console:

Install-Package TV-show-info

Make sure the provider plugin .dlls are in the same directory as your executing assembly. TVShow-info ships with 2 providers: Rovi and TheTVDB. REMOVE ANY PROVIDER .DLLS YOU DON'T WANT TO USE -- otherwise they will get loaded automatically using MEF.

Set the appropriate configuration values for your providers (like API keys) in the app.config or web.config.

  • For TheTVDB:
<appSettings>
    <!-- You can leave this blank if all data provider .dlls reside in your application directory -->
    <add key="PluginDirectory" value=""/>

    <!-- TheTVDB API information -->
    <add key="TheTVDB_APIKey" value="YOUR_API_KEY"/>
</appSettings>
  • For Rovi
<appSettings>
    <!-- You can leave this blank if all data provider .dlls reside in your application directory -->
    <add key="PluginDirectory" value=""/>
      
    <!-- Rovi API information -->
    <add key="Rovi_APIKey" value="YOUR_API_KEY"/>
    <add key="Rovi_APISecret" value="YOUR_API_SECRET"/>
</appSettings>

Examples

ShowInformationManager showMgr = new ShowInformationManager();
string filename = "Once.Upon.a.Time.S03E01.720p.HDTV.X264-DIMENSION.mkv";

TVEpisodeInfo episode = showMgr.GetEpisodeInfoForFilename(filename);

//  Assert
Assert.AreEqual<int>(3, episode.SeasonNumber);
Assert.AreEqual<int>(1, episode.EpisodeNumber);
Assert.AreEqual<string>("Once Upon a Time (2011)", episode.ShowName); /* Changes when using an alias */
Assert.AreEqual<string>("The Heart of the Truest Believer", episode.EpisodeTitle);

tvshow-info's People

Contributors

danesparza avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

tvshow-info's Issues

Lack of useful examples makes library unusable.

In the only provided example, step 3 states:
"Set the appropriate configuration values for your providers (like API keys) in the app.config or web.config."

And no further information is provided on what the keys are named or where they go.

I attempted to look in the tests folder and found a decent example of where the keys by examing the app.config file.

I placed my TV DB API key in the app.config file under configuration/appSettings named "TheTVDB_APIKey" -- when I try to execute the provided sample code the following exception is thrown "Unhandled Exception: System.ApplicationException: Missing Rovi API key or secret. Please include the Rovi_APIKey and Rovi_APISecret in the application config" when I call "showMgr.GetEpisodeInfoForFilename(filename)"

I'm not using ROVI though, and I don't see any information on how to tell the API to use the TV DB instead of ROVI. Is it using ROVI by default?

... so, I signed up for a ROVI account, I signed up for all three APIs -- however -- the TV listings API does not use a key/secret mechanism like the other two -- it only uses keys (there is no secret listed, only a key).

I tried to supply the key in the app.config file as well -- under configuration/appSettings named "Rovi_APIKey" with my key set. It doesn't work, it throws the same exception at the same spot.

I really don't know what else to do, without further information, this library is unusable.

Error triggering showMgr.GetEpisodeInfo(strShow, intSeason, intEpisode)

When I call the above using the following code, I get the (following) error message
Method not found: 'System.String ServiceStack.Text.WebRequestExtensions.GetJsonFromUrl(System.String, System.Action1<System.Net.HttpWebRequest>, System.Action1<System.Net.HttpWebResponse>)'.'

Triggered using
ShowInformationManager showMgr = new ShowInformationManager();
TVEpisodeInfo episode = showMgr.GetEpisodeInfo(strShow, intSeason, intEpisode);

where strShow="Power" (as an example), intSeason=5, intEpisode=6

I get the same error following your example (Once upon a time)

Please advise what I'm missing?
using System;
using System.IO;
using System.Configuration;
using System.Net;
using ShowInfo;
using ShowInfoProvider;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.