Skip to content

Commit

Permalink
1.73 - changed to standallone plugin called from Mediaplayer submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
ims committed Jun 13, 2018
1 parent 8b19585 commit 98282b2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
6 changes: 5 additions & 1 deletion plugin/plugin.py
@@ -1,4 +1,8 @@
from Plugins.Plugin import PluginDescriptor

def main(session, service, **kwargs):
import ui
session.open(ui.MovieManager, service)

def Plugins(**kwargs):
return PluginDescriptor()
return PluginDescriptor(name=_("Movie manager"),description =_("Movie manager"), where=PluginDescriptor.WHERE_MOVIELIST, fnc=main)
28 changes: 14 additions & 14 deletions plugin/ui.py
Expand Up @@ -4,7 +4,7 @@

#
# Movie Manager - Plugin E2 for OpenPLi
VERSION = "1.72"
VERSION = "1.73"
# by ims (c) 2018 ims21@users.sourceforge.net
#
# This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -111,12 +111,12 @@ class MovieManager(Screen, HelpableScreen):
<widget name="description" position="140,368" zPosition="2" size="470,46" valign="center" halign="left" font="Regular;16" foregroundColor="white"/>
</screen>
"""
def __init__(self, session, list=None, current=None):
def __init__(self, session, service=None):
Screen.__init__(self, session)
HelpableScreen.__init__(self)
self.session = session
self.current = current[0] if current else None
self.mainList = list
self.current = service

self.setTitle(_("List of files") + ": %s" % config.movielist.last_videodir.value)
self.original_selectionpng = None
self.changePng()
Expand All @@ -128,16 +128,16 @@ def __init__(self, session, list=None, current=None):
self.size = 0
self.list = SelectionList([])
self.name = ""
if cfg.subdirs.value or not list:
self["config"] = self.list
info = current[1] if current else None
if info:
self.name = info and info.getName(current[0])
self.getData(config.movielist.last_videodir.value)
else:
self["config"] = self.parseMovieList(list, self.list)
self.sortList(int(cfg.sort.value))
self.position = self.newPositionIndex(self.position) if cfg.position.value else -1

def getName(service, path):
from enigma import eServiceCenter
serviceHandler = eServiceCenter.getInstance()
info = serviceHandler.info(service)
return info.getName(service)
path = service.getPath()
self.name = getName(service, path)
self["config"] = self.list
self.getData(config.movielist.last_videodir.value)

self["description"] = Label()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -3,7 +3,7 @@

pkg = 'Extensions.MovieManager'
setup (name = 'enigma2-plugin-extensions-moviemanager',
version = '1.72',
version = '1.73',
description = 'copy, move and delete more files at once',
packages = [pkg],
package_dir = {pkg: 'plugin'},
Expand Down

0 comments on commit 98282b2

Please sign in to comment.