Generic subtitles retriever library (movpic, tvseries etc.) (1 Viewer)

gibman

Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    Hi!

    Been working with seco's nice subtitlesdownloader library (thank you seco).

    My primary goal was to have moving pictures as well as tvseries or any other video related plugin use a more generic and specialized approach to handling downloading of subtitles as well as GUI representation of these.

    I have called this library: subtitlesretriever.

    The benefits are:

    * although configuration is handled seperately in each plugin, the configuration layout is still the same, making the user feel right at home.

    * the coding effort in each plugin is greatly minimized, since as much stuff as possible have been coded in the subtitlesretriever plugin.

    * language resources are handled in one place: C:\ProgramData\Team MediaPortal\MediaPortal\language\SubtitlesRetriever
    obviously each plugin does not have to bother about language stuff. This is done with my subtitlesretriever library.

    * Presentation of the results from subtitles query will look the same in tvseries and movpics or any other plugin utilizing my subtitlesretriever library. again, the user should feel at home. not confusing the user with different implementations of the same thing.

    * Supports progressbar. It makes the user aware of what the subtitlesretriever plugin is currently doing and how long it will take it. Also it is possible to abort the process at anytime (it's running in its own thread.). In this event, the user will see the currently retrieved results, if any exist.

    * It queries all enabled subtitles providers in one go. The user does not have to bother with selecting which providers to choose from. Although as said above, the user is able to abort the process at any time.

    The subtitlesretriever is located at:
    https://mediaportal.svn.sourceforge.net/svnroot/mp-plugins/trunk/plugins/SubtitlesRetriever/

    I've attached the sources for movpics and tvseries.

    I've photoshoped the two results screenshots (removing the original filenames). The results screen will display the filename, making it easier for the user to select the correct subtitle.

    make sure that you put the lang resource files:
    mp-plugins\SubtitlesRetriever\bin\Release\language\SubtitlesRetriever

    to

    C:\ProgramData\Team MediaPortal\MediaPortal\language\SubtitlesRetriever

    currently danish and english are the only langs defined.

    Also make sure you copy subtitlesretriever.dll to root install. dir of MP.

    history:

    moving pictures:
    0.1 initial release
    0.1 (maintrunk svn1127)

    tvseries:
    0.1 initial release
    0.2 fixed playback problem.

    /gibman
     

    Attachments

    • subsConfig.jpg
      subsConfig.jpg
      102 KB
    • subsQerying.jpg
      subsQerying.jpg
      154.2 KB
    • subsResults.jpg
      subsResults.jpg
      136.1 KB
    • subsDownloaded.jpg
      subsDownloaded.jpg
      156.8 KB
    • movpics_subsConfig.jpg
      movpics_subsConfig.jpg
      82.4 KB
    • movpics_subsQuerying.jpg
      movpics_subsQuerying.jpg
      178.8 KB
    • movpics_subsResult.jpg
      movpics_subsResult.jpg
      119.8 KB
    • movpics_subsDownloaded.jpg
      movpics_subsDownloaded.jpg
      179.8 KB
    • movpic_subsretriever_0.1_svn1015.patch
      30.7 KB
    • tvseries_subsretriever_0.2_svn868.patch
      30.7 KB
    • movpic_subsretriever_0.1_svn1127.patch
      118.5 KB
    • movpics_subs_1.0_svn1127.rar
      1.5 MB

    1stdead

    Portal Pro
    February 1, 2008
    1,089
    139
    Copenhagen
    Home Country
    Denmark Denmark
    Hi.
    Could you please explaing how you apply patches? (sorry, i can just compile. Nothing else :p)


    Edit: I just think it's using "apply patch" in Tortoise...
     

    Zinu

    Portal Pro
    February 28, 2008
    650
    23
    Home Country
    Netherlands Netherlands
    Let's hope this gets picked up by the developers of those two plugins asap ;)
     

    rasmuskarlsen

    Portal Pro
    October 9, 2008
    235
    12
    Home Country
    Denmark Denmark
    Hi.
    Could you please explaing how you apply patches? (sorry, i can just compile. Nothing else :p)


    Edit: I just think it's using "apply patch" in Tortoise...

    I have also tried that, but i'm getting an error: ”The patch seems outdated!” and i have the latest SVN of Moving Pictures..
     

    1stdead

    Portal Pro
    February 1, 2008
    1,089
    139
    Copenhagen
    Home Country
    Denmark Denmark
    Hi.
    Could you please explaing how you apply patches? (sorry, i can just compile. Nothing else :p)


    Edit: I just think it's using "apply patch" in Tortoise...

    I have also tried that, but i'm getting an error: ”The patch seems outdated!” and i have the latest SVN of Moving Pictures..

    I think he compiled against trunk version. But that's outdated as there are multiple fixes in 1.0 branch.

    ah nvm didn't work either:
    The patch seems outdated!” The file line i>>?using system and the patchline using system does not match
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    make sure you have rev. 1015 of mov pics sources.
    then apply patch.

    then if u wish, u can update mov pics sources to latest and hope u do not have to merge stuff :)

    same procedure for tvseries, but instead rev. 868

    remember u can always fetch a specific rev. of sources using svn.

    and yes I did compile against trunk: http://moving-pictures.googlecode.com/svn/trunk

    /gibman
     

    1stdead

    Portal Pro
    February 1, 2008
    1,089
    139
    Copenhagen
    Home Country
    Denmark Denmark
    Instructions:

    - Note: Follow the instructions on MPtv-series wiki and movingpictures wiki. This is just addon's to those.
    Get newest subtitledownloader.dll here: https://forum.team-mediaportal.com/my-tvseries-162/subtitledownloader-project-71651/#post519271

    To compile SubtitleDownloader.dll and SubtitlesRetriever.dll:
    Setup:
    \PluginDev\Moving Pictures
    \PluginDev\mp-plugins\SubtitlesRetriever
    \PluginDev\MP-TVSeries
    \PluginDev\Mediaportal\

    If you get References error and your setup is like mentioned above do this: Open SubtitlesRetriever.csproj in notepad or similar and change <HintPath>..\..\Mediaportal\mediaportal\Utils\bin\Release\Utils.dll</HintPath> (note: extra Mediaportal\)
    to the appropriated location. You have to change 3 locations.
    Open SubtitlesRetriever profect file.
    Compile against Mediaportal 1.1 beta.

    Copy SubtitlesRetriever.dll // SubtitleDownloader.dll
    \PluginDev\Moving Pictures\External
    \PluginDev\MP-TVSeries\External


    To compile Moving Pictures:
    - Be sure to have trunk 1015 and SubtitlesRetriever.dll in \PluginDev\Moving Pictures\External.
    Compile against mediaportal 1.0.2

    To compile MPTVseries:
    - Be sure to have trunk 886 and SubtitlesRetriever.dll in \PluginDev\MP-TVSeries\External
    Add your own API-key for thetvdb in Visual studio:
    Find it here:
    In Online Parsing Classes folder there's a APIKey.resx when you click it it should open an editor for that file. Value field is empty, that's where the key value goes

    Compile against mediaportal 1.1 beta
    Change build event to suite your environment (see mptvseries wiki)

    Remember to change postbuild settings.

    Final:

    And Languages to something like, Windows 7, ProgramData\Team MediaPortal\MediaPortal\language\SubtitlesRetriever
    Copy ICSharpCode.SharpZipLib.dll, MP-TVSeries.dl, MovingPictures.dlll to \Program Files\Team MediaPortal\MediaPortal\plugins\Windows
    Copy SubtitleDownloader.dll, SubtitleRetriever.dll, 7z.dll to \Program Files\Team MediaPortal\MediaPortal


    FAQ:
    • If get error like for missing references after they're added remove the references from plugin and readd them.
    • If you get warning just ignore them, only look for compiled successful.
    • No updates downloaded for MPTVSeries: 00000005 - 9-1-2010 15:05:11 - No APIKey...if you compile yourself you need to register an APIKey at theTVDB.com and add it to the resourceFile, nothing will be downloaded! . You forgot to add API Key. Read instructions again.



    If something is unclear just write here :) thx
    Edit:
    update mptvseries for API KEY
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    Home Country
    Denmark Denmark
    Somehow the patch file for movpics got messed up.
    It should work now.

    Plz re-download.

    /gibman
     

    Zinu

    Portal Pro
    February 28, 2008
    650
    23
    Home Country
    Netherlands Netherlands
    currently danish and english are the only langs defined.

    But adding other scrapers is possible? Like bierdopje.nl :p It's there in seco's downloader, just not fully working. There was a bug that was supposedly easy to fix.

    And have you contacted ltfearme and fforde with this?
     

    Users who are viewing this thread

    Top Bottom