[RELEASE] OpenSubtitles OSD (Script)

  Thread Rating:
  • 5 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Closed
amet Offline
I wave my private parts at your aunties!
Posts: 3,480
Joined: Jul 2009
Reputation: 18
Location: Novi Sad / Dubai
Post: #41
Bram77 Wrote:The script is not working on the XBOX (probably mentioned before) the path to the script is incorrect. It's looking for default.py in "special://home/scripts/OpenSubtitles_OSD" which should be .... "special://scripts/OpenSubtitles_OSD" if I'm correct...

Its working on my side. I think there has been at least one person confirming it working on XBOX.

all the documentation I found points that special://home/scripts/ is correct


If you do the skin hack and then install it from XBMC repo installer it should work.

Quote:Would you consider integrating the SubLight database to? -> http://www.sublight.si/
The developer has asked for integration on the forums and his app and database are great! Rapidly growing, fast and stable and he is willing to help (documentation about the api is available on his website).

This is a next step. It shouldn't be so difficult, but I want to sort out all the bugs for this one first before taking it to a next level.

I am glad you find it useful, I thought I was the only one missing this feature Smile

Zeljko
(This post was last modified: 2009-08-12 00:32 by amet.)
find
blittan Offline
Team-XBMC Handyman
Posts: 1,714
Joined: Jun 2004
Reputation: 11
Location: Sweden
Post: #42
special://xbmc/scripts are more accurate

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.
If you don't have the time to read them, please don't take the time to post in this forum!
For troubleshooting and bug reporting please make sure you read this first.
find
Meez Offline
Member
Posts: 71
Joined: Feb 2009
Reputation: 0
Post: #43
it does work on xbox, i can now confirm. i use it with the PMIII skin. i was able to download a subtitle, finally, but it was for a different movie than the one i tested before. must be a problem with subtitles/zip files of the first movie i tried.

one request for a feature is to auto-extract the zip and rename the .srt/.sub to match the filename of the movie. when i downloaded the subtitle, it was in a zip and i had to browse into the zip to load the .srt.
find
johoja Offline
Fan
Posts: 569
Joined: Aug 2009
Reputation: 0
Post: #44
The renaming would be an awesome addition.
(This post was last modified: 2009-08-12 07:45 by johoja.)
find
amet Offline
I wave my private parts at your aunties!
Posts: 3,480
Joined: Jul 2009
Reputation: 18
Location: Novi Sad / Dubai
Post: #45
Meez Wrote:it does work on xbox, i can now confirm. i use it with the PMIII skin. i was able to download a subtitle, finally, but it was for a different movie than the one i tested before. must be a problem with subtitles/zip files of the first movie i tried.

one request for a feature is to auto-extract the zip and rename the .srt/.sub to match the filename of the movie. when i downloaded the subtitle, it was in a zip and i had to browse into the zip to load the .srt.

It does auto-extract and rename to the name of the movie + language name at the end

ie: Seven Pounds.avi
Seven Pounds.en.srt

If Seven Pounds.en.srt exists in a folder it will rename it to Seven Pounds.en1.srt

Nixa sugested a mod to allow sub downloads for streaming video,

Quote:For those who is interested, here is what you need to do. There are only 2 files you need to modify.

(1) default.py - you need to replace the "xbmc.Player().getPlayingFile()" with xbmc.getInfoLabel("listitem.filename")
(2) gui.py - you need to replace the "xbmc.Player().getPlayingFile()" with xbmc.getInfoLabel("listitem.filename")

If you do that it gets the wrong name for the original file, and when it starts renaming the subtitles it goes wrong.


Please update to the latest version and post your log file.




Zeljko
(This post was last modified: 2009-08-12 08:31 by amet.)
find
amet Offline
I wave my private parts at your aunties!
Posts: 3,480
Joined: Jul 2009
Reputation: 18
Location: Novi Sad / Dubai
Post: #46
blittan Wrote:special://xbmc/scripts are more accurate

My apologies then. I got the info from the forum. Sad

Zeljko
find
blittan Offline
Team-XBMC Handyman
Posts: 1,714
Joined: Jun 2004
Reputation: 11
Location: Sweden
Post: #47
special://xbmc (where the executable resides)
special://home (a writable version of special://xbmc)
special://masterprofile (the “master” userdata folder, usually special://home/userdata)
special://profile (the current profiles’ userdata folder, usually special://masterprofile/profiles/<profilename>)
special://temp (a temporary cache folder, such as /tmp/xbmc on *nix)

when referring to the scripts folder, use os.getcwd()

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.
If you don't have the time to read them, please don't take the time to post in this forum!
For troubleshooting and bug reporting please make sure you read this first.
(This post was last modified: 2009-08-12 10:55 by blittan.)
find
amet Offline
I wave my private parts at your aunties!
Posts: 3,480
Joined: Jul 2009
Reputation: 18
Location: Novi Sad / Dubai
Post: #48
blittan Wrote:special://xbmc (where the executable resides)
special://home (a writable version of special://xbmc)
special://masterprofile (the “master” userdata folder, usually special://home/userdata)
special://profile (the current profiles’ userdata folder, usually special://masterprofile/profiles/<profilename>)
special://temp (a temporary cache folder, such as /tmp/xbmc on *nix)

when referring to the scripts folder, use os.getcwd()

so if the script is put in users folder it should be "special://home/scripts/", correct?

if I put the script in "special://xbmc/scripts/" and update XBMC via Luncher the script will get deleted and if it resides in users folder it will be there after update,right?

Thanks a lot for clarifying this

Zeljko
find
nixa Offline
Skilled Python Coder
Posts: 215
Joined: Apr 2009
Reputation: 0
Location: Japan
Post: #49
Just to clear the air, if you want to have subtitle + streaming from internet, get the instructions i mentioned earlier. To be noted, this modification is meant to set the InfoLabel (file name) as the 'search keywords' in the opensubtitles.org instead of using file name & hash (the original script).

The main reason we need InfoLabel for streaming is that conventionally all movie files on the server side (the video providers) are named with random numbers mixed with alphabets. Thus, the searching process for the subtitles would fail as it would use this 'random numbers keywords'.

However, using InfoLabel as the 'keywords' not necessarily breaks the functionality of searching subtitles for local streaming files. It only removes the search by hash, thus resulting in slightly lower accuracy result.

Sorry again Amet for confusing your fans here.Smile I will closed my case for now. Lets concentrate on the original purpose of your script.
(This post was last modified: 2009-08-13 16:53 by nixa.)
find
amet Offline
I wave my private parts at your aunties!
Posts: 3,480
Joined: Jul 2009
Reputation: 18
Location: Novi Sad / Dubai
Post: #50
nixa Wrote:Just to clear the air, if you want to have subtitle + streaming from internet, get the instructions i mentioned earlier. To be noted, this modification is meant to set the InfoLabel (file name) as the 'search keywords' in the opensubtitles.org instead of using file name & hash (the original script).

The main reason we need InfoLabel for streaming is that conventionally all movie files on the server side (the video providers) are named with random numbers mixed with alphabets. Thus, the searching process for the subtitles would fail as it would use this 'random numbers keywords'.

However, using InfoLabel as the 'keywords' not necessarily breaks the functionality of searching subtitles for local streaming files. It only removes the search by hash, thus resulting in slightly lower accuracy result.

Sorry again Amit for confusing your fans here.Smile I will closed my case for now. Lets concentrate on the original purpose of your script.

No problems , Smile

just to clarify, I have no problem with change that you mention earlier. The problem comes in when the zip file of a subtitle is downloaded it gets downloaded to the path that we provided with xbmc.Player().getPlayingFile() function.

If you just put xbmc.getInfoLabel("listitem.filename"), which returns just name and no path, the downloader has no path to download the zip.

look under "def download_subtitles(self, pos):" in gui.py

local_path = os.path.dirname (self.file_original_path) should return path of the movie. self.file_original_path ( "def set_filepath( self, path ):") is search_path we set in Default.py.
After you change it to just "xbmc.getInfoLabel("listitem.filename")" , local_path becomes just a name of the movie that you see on a screen and we need the path to be able to download the subtitle.

I hope this clears it up, and again I dont mind the change but I think that was the reason Meez had problems.

Zeljko
find
Thread Closed