XBMC Community Forum  

Go Back   XBMC Community Forum > Help and Support > Plugin/Script (Python) Addons Help and Support > Program Addons

Program Addons Subforum for Program Addons suggestions, plus help and support for all XBMC users.
Please, add platform prefix to all topic threads that might not platform-independent:
Thread prefixes; "[LINUX]", "[LIVE]", "[MAC]", "[WINDOWS]" or "[AppleTV1]" etc.

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 2007-10-13, 00:45   #1
Nuka1195
Skilled Python Coder
 
Join Date: Dec 2004
Posts: 3,761
Nuka1195 is on a distinguished road
Thumbs up [RELEASE] AMT Home Theater plugin - automatically play intro & trailers before movies

Now part of the Apple Movie Trailers script. Installer on the settings window.

http://xbmc-scripting.googlecode.com...vie%20Trailers

This has been requested before, don't know where the thread is.

What this plugin does is plays an optional intro video and then a number of random AMT trailers before playing your movie.

You must manually edit the settings.xml file for now.

Three settings:
path = path to your movies, it can have subfolders it will list videos and subfolders.
intro_path=an optional intro video to play first
number_trailers=the number of random trailers you want to play

It may or may not work for smb shares, i haven't tested that.

You need the AMT script installed with a database.

This is early beta, appreciate any feedback.

It also needs an icon any takers?

Edit: Just added samba support .
__________________
For python coding questions first see http://xbmc.sourceforge.net/python-docs/

Last edited by Nuka1195; 2007-10-15 at 02:50.
Nuka1195 is offline  
Old 2007-10-13, 04:05   #2
snappz
Happy User
 
Join Date: Oct 2003
Location: Perth, Australia
Posts: 301
snappz is on a distinguished road
Default

Sounds like a great script!

I tried to run it via SMB but it quits immediately with this in the log. (I'll get a debug log in a minute)
Quote:
09:01:04 M: 27869184 DEBUG: Activating window ID: 10020
09:01:04 M: 27869184 DEBUG: Checking if window ID 10020 is locked.
09:01:04 M: 31064064 INFO: Loading skin file: MyScripts.xml
09:01:04 M: 30982144 DEBUG: CGUIMediaWindow::GetDirectory (Q:\scripts)
09:01:04 M: 30982144 DEBUG: ParentPath = []
09:01:04 M: 30998528 DEBUG: CGUIMediaWindow::GetDirectory (Q:\scripts)
09:01:05 M: 30998528 DEBUG: ParentPath = [Q:\scripts]
09:01:06 M: 31911936 DEBUG: CApplication::OnKey: 167 pressed, action is 4
09:01:07 M: 31805440 DEBUG: CApplication::OnKey: 167 pressed, action is 4
09:01:07 M: 31617024 DEBUG: CApplication::OnKey: 167 pressed, action is 4
09:01:07 M: 31211520 DEBUG: CApplication::OnKey: 11 pressed, action is 7
09:01:07 M: 32436224 DEBUG: CGUIMediaWindow::GetDirectory (Q:\scripts)
09:01:07 M: 32440320 DEBUG: ParentPath = [Q:\scripts]
09:01:07 M: 32440320 INFO: Traceback (most recent call last):
09:01:08 M: 32382976 INFO: File "Q:\scripts\Movie Theater Plug-in\default.py", line 20, in ?
09:01:08 M: 32382976 INFO:
09:01:08 M: 32358400 INFO: if ( "isFolder=0" in sys.argv[ 2 ] ):
09:01:08 M: 32358400 INFO: IndexError
09:01:08 M: 32337920 INFO: :
09:01:08 M: 32342016 INFO: list index out of range
09:01:08 M: 32296960 INFO:
09:01:08 M: 32276480 ERROR: Scriptresult: Error
09:01:08 M: 32243712 INFO: Python script stopped
09:01:08 M: 32612352 DEBUG: CGUIMediaWindow::GetDirectory (Q:\scripts)
I didnt have an intro set either if that makes a difference. All I did was add the smb path and username/password
snappz is offline  
Old 2007-10-13, 04:33   #3
Nuka1195
Skilled Python Coder
 
Join Date: Dec 2004
Posts: 3,761
Nuka1195 is on a distinguished road
Default

This is a plugin, did you install it as such?

Also I did fix a bug, maybe download it again.

Also show the samba path you used.

I only tested it with a guest account, see if you can make a guest account work first.

Username=Guest
password=
__________________
For python coding questions first see http://xbmc.sourceforge.net/python-docs/
Nuka1195 is offline  
Old 2007-10-13, 04:53   #4
snappz
Happy User
 
Join Date: Oct 2003
Location: Perth, Australia
Posts: 301
snappz is on a distinguished road
Default



Jumped the gun after a night shift and installed it as a python script.....

apologies for that....

Trying it now

Thank you
snappz
snappz is offline  
Old 2007-10-13, 06:11   #5
snappz
Happy User
 
Join Date: Oct 2003
Location: Perth, Australia
Posts: 301
snappz is on a distinguished road
Default

Ok
Works a treat on local partition but I'm still having problems over smb.

log file
Quote:
11:06:44 M: 35069952 DEBUG: CApplication::OnMessage : Translating SetFocus(99)
11:06:44 M: 35069952 DEBUG: CApplication::OnMessage : To SetFocus(99)
11:06:45 M: 33820672 DEBUG: CApplication::OnKey: 168 pressed, action is 2
11:06:45 M: 33783808 DEBUG: CApplication::OnKey: 167 pressed, action is 4
11:06:45 M: 33783808 DEBUG: CApplication::OnKey: 167 pressed, action is 4
11:06:46 M: 33759232 DEBUG: CApplication::OnKey: 167 pressed, action is 4
11:06:46 M: 33783808 DEBUG: CApplication::OnKey: 167 pressed, action is 4
11:06:47 M: 33783808 DEBUG: CApplication::OnKey: 11 pressed, action is 7
11:06:47 M: 33771520 DEBUG: Clearing cached fileitems [plugin://video/]
11:06:47 M: 33771520 ERROR: XFILE::CFile:elete - Error deleting file Z:\aaf09b86.fi
11:06:47 M: 33878016 DEBUG: CGUIMediaWindow::GetDirectory (plugin://video/)
11:06:47 M: 33878016 DEBUG: ParentPath = []
11:06:47 M: 33865728 WARNING: DIRECTORY::CVideoDatabaseDirectory::GetLabel - Unknown nodetype requested 6
11:06:48 M: 33783808 DEBUG: CApplication::OnKey: 11 pressed, action is 7
11:06:48 M: 33771520 DEBUG: Clearing cached fileitems [plugin://video/Movie Theater Plug-in/]
11:06:48 M: 33771520 ERROR: XFILE::CFile:elete - Error deleting file Z:\ea1083f0.fi
11:06:48 M: 33878016 DEBUG: CGUIMediaWindow::GetDirectory (plugin://video/Movie Theater Plug-in/)
11:06:48 M: 33878016 DEBUG: ParentPath = [plugin://video/]
11:06:48 M: 33878016 DEBUG: DIRECTORY::CPluginDirectory::GetDirectory - calling plugin Q:\plugins\video\Movie Theater Plug-in\default.py('plugin://video/Movie Theater Plug-in/','1','')
11:06:48 M: 33353728 DEBUG: DIRECTORY::CPluginDirectory::WaitOnScriptResult - waiting on the Movie Theater Plug-in plugin...
11:06:48 M: 33353728 DEBUG: dllbind: family:2 port:0 ip:0.0.0.0
11:06:49 M: 33083392 DEBUG: PYXBMC::ListItem_SetInfo - InfoLabel Dictionary has 3 items
11:06:49 M: 33083392 DEBUG: PYXBMC::ListItem_SetInfo - InfoLabel Dictionary: pos: 1, key: Date
11:06:49 M: 33083392 DEBUG: PYXBMC::ListItem_SetInfo - Type: Video, InfoLabel: Date, Value: 01-06-2006
11:06:49 M: 33083392 DEBUG: PYXBMC::ListItem_SetInfo - InfoLabel Dictionary: pos: 4, key: Size
11:06:49 M: 33083392 DEBUG: PYXBMC::ListItem_SetInfo - InfoLabel Dictionary: pos: 8, key: Title
11:06:49 M: 33083392 DEBUG: PYXBMC::ListItem_SetInfo - Type: Video, InfoLabel: Title, Value: 16_BLOCKS
11:06:49 M: 33083392 INFO: Traceback (most recent call last):
11:06:49 M: 33083392 INFO: File "Q:\scripts\Movie Theater Plug-in\TheaterAPI\xbmcplugin_list.py", line 138, in _fill_media_list
11:06:49 M: 33083392 INFO: File "Q:\scripts\Movie Theater Plug-in\TheaterAPI\xbmcplugin_list.py", line 168, in _get_thumbnail
11:06:49 M: 33083392 INFO: File "Q:\system\python\python24.zlib\ntpath.py", line 62, in join
11:06:49 M: 33083392 INFO: OverflowError: long int too large to convert to int
11:06:49 M: 33083392 INFO: long int too large to convert to int
11:06:49 M: 33083392 INFO:
11:06:49 M: 33083392 INFO: Scriptresult: Succes
11:06:49 M: 33083392 DEBUG: DIRECTORY::CPluginDirectory::WaitOnScriptResult plugin returned failure
11:06:49 M: 33083392 INFO: Python script stopped
11:06:49 M: 33607680 ERROR: CGUIMediaWindow::GetDirectory(plugin://video/Movie Theater Plug-in/) failed
11:06:49 M: 33607680 DEBUG: CGUIMediaWindow::GetDirectory (plugin://video/)
11:06:49 M: 33607680 DEBUG: ParentPath = []
11:06:49 M: 33595392 WARNING: DIRECTORY::CVideoDatabaseDirectory::GetLabel - Unknown nodetype requested 6
It seems to be reading the share ok then failing

snappz
snappz is offline  
Old 2007-10-13, 06:18   #6
Nuka1195
Skilled Python Coder
 
Join Date: Dec 2004
Posts: 3,761
Nuka1195 is on a distinguished road
Default

Quote:
11:06:49 M: 33083392 INFO: OverflowError: long int too large to convert to int
11:06:49 M: 33083392 INFO: long int too large to convert to int
What kind of samba share. It may be erroring on file size. which won't be a script error, but we need to fix xbmc.

post your settings.xml file, remove passwords.

Try this:
look for this line in xbmcplugin_list.py
Code:
listitem.setInfo( type="Video", infoLabels={ "Title": title, "Date": date, "Size": size } )
make it
Code:
listitem.setInfo( type="Video", infoLabels={ "Title": title, "Date": date } )
EDIT: I just confirmed it's the size. I'm not sure how to handle that. So making the above change will at least get it going.

I updated the first post with a new link, with that change. notice the folder name change.
__________________
For python coding questions first see http://xbmc.sourceforge.net/python-docs/

Last edited by Nuka1195; 2007-10-13 at 06:38.
Nuka1195 is offline  
Old 2007-10-13, 06:58   #7
snappz
Happy User
 
Join Date: Oct 2003
Location: Perth, Australia
Posts: 301
snappz is on a distinguished road
Default

Thanks Nuka
I will try that when I get back home (Just got to work for a 12 hr shift )

As I said works great on a local share. Now just have to make up a little intro clip.........
snappz is offline  
Old 2007-10-13, 16:39   #8
Nuka1195
Skilled Python Coder
 
Join Date: Dec 2004
Posts: 3,761
Nuka1195 is on a distinguished road
Default

The size error has been fixed in XBMC's svn. I'll wait for the next T3CH release to change the plugin back.

Thanks for your help
__________________
For python coding questions first see http://xbmc.sourceforge.net/python-docs/
Nuka1195 is offline  
Old 2007-10-13, 17:39   #9
Nuka1195
Skilled Python Coder
 
Join Date: Dec 2004
Posts: 3,761
Nuka1195 is on a distinguished road
Default

Anybody that downloaded the plugin, download again. I just fixed a smb subfolder issue.
__________________
For python coding questions first see http://xbmc.sourceforge.net/python-docs/
Nuka1195 is offline  
Old 2007-10-14, 05:40   #10
snappz
Happy User
 
Join Date: Oct 2003
Location: Perth, Australia
Posts: 301
snappz is on a distinguished road
Default

Thanks Nuka

can I ask you to check your download package please?
It looks like the link goes to a https and you need to login. remove the s and I get ot ok, but then I get
Quote:
10:37:53 M: 28823552 DEBUG: DIRECTORY::CPluginDirectory::RunScriptWithParams - calling plugin Q:\plugins\video\Movie Theater Plugin\default.py('plugin://video/Movie Theater Plugin/','-1','?path="""smb://server/Movies/Interpreter.iso"""&isFolder=0&username="""Guest""" &password=""""""&intro_path=""""""&number_trailers =3')
10:37:53 M: 28323840 INFO: Loading skin file: DialogProgress.xml
10:37:54 M: 27729920 INFO: Traceback (most recent call last):
10:37:54 M: 27746304 INFO: File "Q:\plugins\video\Movie Theater Plugin\default.py", line 24, in ?
10:37:54 M: 27717632 INFO:
10:37:54 M: 27725824 INFO: from TheaterAPI import xbmcplugin_player as plugin
10:37:54 M: 27725824 INFO: File "Q:\plugins\video\Movie Theater Plugin\TheaterAPI\xbmcplugin_player.py", line 15, in ?
10:37:54 M: 27725824 INFO:
10:37:54 M: 27725824 INFO: from pysqlite2 import dbapi2 as sqlite
10:37:54 M: 27725824 INFO: ImportError
10:37:54 M: 27725824 INFO: :
10:37:54 M: 27725824 INFO: No module named pysqlite2
10:37:54 M: 27725824 INFO:
10:37:54 M: 27725824 ERROR: Scriptresult: Error
10:37:54 M: 27725824 INFO: Python script stopped
I deleted the previous package before installing this one. Is this package missing some files? I thought there were 2 folders in the original but only 1 in this.

cheers

snappz
snappz is offline  
Closed Thread

Bookmarks

Tags
move trailers


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:59.


Protected by Akismet, We recommend WordPress blogs
Copyright © 2012, XBMC Project