OpenSubtitles.org downloader script

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Thumbs Up  OpenSubtitles.org downloader script
Post: #1
Quote:
hi,

i have been using xbmc for a long time now. recently been playing around with the linux version.

was really missing a subtitles downloader so i wrote something which interfaces with opensubtitles.org. based it on the xbmc lyrics script.

thanks,
leo

Quote: hi all,

sorry for jumping in late.

i'm not an experienced python developer, i just like messing around with things to make my life easier. one of the most painful parts of my media experience is subtitle downloading for movies and tv shows - hence i thought this script is highly needed.

i'm currently running on linux, so i guess some of the current problems with running the script are related to the switch from linux to xbox. regrettably my xbox has passed away so i can not check the script on it.

i'll describe a little how the script works and i hope someone will be able to fix the xbox related problems.

for the base of the script i used the lyrics script (i looked at undertexter but could not found much help in it) and implemented the osdb xmlrpc interface into it. the idea is the searches are being made through file hashes and not file names. this is a much stronger way of searching for subtitles as the returned subtitles will exactly much the video file you have.

when the script runs it logs into the osdb server (anonymously at first but please register at the site opensubtitles.org/newuser) if a video file is currently being played in the background it will hash it and search the osdb for its subtitles (in order to hash it i access the file so i'm not sure this would work over smb and certainly not sure re split rar files as they are not supported on linux). if no video is playing you can search to select a video file and search for subtitles for it. when you select the subtitle file you want to download it will be downloaded to the subtitle folder set in the settings (might need to change this one as i have some stupid mapping on my system) and then unzipped to it and (if set to true) to the folder where the video file itseld is located in.

thats about it. feel free to ask questions and i might be able to help. feel more than free to make anychanges you see fit to the script as this is a tool which should make our lifes easier (and please, some support from someone running xbox would be highly appreciated).

cheers for now,
leo

You can install it with the addons svn installer plugin:
http://xbmc-addons.googlecode.com/svn/pa...Plugin.zip

It's under scripts.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2008-02-26 23:05 by Nuka1195.)
find quote
Bram77 Offline
Skilled Python Coder
Posts: 1,372
Joined: Feb 2008
Reputation: 32
Location: Netherlands
Post: #2
The plugin won't run on my XBOX (latest T3CH build). I've put it in my "scripts' directory, is that where it should be?

[Image: widget]

Please add to my reputation if you find my posts usefull (+/- button below posts)
Ubuntu 12.10 minimal XBMC auto-install script :: XBMControl :: Xbmc XBOX Skins :: XBMControl for Android :: Owner of Sudo Systems
find quote
smuto Offline
Senior Member
Posts: 242
Joined: Sep 2004
Reputation: 2
Post: #3
installer plugin working OK here, but i can't install scripts - there is no problem with installing plugins, only scripts
just browse inside script folder instead promt to instaling

smuto

PS. haw can i add language file to OpenSubtitles.org downloader

[Image: 1.png]
find quote
Tuneld Offline
Junior Member
Posts: 24
Joined: Jul 2004
Reputation: 0
Location: Sweden
Post: #4
Same problem as smuto. But I overcame that d/l part with an webcrawler that got me every file in the OpenSubtitles folder on the site (path to it was given in the .py file).

But the OpenSubtitles scripts runs without success on my Xbox. The debug info says
Quote:ImportError: No module named audio.ogginfo

So, is this script for the Linux versions of XBMC and not for the xbox?

I'm using the TECH 2008-02-24 build
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Thumbs Up  Thanks!
Post: #5
Great script! ...one of the most requested scripts: http://forum.xbmc.org/showthread.php?tid=23115

I'm curious, did you also use the "Undertexter.se" script (great script) for ideas or?

...and does this script use the API is described on SubDownloader project webpage?
http://code.google.com/p/subdownloader/
Quote:Subdownloader is a Free Open Source tool written in PYTHON for automatic download/upload subtitles for videofiles (DIVX,MPEG,AVI,etc) and DVD's using fast hashing.

Bram77 Wrote:The plugin won't run on my XBOX (latest T3CH build). I've put it in my "scripts' directory, is that where it should be?
See http://forum.xbmc.org/showthread.php?tid=29911 for how to install that plugin.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Tuneld Offline
Junior Member
Posts: 24
Joined: Jul 2004
Reputation: 0
Location: Sweden
Post: #6
Update:

did those modules "optional" (using trySmile to get past the errors generated from the "__init__.py" file.
(strange though, since all the modules exists in the file/folder structure of the script.


..Ok so I guess i already messed up some of the script (but why ask about an ogg module when we want do use this script do download a subtitleConfused!

..The script pops up.. and some seconds later it says "Connected" (to the OpenSubtitles.org site). I have a Search button and a Settings button in each corner below. None of them responds if I try them.

Am I close to something or am I just wasting my time?
find quote
Tuneld Offline
Junior Member
Posts: 24
Joined: Jul 2004
Reputation: 0
Location: Sweden
Post: #7
Gamester17 Wrote:See http://forum.xbmc.org/showthread.php?tid=29911 for how to install that plugin.

I did that and then browsed myself to the Scripts folder (ofcource using the plugin) I now entered the "Opensubtitles folder and got this list:

Default.P (...not .py at the end)
Default.Tb (...not .tbn at the end)
Mmpython (a folder)
Resources (a folder)

..each of them asks about "would you like to install...?", and I have selected "Install on each one of them.

So when I now look in my Script folder I got the Mmpython and the Resources in the *root*, not in a subfolder called something like "Opensubtitle".

The other (misspelled) files I can't see at all. I guess they didn' get transfered since they have the wrong file ending.

@Gamester17:
Oh, and I am curious... does your undertexter script work?...mine stopped working several months ago. No one else have reported that it is broken but it is strange that I haven't got it back running on my 3 xboxes (not on those friends xboxes i've helped either).

/Tuneld
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,523
Joined: Sep 2003
Reputation: 10
Location: Sweden
Post: #8
Tuneld Wrote:Idoes your undertexter script work?...mine stopped working several months ago.
Works for me, please keep that discussion to http://forum.xbmc.org/showthread.php?tid=23309

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #9
This is a script, not a plugin. I actally never tested it. It loads for me but the search does not work, nor do settings. I'll email the writer.

My Appologize for the installer, i had scripts incorrect and they wouldn't install, here is an updated version.

http://xbmc-addons.googlecode.com/svn/pa...Plugin.zip

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
(This post was last modified: 2008-02-26 15:23 by Nuka1195.)
find quote
Tuneld Offline
Junior Member
Posts: 24
Joined: Jul 2004
Reputation: 0
Location: Sweden
Post: #10
Nuka1195 Wrote:This is a script, not a plugin. I actally never tested it, i'll check it out.

Don't know if you are refering anyone of my earlier posts. If you are:
I'm just explaining that I really am using the plugin (yours) to download the script. So there will be no misstake about how I (we) are trying to retrive the script.

PS. got rid of that "error module missing" after I manually overwritten my files (downloaded with the webcrawler) with the ones that landed right in the root folder (Scripts).

Still just a popup with the Search & Settings buttons, doing nothing...
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #11
Nuka1195 Wrote:...
My Appologize for the installer, i had scripts incorrect and they wouldn't install, here is an updated version.

http://xbmc-addons.googlecode.com/svn/pa...Plugin.zip

.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Tuneld Offline
Junior Member
Posts: 24
Joined: Jul 2004
Reputation: 0
Location: Sweden
Post: #12
Nuka1195 Wrote:My Appologize for the installer, i had scripts incorrect and they wouldn't install, here is an updated version.

About your plugin:
That update did nothing new for me (ofcource I deleted every old file/folder first)

Still got an list of all files/folders when selecting "Opensubtitles". And still the folders gets into the root of the script folder. And where the Default.py & Default.tbn goes I really can't tell (still misspelled (missing last character of the file ending in the list) though).

Installing one of the "Default" files just gives me a : "Your new item was installed to:"


And now about the actual script:

You say that not even you have tried out the script before posting the news about it on the forum.
Atleast some beta candidate have been involved right?

You guys do a great work, but I'm sort of confused about this script that is 100% not working right now.
find quote
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #13
About the plugin: You obviously are doing something wrong, read the stickies as i just downloaded the zip and it works fine.

About the script, i didn't write it and as i said i emailed the writer, learn some patience.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find quote
Tuneld Offline
Junior Member
Posts: 24
Joined: Jul 2004
Reputation: 0
Location: Sweden
Post: #14
Nuka1195 Wrote:About the plugin: You obviously are doing something wrong, read the stickies as i just downloaded the zip and it works fine.
Flushed the cache of FireFox and did the d/l again. Seams like I got the new version now. And it works as it is supposed to now.

Nuka1195 Wrote:About the script, i didn't write it and as i said i emailed the writer, learn some patience.
Patience? I'm giving you fast and important feedback about both plugin and the script that you have started in this thread. Please don't get offended about that.

Alot of ppl will be throwing themself over this thread since it is something many ppl have waited for. I think you agree that it good that we atleast have sorted the plugin thingy out. And also contacted the script coder.

If all of us had patience to wait and see if some one else fixes the problem, then nothing would be done. I can't tribute much, but I have done my part: reporting and making a voice heard.
find quote
Tuneld Offline
Junior Member
Posts: 24
Joined: Jul 2004
Reputation: 0
Location: Sweden
Post: #15
Update about the script:

Seams like the coder have chosen to not use the standard buttons to do things. Instead of the A-button to "push the button" it is now instead Y-button.

Strange not leaving any instructions to Nuka1195 about it since not even him could the answer about that.

To bad the Search function is based on hashing on extracted files. All my movies are stored in splitted rar's (you know what I'm talking about) and it seams like I can't use this script because of that.

I would really thougth that it included a "search by foldername".. or a manuell search function atleast. But yes, I know all of these things comes.. in patiance...
find quote
Post Reply