rvs76 / tvdblib

Automatically exported from code.google.com/p/tvdblib
0 stars 0 forks source link

Absolute order and DownloadEpisode #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using absolute order to download episodes (using DownloadEpisode),
there seems to be some issues.

1. In TvdbDownloader.cs, string "absolut" is used, while it should be
"absolute".
2. In TvdbLinkCreator.cs, in method CreateEpisodeLink, that "absolute" is
not used correctly to create URL.

Method should be somethinig like this:

internal static string CreateEpisodeLink(string _apiKey, int _seriesId, int
_seasonNr,
                                             int _episodeNr, string _order,
TvdbLanguage _lang)
    {
        String link = "";

        if (_order.Equals("absolute"))
        {
            link = String.Format("{0}/api/{1}/series/{2}/{3}/{4}/{5}.xml",
BASE_SERVER, _apiKey,
                                    _seriesId, _order, _episodeNr, (_lang
!= null ? _lang.Abbriviation : "en"));        
        }
        else
        {
            link =
String.Format("{0}/api/{1}/series/{2}/{3}/{4}/{5}/{6}.xml", BASE_SERVER,
_apiKey,
                                        _seriesId, _order, _seasonNr,
_episodeNr, (_lang != null ? _lang.Abbriviation : "en"));
        }

      return link;
    }

Original issue reported on code.google.com by jussi.p...@gmail.com on 28 Aug 2009 at 8:35

GoogleCodeExporter commented 9 years ago
sorry it took so long, it is now fixed...

thx for the bug report

Original comment by bgmei...@gmail.com on 24 Sep 2009 at 7:45