The branch, frodo has been updated
via 49a5a6cd96c77c44e161a87ca85e5563beb283f9 (commit)
from f80472c27db68ec2bfbba6e6bb6c1e47ebe5db34 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=49a5a6cd96c77c44e161a87ca85e5563beb283f9
commit 49a5a6cd96c77c44e161a87ca85e5563beb283f9
Author: sphere <[email protected]>
Date: Fri May 9 10:30:26 2014 +0200
[script.videoextras] updated to version 1.1.1
diff --git a/script.videoextras/addon.xml b/script.videoextras/addon.xml
index 5fd97e4..ac964ff 100644
--- a/script.videoextras/addon.xml
+++ b/script.videoextras/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.videoextras" name="VideoExtras" version="1.1.0"
provider-name="robwebset">
+<addon id="script.videoextras" name="VideoExtras" version="1.1.1"
provider-name="robwebset">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
</requires>
diff --git a/script.videoextras/changelog.txt b/script.videoextras/changelog.txt
index b6f1364..03ee2ab 100644
--- a/script.videoextras/changelog.txt
+++ b/script.videoextras/changelog.txt
@@ -1,3 +1,8 @@
+v1.1.1
+- Fix bug with default name when accessing across file systems
+- Fix small chance where "play all" will display Info screen
+- Add Play All option to detailed list screen and plugin
+
v1.1.0
- Add support for videoextras.nfo file
- Fix issue when having extras on different OS than XBMC is on
diff --git a/script.videoextras/default.py b/script.videoextras/default.py
index 09cffb3..a2e3d1a 100644
--- a/script.videoextras/default.py
+++ b/script.videoextras/default.py
@@ -92,9 +92,7 @@ class VideoExtrasDialog(xbmcgui.Window):
# Give anything that was already playing time to stop
while extrasPlayer.isPlaying():
xbmc.sleep(100)
- if select == 0 and addPlayAll == True:
- playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
- playlist.clear()
+ if (select == 0) and (addPlayAll == True):
extrasPlayer.playAll( exList )
else:
itemToPlay = select
@@ -106,6 +104,11 @@ class VideoExtrasDialog(xbmcgui.Window):
extrasPlayer.play( exList[itemToPlay] )
while extrasPlayer.isPlayingVideo():
xbmc.sleep(100)
+
+ # If the user selected the "Play All" option, then we do not
want to
+ # stop between the two videos, so do an extra wait
+ if (select == 0) and (addPlayAll == True) and (not
extrasPlayer.isPlayingVideo()):
+ xbmc.sleep(3000)
else:
return False
return True
@@ -227,6 +230,10 @@ class VideoExtrasWindow(xbmcgui.WindowXML):
# Need to clear the list of the default items
self.clearList()
+ # Start by adding an option to Play All
+ anItem = xbmcgui.ListItem(__addon__.getLocalizedString(32101))
+ self.addItem(anItem)
+
for anExtra in self.files:
log("VideoExtrasWindow: filename: %s" % anExtra.getFilename())
@@ -253,6 +260,10 @@ class VideoExtrasWindow(xbmcgui.WindowXML):
log("VideoExtrasWindow: Close Action received: %s" %
str(action.getId()))
self.close()
elif action == ACTION_CONTEXT_MENU:
+ # Check for the Play All case
+ if self.getCurrentListPosition() == 0:
+ return
+
# Get the item that was clicked on
extraItem = self._getCurrentSelection()
# create the context window
@@ -313,6 +324,12 @@ class VideoExtrasWindow(xbmcgui.WindowXML):
if control != WINDOW_LIST_ID:
return
+ # Check for the Play All case
+ if self.getCurrentListPosition() == 0:
+ extrasPlayer = ExtrasPlayer()
+ extrasPlayer.playAll( self.files )
+ return
+
# Get the item that was clicked on
extraItem = self._getCurrentSelection()
diff --git a/script.videoextras/plugin.py b/script.videoextras/plugin.py
index e3fbb53..0c4a4d2 100644
--- a/script.videoextras/plugin.py
+++ b/script.videoextras/plugin.py
@@ -186,6 +186,13 @@ class MenuNavigator():
# Perform the search command
files = videoExtras.findExtras(extrasDb=extrasDb)
+ if len(files) > 0:
+ # Start by adding an option to Play All
+ anItem = xbmcgui.ListItem(__addon__.getLocalizedString(32101))
+ anItem.addContextMenuItems( [], replaceItems=True )
+ url = self._build_url({'mode': 'playallextras', 'foldername':
target, 'path': path})
+ xbmcplugin.addDirectoryItem(handle=self.addon_handle, url=url,
listitem=anItem, isFolder=False)
+
# Add each of the extras to the list to display
for anExtra in files:
# Create the list item
@@ -205,6 +212,22 @@ class MenuNavigator():
xbmcplugin.endOfDirectory(self.addon_handle)
+ # Play all the extras for a given movie or TV Show
+ def playAllExtras(self, path, target):
+ # Check if the use database setting is enabled
+ extrasDb = None
+ if Settings.isDatabaseEnabled():
+ extrasDb = ExtrasDB()
+
+ # Create the extras class that will be used to process the extras
+ videoExtras = VideoExtrasBase(path)
+
+ # Perform the search command
+ files = videoExtras.findExtras(extrasDb=extrasDb)
+
+ extrasPlayer = ExtrasPlayer()
+ extrasPlayer.playAll( files )
+
def playExtra(self, path, filename, forceResume=False, fromStart=False):
# Check if the use database setting is enabled
@@ -379,6 +402,19 @@ if __name__ == '__main__':
menuNav = MenuNavigator(base_url, addon_handle)
menuNav.showExtras(path[0], foldername[0])
+ elif mode[0] == 'playallextras':
+ log("VideoExtrasPlugin: Mode is PLAY ALL EXTRAS")
+
+ # Get the actual path that was navigated to
+ path = args.get('path', None)
+ foldername = args.get('foldername', None)
+
+ if (path != None) and (len(path) > 0) and (foldername != None) and
(len(foldername) > 0):
+ log("VideoExtrasPlugin: Path to play all extras for %s" % path[0])
+
+ menuNav = MenuNavigator(base_url, addon_handle)
+ menuNav.playAllExtras(path[0], foldername[0])
+
elif mode[0] == 'playextra':
log("VideoExtrasPlugin: Mode is PLAY EXTRA")
diff --git a/script.videoextras/resources/lib/settings.py
b/script.videoextras/resources/lib/settings.py
index 40359d9..a4b866d 100644
--- a/script.videoextras/resources/lib/settings.py
+++ b/script.videoextras/resources/lib/settings.py
@@ -40,7 +40,18 @@ def os_path_split( fullpath ):
# Remove the slash character
fullpath = fullpath[:-1]
- if "/" in fullpath:
+ try:
+ slash1 = fullpath.rindex("/")
+ except:
+ slash1 = -1
+
+ try:
+ slash2 = fullpath.rindex("\\")
+ except:
+ slash2 = -1
+
+ # Parse based on the last type of slash in the string
+ if slash1 > slash2:
return fullpath.rsplit("/", 1)
return fullpath.rsplit("\\", 1)
-----------------------------------------------------------------------
Summary of changes:
script.videoextras/.project | 18 +++++++++++++
script.videoextras/.pydevproject | 5 +++
script.videoextras/addon.xml | 2 +-
script.videoextras/changelog.txt | 5 +++
script.videoextras/default.py | 23 ++++++++++++++--
script.videoextras/plugin.py | 36 ++++++++++++++++++++++++++
script.videoextras/resources/lib/settings.py | 13 ++++++++-
7 files changed, 97 insertions(+), 5 deletions(-)
create mode 100644 script.videoextras/.project
create mode 100644 script.videoextras/.pydevproject
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons