Random Trailer Screensaver
#31
@Kzeleny: I love this.

the only thing i'd like to see is an automated mute option so I have moving picture as a screensaver without the sound.
and to end the thing on keypress or mousemotion.

If you get this to work you will be my hero.

BTW screensaver doesn't crash on my setup so I'm very happy with it.
Reply
#32
(2013-05-27, 11:56)warsnake Wrote: @Kzeleny: I love this.

the only thing i'd like to see is an automated mute option so I have moving picture as a screensaver without the sound.
and to end the thing on keypress or mousemotion.

If you get this to work you will be my hero.

BTW screensaver doesn't crash on my setup so I'm very happy with it.

Thanks for the feedback.

I added an option to mute trailers during playback, it also now exits on keypress or mouse move. I also fixed a bug where the trailers would start playing if you were playing some other kind of media.

New Version available here: https://github.com/kzeleny/service.trailer.screensaver
-ken Z-
Reply
#33
Amazing! One feature request. I am using this on my mac mini htpc and use the apple remote to control xbmc. Can you add the Menu button press as a command to exit the service. Currently, the only way I can get out is to press Play to start the movie for the current trailer, and then Menu to back out of the movie.

Also, just fyi, the instructions for the key shortcuts, and the trailer title, are overlapping in the upper left corner during the trailer playback. This is a minor visual issue though.

Thanks for this!!!
Reply
#34
Is there a previous or back button that should exit. I am working on a new version that will allow to hide recently watched movies and more. there is a Random trailers program addon that is available now that has the updates
-ken Z-
Reply
#35
(2013-06-14, 02:09)kzeleny Wrote: Is there a previous or back button that should exit. I am working on a new version that will allow to hide recently watched movies and more. there is a Random trailers program addon that is available now that has the updates

Unfortunately the Menu, and Up, Down, Left and Right Direction Arrows don't work in either the Random Trailer Screensaver or Program. The Play/Pause and Select buttons both exit the addon and start the movie, but thats the only way out. Thanks for the updates!
Reply
#36
I haven't read this whole thread, but I briefly looked at your code and wondered why you run as a service?

the following test addon.xml and addon.py work fine as a screensaver, though i'm on current git. (nightlies)


PHP Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="screensaver.movie_trailers" name="Movie Trailers Screensaver" version="1.0.0" provider-name="nuka1195">
    <requires>
        <import addon="xbmc.addon" version="12.0.0"/>
        <import addon="xbmc.python" version="2.1.0"/>
    </requires>
    <extension point="xbmc.ui.screensaver" library="addon.py"/>
    <extension point="xbmc.addon.metadata">
        <platform>all</platform>
        <nochangelog>true</nochangelog>
        <nofanart>false</nofanart>
        <noicon>false</noicon>
        <license>Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</license>
        <website></website>
        <source>https://github.com/nuka1195/screensaver.movie_trailers.git</source>
        <forum></forum>
        <email></email>    
        <summary lang="en">Watch movie trailers as your screensaver.</summary>
        <description lang="en">Watch movie trailers as your screensaver.</description>
        <disclaimer lang="en">This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License *see license.txt</disclaimer>
    </extension>
</addon> 

PHP Code:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#
## Movie Trailers: Video plugin

# enable this import for debugging
#from resources.lib import pydev_debug
##from resources.lib.addonmodule import XBMCAddon

ADDON_ID "screensaver.movie_trailers"


if (__name__ == "__main__"):
    
# we pass an instance of XBMCAddon() to all modules,
    # XBMCAddon() includes sys.argv items and parsed parameters.
    ##m_addon = XBMCAddon()
    
import xbmc
    xbmc
.Player().play("/Users/user/Trailers/afterearth-tlr2_h640w-trailer.mov"
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#37
After reading, I think i understand, you want control over the trailers, you don't want it to act exactly like a screensaver.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#38
Your right I wanted it to act like a screen saver but not deactivate on mouse move or key press. I tried to implement as a screensaver originally but could not get it to allow the control I wanted. But I think I could modify it to just use the screensaver activate function to start it up, but ignore the deactivate events to allow user control of trailers, ie muting or getting movie info, playing movie etc.

(2013-06-14, 03:55)brendon2424 Wrote:
(2013-06-14, 02:09)kzeleny Wrote: Is there a previous or back button that should exit. I am working on a new version that will allow to hide recently watched movies and more. there is a Random trailers program addon that is available now that has the updates

Unfortunately the Menu, and Up, Down, Left and Right Direction Arrows don't work in either the Random Trailer Screensaver or Program. The Play/Pause and Select buttons both exit the addon and start the movie, but thats the only way out. Thanks for the updates!

I added arrow keys to the program addon. UP=show movie info, DOWN=hide movie info, RIGHT=next trailer, LEFT=exit

Pushed it to repo should be available in the next day or so. Look for version 1.0.6
-ken Z-
Reply
#39
Thanks!!!
Reply
#40
I just played around again and the only way to deactivate the video was to stop it. mouse moves and key presses (other than x) did not deactivate it.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#41
Yes that's how it was designed to work, it is to allow the user to interact with the trailer, they can press esc at any time to quit. If you want till the last trailer plays the screen will go black, and then it reacts like a standard screensaver and will deactivate upon mouse move or key press.
-ken Z-
Reply
#42
(2013-06-14, 03:55)brendon2424 Wrote:
(2013-06-14, 02:09)kzeleny Wrote: Is there a previous or back button that should exit. I am working on a new version that will allow to hide recently watched movies and more. there is a Random trailers program addon that is available now that has the updates

Unfortunately the Menu, and Up, Down, Left and Right Direction Arrows don't work in either the Random Trailer Screensaver or Program. The Play/Pause and Select buttons both exit the addon and start the movie, but thats the only way out. Thanks for the updates!

I have updated both the Screensaver as well as the script, they both have same features now. Including arrow controls

You can download latest versions here https://github.com/kzeleny/script.randomtrailers

I will wait a few weeks for any bug fixes and changes before submitting them to the official xbmc.org repo.

here is the change log for both

v1.0.6 (June 14, 2013) :
- added arrow controls for remotes without keyboards
UP = show info
DOWN = hide info
RIGHT = next trailer
LEFT = exit trailers

v1.0.5 (June 12, 2013) :
- fixed module import issues. fixed font issues

v1.0.4 (June 10, 2013) :
- improved movie information screen
- added feature and setting to exclude recently watched movies from trailers. Set to number of days after movie
has been played before including in trailers

v1.0.3 (June 4, 2013) :
- added setting to hide movie info during playback of trailer
press I during playback of trailer to toggle info display

v1.0.2 (June 3, 2013) :
- added feature to allow playing movie of currently playing trailer by pressing enter while trailer is playing
- added feature to allow user to press esc to exit, or X to quit trailer but play remaining.

v1.0.1 (May 30, 2013)
- added option to not ask for genre filter

v1.0.0 (May 27, 2013) :
- initial release, includes options for selecting genre, number trailers, and to display open and close animation.
-ken Z-
Reply
#43
i was referring to the code i posted, i think it works the way you want. no need for your own window or making it a service. just make it a screensaver and play the trailers.

maybe something changed in XBMC.

the one improvement in XBMC would be if you could have it loop.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#44
It would be nice to have it as standard screensaver instead of service, hopefully Nuka1195s code will help.
Reply
#45
i think just making it a screensaver

PHP Code:
<extension point="xbmc.ui.screensaver" library="addon.py"/> 

leaving everything else the same would be enough.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
Random Trailer Screensaver0