[RELEASE] OpenSubtitles OSD (Script)

  Thread Rating:
  • 5 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Closed
amet Offline
How do ya like them apples?
Posts: 3,943
Joined: Jul 2009
Reputation: 37
Location: Novi Sad / Dubai
Post: #16
ultrabrutal Wrote:does it use file name for searching or what about the length of the subtitles? I often find that they don't match the video and is out of sync

it uses search by hash and by file name.



Zeljko
(This post was last modified: 2009-08-10 16:37 by amet.)
find
amet Offline
How do ya like them apples?
Posts: 3,943
Joined: Jul 2009
Reputation: 37
Location: Novi Sad / Dubai
Post: #17
nixa Wrote:Amet, your hard work is much appreciated.

Yeah, as you said, the script is not meant for internet streaming as Ive tested on my apple tv. However, I did some modification of your script and now its working for internet streaming as well. Wink

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")

and you're done. Remember to browse your downloaded subtitle in /Volumes/Applications and make sure you tick the "Search for subtitles in RAR" in the XBMC video settings.

Okay now, to start with, you can download my watchnewfilms video plugin. I updated the plugin to remove brackets & genres as these could 'disturb' the search-string.

p/s:but if you feel dont hv time to replace the strings, you can get the modified script on my googlecode pg. (OpenSubtitles_OSD).

Credit goes to developers of those 3 scripts and Amet.

Hope to hear feedbacks on any issue arises.

great work,

I will have a look and maybe I can add it in the next update if it doesnt break the original script functionality.

What are you using for streaming?

Zeljko
find
Meez Offline
Member
Posts: 71
Joined: Feb 2009
Reputation: 0
Post: #18
trying to get this to work with PMIII (SDTV) on xbox. i get this error,

Code:
10:39:27 M: 22257664  NOTICE: -->Python Initialized<--
10:39:27 M: 22237184  NOTICE:
10:39:30 M: 17915904  NOTICE: Traceback (most recent call last):
10:39:30 M: 17915904  NOTICE:   File "Q:\scripts\OpenSubtitles_OSD\default.py", line 68, in ?
10:39:30 M: 17915904  NOTICE:
10:39:30 M: 17915904  NOTICE: ui = gui.GUI( "script-%s-%s.xml" % ( __scriptname__.replace( " ", "_" ), window, ), os.getcwd(), (skin))
10:39:30 M: 17915904  NOTICE: TypeError
10:39:30 M: 17915904  NOTICE: :
10:39:30 M: 17915904  NOTICE: XML File for Window is missing
10:39:30 M: 17915904  NOTICE:
10:39:30 M: 17915904   ERROR: Scriptresult: Error

how do i get this to work on PMIII?

thanks!!
find
nixa Offline
Skilled Python Coder
Posts: 210
Joined: Apr 2009
Reputation: 0
Location: Japan
Post: #19
i use watchnewfilms. yeah, you could integrate if it doesnt break the local streaming.
(This post was last modified: 2009-08-13 16:51 by nixa.)
find
amet Offline
How do ya like them apples?
Posts: 3,943
Joined: Jul 2009
Reputation: 37
Location: Novi Sad / Dubai
Post: #20
Meez Wrote:trying to get this to work with PMIII (SDTV) on xbox. i get this error,

Code:
10:39:27 M: 22257664  NOTICE: -->Python Initialized<--
10:39:27 M: 22237184  NOTICE:
10:39:30 M: 17915904  NOTICE: Traceback (most recent call last):
10:39:30 M: 17915904  NOTICE:   File "Q:\scripts\OpenSubtitles_OSD\default.py", line 68, in ?
10:39:30 M: 17915904  NOTICE:
10:39:30 M: 17915904  NOTICE: ui = gui.GUI( "script-%s-%s.xml" % ( __scriptname__.replace( " ", "_" ), window, ), os.getcwd(), (skin))
10:39:30 M: 17915904  NOTICE: TypeError
10:39:30 M: 17915904  NOTICE: :
10:39:30 M: 17915904  NOTICE: XML File for Window is missing
10:39:30 M: 17915904  NOTICE:
10:39:30 M: 17915904   ERROR: Scriptresult: Error

how do i get this to work on PMIII?

thanks!!

Use the version 1.02 from the first post Smile

Let me know if it works.

Zeljko
find
amet Offline
How do ya like them apples?
Posts: 3,943
Joined: Jul 2009
Reputation: 37
Location: Novi Sad / Dubai
Post: #21
nixa Wrote:i use watchnewfilms. yeah, you could integrate if it doesnt break the local streaming.

if not, sorry for making trouble in your thread. Smile

No problems,

I will look into it. the reason the xbmc.Player().getPlayingFile() is there is to get the full path of the file. We need that to calculate the hash.
Hash is used to do a better search on OpenSubtitles.org site.
I will need to install watchnewfilms and then test to make sure everything works.


Zeljko
find
Batemann Offline
Aeon Group
Posts: 323
Joined: Oct 2007
Location: Amsterdam
Post: #22
Hi. This seems marvelous! Any possiblity that it can support Aeon as well?

[Image: widget]
[Image: widget]
find
amet Offline
How do ya like them apples?
Posts: 3,943
Joined: Jul 2009
Reputation: 37
Location: Novi Sad / Dubai
Post: #23
Batemann Wrote:Hi. This seems marvelous! Any possiblity that it can support Aeon as well?

I will see what I can do... give me a day.

Will post if and when its done

Edit:
Support for Aeon added. Please check the first post.


Cheers

Zeljko
(This post was last modified: 2009-08-10 21:37 by amet.)
find
Meez Offline
Member
Posts: 71
Joined: Feb 2009
Reputation: 0
Post: #24
tested the latest version, 1.03 in PMIII. the OSD would not load. log they there was something wrong with Line 72 in the videoosd.xml. there was a typo which i fixed. it was, "<</visible>" instead of, "</visible>".

but the script still does not work in PMIII. i get the same error,

Code:
16:24:04 M: 24195072  NOTICE:   File "Q:\scripts\OpenSubtitles_OSD\default.py", line 70, in ?
16:24:04 M: 24195072  NOTICE:
16:24:04 M: 24195072  NOTICE: ui = gui.GUI( "script-%s-%s.xml" % ( __scriptname__.replace( " ", "_" ), window, ), os.getcwd(), (skin))
16:24:04 M: 24195072  NOTICE: TypeError
16:24:04 M: 24195072  NOTICE: :
16:24:04 M: 24195072  NOTICE: XML File for Window is missing
16:24:04 M: 24195072  NOTICE:
16:24:04 M: 24195072   ERROR: Scriptresult: Error

looks like PMIII is missing files,

script-OpenSubtitles-main.xml
script-OpenSubtitles-settings.xml

also, where exactly do i put this script. i put it in the XBMC/Scripts/ folder? is that what you mean by, "user's scripts folder" or somewhere else?

thanks!
find
amet Offline
How do ya like them apples?
Posts: 3,943
Joined: Jul 2009
Reputation: 37
Location: Novi Sad / Dubai
Post: #25
Meez Wrote:tested the latest version, 1.03 in PMIII. the OSD would not load. log they there was something wrong with Line 72 in the videoosd.xml. there was a typo which i fixed. it was, "<</visible>" instead of, "</visible>".

but the script still does not work in PMIII. i get the same error,

Code:
16:24:04 M: 24195072  NOTICE:   File "Q:\scripts\OpenSubtitles_OSD\default.py", line 70, in ?
16:24:04 M: 24195072  NOTICE:
16:24:04 M: 24195072  NOTICE: ui = gui.GUI( "script-%s-%s.xml" % ( __scriptname__.replace( " ", "_" ), window, ), os.getcwd(), (skin))
16:24:04 M: 24195072  NOTICE: TypeError
16:24:04 M: 24195072  NOTICE: :
16:24:04 M: 24195072  NOTICE: XML File for Window is missing
16:24:04 M: 24195072  NOTICE:
16:24:04 M: 24195072   ERROR: Scriptresult: Error

looks like PMIII is missing files,

script-OpenSubtitles-main.xml
script-OpenSubtitles-settings.xml

also, where exactly do i put this script. i put it in the XBMC/Scripts/ folder? is that what you mean by, "user's scripts folder" or somewhere else?

thanks!


Thanks a lot for pointing the typo out. it is fixed now on 1.04.

You are using XBMC with PAL support, right?

Try downloading 1.04 and test i. I have no way of testing PAL resolution unfortunately.

If it doesn't look good please make a screen cap and I will see what I can do.

As for the location of the script, you have it in a right place. Smile

It should be in a user's script folder

on ATV its /users/frontrow/Application support/XBMC/scripts/

on Mac OS /users/{your user name}/Application support/XBMC/scripts/

on Win32 C:\Documents and Settings\{your user name}\Application Data\XBMC\scripts\ <--- Application Data folder might be hidden.


Zeljko
(This post was last modified: 2009-08-11 01:07 by amet.)
find
Meez Offline
Member
Posts: 71
Joined: Feb 2009
Reputation: 0
Post: #26
i finally got it to work! i had to put all the files from the media folder from the PM3.HD into the Project Mayhem III's media folder. i also took the .xml files from the PAL PM3.HD folder and put them in the PMIII's PAL folder. but as expected, the window is off the screen for 4:3 tv's.

[Image: n4yziw.jpg]

seems like opensubtitles.org is under maintenance right now, but maybe you can fix the window?

thanks!
find
Meez Offline
Member
Posts: 71
Joined: Feb 2009
Reputation: 0
Post: #27
quick question, where are the subtitles saved to?

i downloaded a sub and it said it downloaded and extract successfully, but the movie still had no subs to display.
find
whufclee Offline
Fan
Posts: 314
Joined: Oct 2008
Reputation: 0
Location: Essex
Post: #28
In a reply to the above 2...

1) OpenSubtitles is not under construction as far as I'm aware, it just sometimes takes a few attempts to connect due to the slow website they use and the amount of traffic.

2) Unable to check at the moment but I'm pretty sure the subs are saved in the same location as your film. Just go to the Audio menu (on the video popup menu when playing a movie) and check "enable subtitles" then browse to where the subtitles are.
find
darknior Offline
Member
Posts: 75
Joined: Aug 2008
Reputation: 0
Post: #29
Woaw, fantastic work Big Grin
It is a very good idea ... i love it Wink

Do you will to add it to XBMC SVN for we can see and update it by XBMC SVN UPDATE SCRIPT ?
I think it is a good idea for everybody can know your work and allways have the last version Big Grin

Bye
find
amet Offline
How do ya like them apples?
Posts: 3,943
Joined: Jul 2009
Reputation: 37
Location: Novi Sad / Dubai
Post: #30
Meez Wrote:quick question, where are the subtitles saved to?

i downloaded a sub and it said it downloaded and extract successfully, but the movie still had no subs to display.

Hi,

here is the fix for a window PM3.HD.zip

Please let me know so that I can include it in a next version.

The subtitles are saved in the same folder where the movie is.
sometimes when the website is down or having problems the downloaded file isn't actually a zip as it should be, its an error page 500 or similar.



Zeljko
(This post was last modified: 2009-10-18 10:34 by amet.)
find
Thread Closed