subtitledownloader (1 Viewer)

te3hpurp

Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Hi again.

    @doskabouter , is new watchseries compiled again without subtitles compile option ?
    I mean this is the first time I use watchseries after you updated dll 7.10.2016


    Br,
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,973
    Nuenen
    Home Country
    Netherlands Netherlands
    hm, assuming you're meaning 7 oct and not 10 july it should be with subtitles.
    sure that the subtitledownloader dll is present?
    And: no logs, so I don't know what exactly is wrong here
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Sorry,

    I was not providing logs. Anyway, here are logs. They just show that 0 subtitles found.
    Hmm. I just checked from opensubtitles, that there is actually subtitles for that episode in opensubtitles.

    Br,
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,973
    Nuenen
    Home Country
    Netherlands Netherlands
    The subtitle classes are created as usual, so there's nothing wrong with it.
    Also seeing "subtitles found: 0" that means that subtitles are working, but no results were returned from the subtitledownloader.
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Hi.


    Yes I saw that it wont find any subtitles. I had to builld my own onlinevideos in order to make it work, because

    EpisodeSearchQuery qu = new EpisodeSearchQuery(it.Title, (int)it.Season, (int)it.Episode, null);
    qu.LanguageCodes = languagePrios.Keys.ToArray();
    results = sd.SearchSubtitles(qu);

    won't find any results. I quess subtitledownloader.dll source is not available anywhere. I mean EpisodeSearchQuery and SearchQuery
    are interfaces to query classes for subtitledownloader, or am I wrong here.

    Instead I use

    SearchQuery qu = new SearchQuery(it.Title);
    qu.LanguageCodes = languagePrios.Keys.ToArray();
    results = sd.SearchSubtitles(qu);

    It will find any subtile for series.
    Later when looping results I use regex to to match season and episode.

    Br,
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Hi.

    @doskabouter

    When discussing with seco in thread you mentioned in your previous post in this thread, and when I did some re-testing, it looked that in somewhere in onlinevideos year is applied to series name in episodesearch query, when querying subtitles, so in:

    EpisodeSearchQuery qu = new EpisodeSearchQuery(it.Title, (int)it.Season, (int)it.Episode, null);
    qu.LanguageCodes = languagePrios.Keys.ToArray();
    results = sd.SearchSubtitles(qu);

    it.Title is like "The Big Bang Theory (2007)", which wont work, but
    when using "the big bang theory", it works.

    Br,
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,583
    2,973
    Nuenen
    Home Country
    Netherlands Netherlands
    Took me a while to find out that you only get a year appended if you search for big bang instead of navigating directly to it.
    And it's weird that when the year is stripped, one of the urls from podnapisi includes the year (f.e. https://www.podnapisi.net/subtitles/nl-the-big-bang-theory-2007-S10E01/UKBB), so it should match the title with the year included.

    Anyway, published a version where I stripped "(dddd)" from the title
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Aah, sorry, that I did not mention that I used search. Should have done that. Silly me!.

    Thanks very much.
    Br,
     

    te3hpurp

    Retired Team Member
  • Premium Supporter
  • September 23, 2008
    910
    231
    Rovaniemi
    Home Country
    Finland Finland
    Hi again

    @doskabouter

    Sorry to be here again with watchseries problems :-(

    Anyway. now site itself has some naming problems with episodes,
    so in same big bang theory in season 10, there are episodes named like this:
    "Episode 5Season10 Episode 5", which is then used, when trackinfo.Title
    is generated, which is then used to fetch subtitle.

    With debug, I mage my own fix, but as I'm not familiar with regex, it is quite rude.

    Code:
        // 2nd way - using parent category name, category name and video title
                                //Aaron Stone Season 1 (19 episodes) 1. Episode 21 1 Hero Rising (1)
                                string parseString = string.Format("{0} {1} {2}", Regex.Replace(category.ParentCategory.Name, @"\(\d{4}\)", ""), category.Name, video.Title);
                                tInfo.Regex = Regex.Match(parseString, @"(?<Title>.+)\s+Season\s*?(?<Season>\d+).*?Episode\s*?(?<Episode>\d+)", RegexOptions.IgnoreCase);
                             
                                if (video.Title.ToLower().Contains("season"))
                                {
                                 
                                    string parseString = string.Format("{0} {1} {2}", Regex.Replace(category.ParentCategory.Name, @"\(\d{4}\)", ""), category.Name, video.Title);
                                    tInfo.Regex = Regex.Match(parseString, @"(?<Title>.+)\s+Season\s*?(?<Season>\d+).*?Episode\s*?(?<Episode>\d+)", RegexOptions.IgnoreCase);
                                    tInfo.Title = Regex.Replace(category.ParentCategory.Name, @"\(\d{4}\)", "");
    
                                }
                                else
                                {
                                    string parseString = string.Format("{0} {1} {2}", Regex.Replace(category.ParentCategory.Name, @"\(\d{4}\)", ""), category.Name, video.Title);
                                    tInfo.Regex = Regex.Match(parseString, @"(?<Title>.+)\s+Season\s*?(?<Season>\d+).*?Episode\s*?(?<Episode>\d+)", RegexOptions.IgnoreCase);
                                }

    Official fix would probably be better, and for usablility I must now skip update on onlinevideos start. This naming system might also appear on another series too.


    Br,
     

    Users who are viewing this thread

    Top Bottom