Skip to content

Commit

Permalink
15.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dream-alpha committed Jul 11, 2023
1 parent 4c95699 commit df23037
Show file tree
Hide file tree
Showing 19 changed files with 336 additions and 59 deletions.
2 changes: 1 addition & 1 deletion CONTROL/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Description: MediaCockpit
Maintainer: dream-alpha
Package: enigma2-plugin-extensions-mediacockpit
Version: 15.0.6
Version: 15.1.4
Architecture: all
Depends: python-imaging, python-twisted, python-mutagen, ffmpeg, python-merlinpictureviewer, python-merlinmusicplayer, enigma2-plugin-systemplugins-mountcockpit, enigma2-plugin-systemplugins-componentscockpit
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ The installation script will also install a feed source that enables a convenien
## Links
- Package feed: https://gemfury.com/dream-alpha
- Wiki: https://github.com/dream-alpha/MediaCockpit/wiki
- Support thread: https://dreambox.de/board/index.php?thread/24581-mediacockpit/&postID=211507&highlight=MediaCockpit#post211507
- Support thread: https://github.com/dream-alpha/MediaCockpit/discussions
5 changes: 3 additions & 2 deletions src/CockpitPlayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from Screens.Screen import Screen
from Screens.HelpMenu import HelpableScreen
from Screens.MessageBox import MessageBox
from Screens.InfoBarGenerics import InfoBarAudioSelection, InfoBarShowHide, InfoBarNotifications, Notifications
from Screens.InfoBarGenerics import InfoBarAudioSelection, InfoBarShowHide, InfoBarNotifications, Notifications, InfoBarSubtitleSupport
from ServiceReference import ServiceReference
from .Debug import logger
from .__init__ import _
Expand All @@ -50,7 +50,7 @@ def __init__(self, session, parent):


class CockpitPlayer(
Screen, HelpableScreen, InfoBarBase, InfoBarNotifications, InfoBarShowHide, InfoBarAudioSelection,
Screen, HelpableScreen, InfoBarBase, InfoBarNotifications, InfoBarShowHide, InfoBarAudioSelection, InfoBarSubtitleSupport,
CockpitCueSheet, CockpitSeek, CockpitPVRState, CutList):

ENABLE_RESUME_SUPPORT = False
Expand All @@ -73,6 +73,7 @@ def __init__(self, session, service, config_plugins_plugin, leave_on_eof=False,
InfoBarBase.__init__(self)
InfoBarAudioSelection.__init__(self)
InfoBarNotifications.__init__(self)
InfoBarSubtitleSupport.__init__(self)
CockpitCueSheet.__init__(self, service)
CutList.__init__(self)

Expand Down
12 changes: 0 additions & 12 deletions src/Debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
# <http://www.gnu.org/licenses/>.


import os
import sys
import time
import logging
from Components.config import config, ConfigSubsection, ConfigDirectory, ConfigSelection # noqa: F401, pylint: disable=W0611
from .Version import ID, PLUGIN
Expand Down Expand Up @@ -54,13 +52,3 @@ def setLogLevel(level):
logger.setLevel(level)
streamer.setLevel(level)
logger.info("level: %s", level)


def createLogFile():
log_dir = eval("config.plugins." + plugin + ".debug_log_path").value
log_file = os.path.join(log_dir, ID + "_" + time.strftime("%Y%m%d_%H%M%S" + ".log"))
logger.info("log_file: %s", log_file)
if os.path.exists(log_dir):
os.popen("journalctl | grep " + ID + " > " + log_file)
else:
logger.error("log dir does not exist: %s", log_dir)
5 changes: 4 additions & 1 deletion src/MediaCockpit.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ def deleteFileCallback(self, answer=None):
deleteFiles(filename + ".*")
del self.file_list[self.file_index]
self.saveMetaList(os.path.dirname(path), self.file_list)
self.last_path = self.file_list[self.file_index][FILE_IDX_PATH]
if self.file_index < len(self.file_list):
self.last_path = self.file_list[self.file_index][FILE_IDX_PATH]
else:
self.last_path = self.current_dir
self.paintTiles()
else:
logger.info("%s not a file", afile[FILE_IDX_PATH])
Expand Down
1 change: 1 addition & 0 deletions src/ServiceCenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def __init__(self, service):
self.event_start_time = self.recording_start_time = int(os.stat(self.path).st_ctime)
else:
self.event_start_time = self.recording_start_time = 0
self.name = os.path.basename(self.path)

def getName(self):
# EventName NAME
Expand Down
21 changes: 13 additions & 8 deletions src/SkinUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,22 @@ def getSkinPath(file_name):
logger.debug(">>> file_name: %s", file_name)
base_skin_dir = "/usr/share/enigma2"
sub_skin_dir = os.path.dirname(config.skin.primary_skin.value)
logger.debug("sub_skin_dir: %s", sub_skin_dir)
resolution = getResolution()
logger.debug("resolution: %s, sub_skin_dir: %s", resolution, sub_skin_dir)
if not sub_skin_dir:
sub_skin_dir = "Default-HD"
elif sub_skin_dir == "Shadow-FHD":
pass
elif sub_skin_dir == "Zombi-Shadow-FHD":
sub_skin_dir = "Shadow-FHD"
elif sub_skin_dir == "Shadow-WQHD":
sub_skin_dir = "Default-WQHD"
elif resolution == "FHD":
if sub_skin_dir in ["Shadow-FHD", "Zombi-Shadow-FHD"]:
sub_skin_dir = "Shadow-FHD"
else:
sub_skin_dir = "Default-FHD"
elif resolution == "WQHD":
if sub_skin_dir in ["Shadow-WQHD", "Default-WQHD"]:
sub_skin_dir = "Default-WQHD"
else:
sub_skin_dir = "Other-WQHD"
else:
sub_skin_dir = "Default-" + getResolution()
sub_skin_dir = "Default-HD"

dirs = [
os.path.join(resolveFilename(SCOPE_PLUGINS), "Extensions", PLUGIN, "skin", sub_skin_dir),
Expand Down
2 changes: 1 addition & 1 deletion src/Version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@

PLUGIN = "MediaCockpit"
ID = "MDC"
VERSION = "15.0.6"
VERSION = "15.1.4"
COPYRIGHT = "2018-2023 by dream-alpha"
LICENSE = "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version."
8 changes: 1 addition & 7 deletions src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@
# <http://www.gnu.org/licenses/>.


import os
from Plugins.Plugin import PluginDescriptor
from Plugins.SystemPlugins.MountCockpit.MountCockpit import MountCockpit
from Components.config import config
from .__init__ import _
from .Debug import logger, createLogFile
from .Debug import logger
from .SkinUtils import loadPluginSkin
from .Version import ID, VERSION
from .MediaCockpit import MediaCockpit
from .ConfigInit import ConfigInit
from .FileUtils import deleteFile, touchFile


def openMediaCockpit(session, **__):
Expand All @@ -42,21 +40,17 @@ def autoStart(reason, **kwargs):
if "session" in kwargs:
logger.info("+++ Version: %s starts...", VERSION)
# session = kwargs["session"]
touchFile("/etc/enigma2/.mdc")
MountCockpit.getInstance().registerBookmarks(ID, config.plugins.mediacockpit.bookmarks.value)
loadPluginSkin("skin.xml")
elif reason == 1: # shutdown
logger.info("--- shutdown")
deleteFile("/etc/enigma2/.mdc")
else:
logger.info("reason not handled: %s", reason)


def Plugins(**__):
logger.info("+++ Plugins")
ConfigInit()
if os.path.exists("/etc/enigma2/.mdc"):
createLogFile()
descriptors = [
PluginDescriptor(
name="MediaCockpit",
Expand Down
22 changes: 11 additions & 11 deletions src/skin/Default-WQHD/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,33 +61,33 @@
</widget>
</screen>
<screen backgroundColor="transparent" flags="wfNoBorder" name="MDCCockpitPlayer" position="center,center" size="2560,1440">
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="HeaderForeground" halign="center" position="2440,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="UHD" valign="center">
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="white" halign="center" position="2440,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="UHD" valign="center">
<convert type="ServiceInfo">VideoWidth</convert>
<convert type="ValueRange">2160,4320</convert>
<convert type="ConditionalShowHide"/>
</widget>
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="HeaderForeground" halign="center" position="2440,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="FHD" valign="center">
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="white" halign="center" position="2440,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="FHD" valign="center">
<convert type="ServiceInfo">VideoWidth</convert>
<convert type="ValueRange">1920,2159</convert>
<convert type="ConditionalShowHide"/>
</widget>
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="HeaderForeground" halign="center" position="2440,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="HD" valign="center">
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="white" halign="center" position="2440,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="HD" valign="center">
<convert type="ServiceInfo">VideoWidth</convert>
<convert type="ValueRange">1280,1919</convert>
<convert type="ConditionalShowHide"/>
</widget>
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="HeaderForeground" halign="center" position="2440,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="qHD" valign="center">
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="white" halign="center" position="2440,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="qHD" valign="center">
<convert type="ServiceInfo">VideoWidth</convert>
<convert type="ValueRange">960,1279</convert>
<convert type="ConditionalShowHide"/>
</widget>
<eLabel backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="HeaderForeground" halign="center" position="2440,1340" size="80,80" text="SD" valign="center" zPosition="-1"/>
<eLabel backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="HeaderForeground" halign="center" position="2330,1340" size="80,80" text="4:3" valign="center"/>
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="HeaderForeground" halign="center" position="2330,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="16:9" valign="center" zPosition="1">
<eLabel backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="white" halign="center" position="2440,1340" size="80,80" text="SD" valign="center" zPosition="-1"/>
<eLabel backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="white" halign="center" position="2330,1340" size="80,80" text="4:3" valign="center"/>
<widget backgroundColor="CursorBackground" cornerDia="80" font="Regular;34" foregroundColor="white" halign="center" position="2330,1340" render="FixedLabel" size="80,80" source="session.CurrentService" text="16:9" valign="center" zPosition="1">
<convert type="ServiceInfo">IsWidescreen</convert>
<convert type="ConditionalShowHide"/>
</widget>
<eLabel backgroundColor="transpNo" cornerDia="80" position="40,1340" size="155,80" zPosition="-1"/>
<eLabel backgroundColor="background" cornerDia="80" position="40,1340" size="155,80" zPosition="-1"/>
<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCockpit/skin/images/dolbydigital_off.svg" position="65,1358" size="105,46"/>
<widget pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCockpit/skin/images/dolbydigital.svg" position="65,1358" render="Pixmap" size="105,46" source="session.CurrentService" zPosition="1">
<convert type="ServiceInfo">IsMultichannel</convert>
Expand All @@ -109,11 +109,11 @@
<widget font="Regular;56" noWrap="1" position="140,1200" render="Label" shadowBlur="10.0" shadowColor="black" size="2360,65" source="Service" transparent="1">
<convert type="COCEventName">Name</convert>
</widget>
<eLabel backgroundColor="transpNo" cornerDia="70" halign="center" position="2360,30" size="160,80" zPosition="-1"/>
<eLabel backgroundColor="background" cornerDia="70" halign="center" position="2360,30" size="160,80" zPosition="-1"/>
<widget backgroundColor="listbg" font="Bold;40" halign="center" position="2360,50" render="Label" size="160,40" source="global.CurrentTime" transparent="1">
<convert type="ClockToText">Default</convert>
</widget>
<eLabel backgroundColor="transpNo" cornerDia="70" halign="center" position="2360,1190" size="160,80" zPosition="-1"/>
<eLabel backgroundColor="background" cornerDia="70" halign="center" position="2360,1190" size="160,80" zPosition="-1"/>
<widget backgroundColor="listbg" font="Bold;40" halign="center" position="2360,1210" render="Label" size="160,40" source="Service" transparent="1">
<convert type="COCServicePosition">EndTime,ShowNoSeconds</convert>
</widget>
Expand All @@ -128,7 +128,7 @@
</widget>
</screen>
<screen id="3" name="MDCCockpitPlayerSummary" position="0,0" size="400,240">
<ePixmap pixmap="skin_default/display_bg.png" position="0,0" size="400,240" zPosition="-1"/>
<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCockpit/skin/images/backdrop.png" position="0,0" size="400,240" zPosition="-1"/>
<widget font="Display;60" halign="center" position="5,5" render="Label" size="390,125" source="parent.Service" transparent="1" valign="center">
<convert type="COCEventName">Name</convert>
</widget>
Expand Down
2 changes: 1 addition & 1 deletion src/skin/Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SUBDIRS = images Default-HD Default-FHD Default-WQHD Shadow-FHD
SUBDIRS = images Default-HD Default-FHD Shadow-FHD Default-WQHD Other-WQHD
3 changes: 3 additions & 0 deletions src/skin/Other-WQHD/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SUBDIRS = images
installdir = $(libdir)/enigma2/python/Plugins/Extensions/MediaCockpit/skin/Other-WQHD
install_DATA = *.xml
2 changes: 2 additions & 0 deletions src/skin/Other-WQHD/images/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
installdir = $(libdir)/enigma2/python/Plugins/Extensions/MediaCockpit/skin/Other-WQHD/images
install_DATA = *.png
Binary file added src/skin/Other-WQHD/images/progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/skin/Other-WQHD/images/progress_before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/skin/Other-WQHD/images/progress_rec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit df23037

Please sign in to comment.