Kodi Community Forum
[DEPRECIATED] XBMC Subtitles - Addon Script (previously OpenSubtitles OSD) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Subtitle Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=143)
+---- Thread: [DEPRECIATED] XBMC Subtitles - Addon Script (previously OpenSubtitles OSD) (/showthread.php?tid=75437)



- fiveisalive - 2010-10-26

Amet Wrote:it fails to load gui.py, can you confirm that you have it in /home/myth/.xbmc/addons/script.xbmc.subtitles/resources/lib?

have you tried reinstalling it, maybe something went wrong while updating?

gui.py is there all right:
Code:
ls -l /home/myth/.xbmc/addons/script.xbmc.subtitles/resources/lib/gui.py
-rw-r--r--. 1 myth myth 21736 Oct 24 22:51 /home/myth/.xbmc/addons/script.xbmc.subtitles/resources/lib/gui.py

contents look sane. Will try 2.0.2.


- Gertt - 2010-10-26

For idiots like me (Laugh) it might be handy to know that the new release doesn't seem to be compatible with dharma beta 2.. Atleast that's how it was for me. I was getting this:

Code:
21:04:58 T:4844 M:868249600  NOTICE: -->Python Interpreter Initialized<--
21:05:04 T:4844 M:869224448   ERROR: Error Type: exceptions.AttributeError
21:05:04 T:4844 M:869224448   ERROR: Error Contents: 'GUI' object has no attribute 'newWindow'

But then I found out that beta three was released and after installing that, the problem was gone.

Feel free to remove this if I made a mistake =D

Gertt


- fiveisalive - 2010-10-26

Amet Wrote:it fails to load gui.py, can you confirm that you have it in /home/myth/.xbmc/addons/script.xbmc.subtitles/resources/lib?

have you tried reinstalling it, maybe something went wrong while updating?

fiveisalive Wrote:gui.py is there all right:
Code:
ls -l /home/myth/.xbmc/addons/script.xbmc.subtitles/resources/lib/gui.py
-rw-r--r--. 1 myth myth 21736 Oct 24 22:51 /home/myth/.xbmc/addons/script.xbmc.subtitles/resources/lib/gui.py

contents look sane. Will try 2.0.2.

Same issue with 2.0.2. I inserted some debug statements in default.py to help illuminate what might be going on:

Code:
BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'lib' ) )
sys.path.append (BASE_RESOURCE_PATH)
print BASE_RESOURCE_PATH
print sys.path

here's the log:

Code:
16:10:29 T:139756990052112 M:2872967168  NOTICE: -->Python Interpreter Initialized<--
16:10:29 T:139756990052112 M:2872967168   DEBUG: Process - The source file to load is /home/myth/.xbmc/addons/script.xbmc.subtitles/default.py
16:10:29 T:139756990052112 M:2872967168   DEBUG: Process - Setting the Python path to /home/myth/.xbmc/addons/script.xbmc.subtitles:/home/myth/.xbmc/addons/script.module.dialogaddonscan/lib:/home/myth/.xbmc/addons/script.module.common.playback/lib:/home/myth/.xbmc/addons/script.module.beautifulsoup/lib:/home/myth/.xbmc/addons/script.module.cryptopy/lib:/home/myth/.xbmc/addons/script.module.simplejson/lib:/usr/local/lib64/xbmc/addons/script.module.pil/lib:/home/myth/.xbmc/addons/script.module.elementtree/lib:/usr/local/lib64/xbmc/addons/script.module.pysqlite/lib:/usr/local/lib64/xbmc/system/python/python24.zip:/usr/local/share/xbmc/system/python/lib/python24.zip:/usr/local/share/xbmc/system/python/lib/python2.4/:/usr/local/share/xbmc/system/python/lib/python2.4/plat-linux2:/usr/local/share/xbmc/system/python/lib/python2.4/lib-tk:/usr/local/share/xbmc/system/python/lib/python2.4/lib-dynload
16:10:29 T:139756990052112 M:2872967168   DEBUG: Process - Entering source directory /home/myth/.xbmc/addons/script.xbmc.subtitles
16:10:29 T:139756990052112 M:2872967168  NOTICE: /home/myth/.xbmc/addons/script.xbmc.subtitles/resources/lib
16:10:29 T:139756990052112 M:2872967168  NOTICE: ['/home/myth/.xbmc/addons/script.xbmc.subtitles', '/home/myth/.xbmc/addons/script.module.dialogaddonscan/lib', '/home/myth/.xbmc/addons/script.module.common.playback/lib', '/home/myth/.xbmc/addons/script.module.beautifulsoup/lib', '/home/myth/.xbmc/addons/script.module.cryptopy/lib', '/home/myth/.xbmc/addons/script.module.simplejson/lib', '/usr/local/lib64/xbmc/addons/script.module.pil/lib', '/home/myth/.xbmc/addons/script.module.elementtree/lib', '/usr/local/lib64/xbmc/addons/script.module.pysqlite/lib', '/usr/local/lib64/xbmc/system/python/python24.zip', '/usr/local/share/xbmc/system/python/lib/python24.zip', '/usr/local/share/xbmc/system/python/lib/python2.4/', '/usr/local/share/xbmc/system/python/lib/python2.4/plat-linux2', '/usr/local/share/xbmc/system/python/lib/python2.4/lib-tk', '/usr/local/share/xbmc/system/python/lib/python2.4/lib-dynload', '/home/myth/.xbmc/addons/script.xbmc.subtitles/resources/lib']
16:10:29 T:139756990052112 M:2872967168   DEBUG: ### [XBMC Subtitles] - Version: 2.0.2
16:10:29 T:139758804056224 M:2872967168   DEBUG: CAnnouncementManager - Announcement: PlaybackPaused from xbmc
16:10:29 T:139758804056224 M:2872967168   DEBUG: ------ Window Init (DialogSeekBar.xml) ------
16:10:29 T:139758804056224 M:2872967168   DEBUG: Alloc resources: 0.01ms (0.00 ms skin load)
16:10:29 T:139756990052112 M:2872967168    INFO: -->Python script returned the following error<--
16:10:29 T:139756990052112 M:2872967168   ERROR: Error Type: exceptions.AttributeError
16:10:29 T:139756990052112 M:2872967168   ERROR: Error Contents: 'module' object has no attribute 'GUI'
16:10:29 T:139756990052112 M:2872967168   ERROR: Traceback (most recent call last):
                                              File "/home/myth/.xbmc/addons/script.xbmc.subtitles/default.py", line 24, in ?
                                                ui = gui.GUI( "script-XBMC-Subtitles-main.xml" , __cwd__ , "Default")
                                            AttributeError: 'module' object has no attribute 'GUI'
16:10:29 T:139756990052112 M:2872967168    INFO: -->End of Python script error report<--

Note that I am using the SVN of the Dharma branch, but the head of that branch as of r34904, so it's few changesets past beta3.


- Chriscc - 2010-10-26

Hello,

in order to use DSplayer for HD decoding (http://forum.xbmc.org/showthread.php?tid=61355) we use a trunk version 34469 for the time being(http://passion-xbmc.org/gros_fichiers/xbmcdsplayer/index.php).
and since the update to 2.0.2 the addon don't work anymore Sad

How could i revert back to the previous version who was working very well?


- amet - 2010-10-26

fillidill Wrote:I actually already have it. Here's the log:
http://pastebin.com/5kipkcd6

Thanks a lot for your help!

look for "script-XBMC-Subtitles-main.xml" in C:\Program Files (x86)\XBMC_dharmabeta2\portable_data\addons\skin.alaska.philip\720p

backup and/or delete it, I suspect that it is an old script-XBMC-Subtitles-main.xml file.


- Zrino - 2010-10-27

After update of subtitle script, main subtitle menu is totally blank (just empty square)
http://pastebin.com/uhWjKNBp


- ronie - 2010-10-27

Zrino Wrote:After update of subtitle script, main subtitle menu is totally blank (just empty square)
http://pastebin.com/uhWjKNBp

the new version is not really compatible with the code in Transparency!

to fix, open this file: skin.transparency/720p/script-XBMC-Subtitles-main.xml
and remove the second line: <defaultcontrol>120</defaultcontrol>


- aptalca - 2010-10-27

ronie, you're awesome as always, thank you


- fillidill - 2010-10-27

Amet Wrote:look for "script-XBMC-Subtitles-main.xml" in C:\Program Files (x86)\XBMC_dharmabeta2\portable_data\addons\skin.alaska.philip\720p

backup and/or delete it, I suspect that it is an old script-XBMC-Subtitles-main.xml file.

I did that but the problem remains. It just says Local subtitles found. It's strange because the subtitle script worked wonderfully a couple of releases back.

I have dharma beta 2 if that is a problem though?


- fiveisalive - 2010-10-27

OK, I think I found the issue. First searching through my list of plugins for a file named "gui.py" yielded this:

Code:
$ find . -name "gui.py"
./script.transmission/resources/lib/gui.py
./script.xbmc.subtitles/resources/lib/gui.py
./script.cdartmanager/resources/lib/gui.py
./script.cu.lyrics/resources/lib/gui.py
./script.xbmc.audio.mixer/resources/lib/gui.py
./script.games.rom.collection.browser/resources/lib/gui.py
./script.xbmc.lyrics/resources/lib/gui.py
./script.module.dialogaddonscan/lib/gui.py
./script.gmail.checker/resources/lib/gui.py
./script.image.bigpictures/resources/lib/gui.py

It seems that there the Plugin Python module "script.module.dialogaddonscan" (needed for the MyPicsDB Picture plugin) *also* has a gui.py (without a GUI class) and I think for some reason that gets loaded first (you can see it being loaded in my log file). And because it's earlier in the sys.path, it stomps on the local version. I tested this by moving aside the scripts.module.dialogaddonscan directory, and lo, and behold, it works again. (Ditto probably for the CU Lyrics plugin).

Not sure if the plugin is doing a bad thing, but for what it's work, here is the addon.xml for that plugin, perhaps the author is doing something that he/she shouldn't

Code:
?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- $Revision: 883 $ -->
<addon id="script.module.dialogaddonscan" name="Dialog Addon Scan"
       version="1.0.5" date="22.10.2010"
       provider-name="Frost (passion-xbmc.org)">
  <requires>
    <import addon="xbmc.python" version="1.0"/>
  </requires>
  <extension point="xbmc.python.module" library="lib" />
  <extension point="xbmc.addon.metadata">
    <summary>Dialog Scan for Add-on</summary>
    <description>Dialog Scan for Add-on</description>
    <license>GPL</license>
    <platform>all</platform>
  </extension>
</addon>



- Henkske - 2010-10-27

Never mind


- unknown_inc - 2010-10-27

Hi! Great script!! Thank you!!

One small question though, is there a way to make the "window" (OSD) to be at the bottom of the screen? In the last version (OpenSubtitles_OSD) I could choose where to have the "window" appear. I can't find any options for this under Dharma Beta 3.

Thanks again for a superb script!!!!! Smile


- adytum - 2010-10-27

Thanks for the most useful script for XBMC there is!

I've been using this for quite some time with great success, but the one thing I've been puzzled about is a problem of inconsistency.

I.e, just now, I searched for "no ordinary family s01e05". Nothing showed up, I tried a manual search string with variations upon year and the title only. Sublight turned up a few old episodes when the manual string was just "no ordinary family". Subscene finds nothing at all when using the show name only, even though all episodes' subs exist on the site. This thing happens with various shows, and various services.

I'm just interested in figuring out why this happens, and also how the script actually works in this regard.

Anyone?


- amet - 2010-10-27

adytum Wrote:Thanks for the most useful script for XBMC there is!

I've been using this for quite some time with great success, but the one thing I've been puzzled about is a problem of inconsistency.

I.e, just now, I searched for "no ordinary family s01e05". Nothing showed up, I tried a manual search string with variations upon year and the title only. Sublight turned up a few old episodes when the manual string was just "no ordinary family". Subscene finds nothing at all when using the show name only, even though all episodes' subs exist on the site. This thing happens with various shows, and various services.

I'm just interested in figuring out why this happens, and also how the script actually works in this regard.

Anyone?

you can read about how the script searches in this thread.

in short, it gets the name of the show, episode and season from xbmc if its scanned in the library, or tries to get it from the file name if the file is not in the library.

it works best if its scanned in for the obvious reasons


- amet - 2010-10-27

unknown_inc Wrote:Hi! Great script!! Thank you!!

One small question though, is there a way to make the "window" (OSD) to be at the bottom of the screen? In the last version (OpenSubtitles_OSD) I could choose where to have the "window" appear. I can't find any options for this under Dharma Beta 3.

Thanks again for a superb script!!!!! Smile

not sure what you mean, OpenSubtitles_OSD never had any options to position the screen