Skip to content

Commit

Permalink
17.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dream-alpha committed Nov 10, 2023
1 parent 35b4a19 commit 9b38dc1
Show file tree
Hide file tree
Showing 24 changed files with 256 additions and 71 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: 16.0.14
Version: 17.0.3
Architecture: all
Depends: python-imaging, python-twisted, python-mutagen, ffmpeg, python-merlinpictureviewer, python-merlinmusicplayer, enigma2-plugin-systemplugins-mountcockpit, enigma2-plugin-systemplugins-componentscockpit
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
[![Gemfury](https://badge.fury.io/fp/gemfury.svg)](https://gemfury.com/f/partner)

# MediaCockpit (MDC)
## Functions

![Screenshot](mdc1.png)

![Screenshot](mdc2.png)

# Functions
- MDC is a plugin for browsing media files on DreamOs receivers
- Manual picture rotation
- Automatic picture rotation using Exif data
Expand Down
Binary file added mdc1.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 mdc2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions po/MediaCockpit.pot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ msgstr ""
"X-Poedit-SearchPath-0: .\n"
"#-#-#-#-# de.po (MediaCockpit) #-#-#-#-#\n"
"Project-Id-Version: MediaCockpit\n"
"POT-Creation-Date: 2023-10-18 17:50+0200\n"
"POT-Creation-Date: 2023-11-08 14:23+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: dream-alpha\n"
"Language-Team: \n"
Expand Down Expand Up @@ -108,6 +108,9 @@ msgstr ""
msgid "Select function"
msgstr ""

msgid "Reload cache"
msgstr ""

msgid "About"
msgstr ""

Expand Down Expand Up @@ -470,9 +473,6 @@ msgstr ""
msgid "Home"
msgstr ""

msgid "Reload files"
msgstr ""

msgid "Exit"
msgstr ""

Expand Down
10 changes: 5 additions & 5 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ msgstr ""
"X-Poedit-SearchPath-0: .\n"
"#-#-#-#-# de.po (MediaCockpit) #-#-#-#-#\n"
"Project-Id-Version: MediaCockpit\n"
"POT-Creation-Date: 2023-10-18 17:50+0200\n"
"POT-Creation-Date: 2023-11-08 14:23+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: dream-alpha\n"
"Language-Team: \n"
Expand Down Expand Up @@ -111,6 +111,9 @@ msgstr "Bitte warten"
msgid "Select function"
msgstr "Funktionen"

msgid "Reload cache"
msgstr "Datei-Cache neu laden"

msgid "About"
msgstr "Über"

Expand Down Expand Up @@ -296,7 +299,7 @@ msgstr ""
"werden?"

msgid "Tile selection background color"
msgstr "Hintergrundfarbe für auswählte Kachel"
msgstr "Hintergrundfarbe für ausgewählte Kachel"

msgid "Select the tile selection background color."
msgstr ""
Expand Down Expand Up @@ -494,9 +497,6 @@ msgstr "Löschen"
msgid "Home"
msgstr "Anfang"

msgid "Reload files"
msgstr "Dateien neu laden"

msgid "Exit"
msgstr "Beenden"

Expand Down
1 change: 1 addition & 0 deletions src/CockpitContextMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def __init__(self, session, csel):
menu = []
self.setTitle(_("Select function"))
menu.append((_("Bookmarks"), (csel.openBookmarks, True)))
menu.append((_("Reload cache"), (csel.reloadFiles, True)))
menu.append((_("Setup"), (csel.openConfigScreen, True)))
menu.append((_("About"), (boundFunction(about, session), True)))
self["menu"] = List(menu)
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigInit.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(self):
config.plugins.mediacockpit.thumbnail_size_height = ConfigInteger(default=0)
config.plugins.mediacockpit.show_dirup_tile = ConfigYesNo(default=True)
config.plugins.mediacockpit.selection_size_offset = ConfigInteger(default=10, limits=(0, 50))
config.plugins.mediacockpit.selection_font_offset = ConfigInteger(default=2, limits=(1, 10))
config.plugins.mediacockpit.selection_font_offset = ConfigInteger(default=2, limits=(0, 10))
config.plugins.mediacockpit.normal_background_color = ConfigSelection(default="#20294071", choices=choices_color + [("#20294071", _("default"))])
config.plugins.mediacockpit.selection_background_color = ConfigSelection(default="#204176b6", choices=choices_color + [("#204176b6", _("default"))])
config.plugins.mediacockpit.normal_foreground_color = ConfigSelection(default="#eeeeee", choices=choices_color + [("#eeeeee", _("default"))])
Expand Down
8 changes: 6 additions & 2 deletions src/MediaCockpit.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from Components.config import config
from Components.Sources.StaticText import StaticText
from Components.Label import Label
from Components.Button import Button
from enigma import getDesktop
from Plugins.SystemPlugins.MountCockpit.MountCockpit import MountCockpit
from .__init__ import _
Expand Down Expand Up @@ -82,7 +83,10 @@ def __init__(self, session):
self["lcd_info"] = StaticText()
self["lcd_title"] = StaticText()

self["no_support"] = Label()
self["key_red"] = Button(_("Delete file"))
self["key_green"] = Button(_("HOME"))
self["key_yellow"] = Button(_("Reload cache"))
self["key_blue"] = Button(_("Bookmarks"))

Screen.__init__(self, session)
HelpableScreen.__init__(self)
Expand All @@ -108,7 +112,7 @@ def __init__(self, session):
"MENU": (self.openContextMenu, _("Context menu")),
"RED": (self.deleteFile, _("Delete file")),
"GREEN": (self.goHome, _("Home")),
"YELLOW": (self.reloadFiles, _("Reload files")),
"YELLOW": (self.reloadFiles, _("Reload cache")),
"BLUE": (self.openBookmarks, _("Bookmarks")),
"EXIT": (self.exit, _("Exit")),
"POWER": (self.exit, _("Exit")),
Expand Down
36 changes: 35 additions & 1 deletion src/Slideshow.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from Components.Sources.StaticText import StaticText
from Components.Label import Label
from Components.Pixmap import Pixmap
from Components.Button import Button
from Components.config import config
from Components.ScreenAnimations import ScreenAnimations
try:
Expand All @@ -37,7 +38,7 @@
merlin_picture_viewer = False
from Tools.Directories import resolveFilename, SCOPE_PLUGINS
from Tools.LoadPixmap import LoadPixmap
from enigma import eTimer, getDesktop, gPixmapPtr
from enigma import ePoint, eSize, eTimer, getDesktop, gPixmapPtr
try:
from enigma import eAlsaOutput
except ImportError as e:
Expand Down Expand Up @@ -78,6 +79,11 @@ def __init__(self, session, file_list, file_index, start_slideshow=False, song_l
self["lcd_info"] = StaticText()
self["lcd_title"] = StaticText()

self["key_red"] = Button(_("Exit"))
self["key_green"] = Button(_("Slideshow"))
self["key_yellow"] = Button(_("Rotate picture"))
self["key_blue"] = Button(_("Toggle Transition"))

Screen.__init__(self, session)
HelpableScreen.__init__(self)
self.skinName = getSkinName(self.__class__.__name__)
Expand All @@ -87,6 +93,7 @@ def __init__(self, session, file_list, file_index, start_slideshow=False, song_l
self,
"CockpitActions",
{
"OK": (self.toggleButtons, _("Toggle buttons")),
"INFO": (self.openInfo, _("Information")),
"PLAY": (self.playpause, _("Play/Pause") + " " + _("Slideshow")),
"STOP": (self.stop, _("Stop video/slideshow")),
Expand All @@ -96,6 +103,7 @@ def __init__(self, session, file_list, file_index, start_slideshow=False, song_l
"LEFTR": (self.left, _("Previous picture")),
"EXIT": (self.exit, _("Exit")),
"RED": (self.exit, _("Exit")),
"GREEN": (self.playpause, _("Slideshow")),
"YELLOW": (self.yellow, _("Rotate picture")),
"BLUE": (self.toggleTransitionMode, _("Toggle transition")),
},
Expand Down Expand Up @@ -147,6 +155,27 @@ def __init__(self, session, file_list, file_index, start_slideshow=False, song_l
if getBoxType().startswith("dream"):
eAlsaOutput.getInstance().close()

def showButtons(self):
logger.info("...")
size = self["picture"].instance.size()
self["picture"].instance.resize(eSize(size.width() * 9 / 10, size.height() * 9 / 10))
self["picture"].instance.move(ePoint(self.desktop_size.width() / 10 / 2, 25))
self["picture_background"].hide()

def hideButtons(self):
logger.info("...")
size = self["picture"].instance.size()
self["picture"].instance.resize(eSize(self.desktop_size.width(), self.desktop_size.height()))
self["picture"].instance.move(ePoint(0, 0))
self["picture_background"].show()


def toggleButtons(self):
if self.desktop_size.width() == self["picture"].instance.size().width():
self.showButtons()
else:
self.hideButtons()

def displayLCD(self, title, info):
# logger.debug("title: %s, info: %s", title, info)
self["lcd_title"].setText(title)
Expand All @@ -172,13 +201,16 @@ def __onLayoutFinish(self):
self["image"].scaleToScreen(True)
self.setSlideshowAnimation(self.animation)
if self.start_slideshow:
self["image"].show()
self.start_slideshow = False
if self.song_list:
self["image"].hide()
shuffle(self.song_index_list)
self.playSong(self.song_list[self.song_index_list[self.song_index]])
logger.debug("song_index: %s, song_list: %s", self.song_index, self.song_list)
self.playpause()
else:
self["image"].hide()
self.showSlide()
else:
self.close(self.file_index)
Expand Down Expand Up @@ -401,11 +433,13 @@ def playpause(self):
logger.debug("...")
self.slideshow_active = not self.slideshow_active
if self.slideshow_active:
self["image"].show()
self.showSlide()
else:
self.slide_timer.stop()
self.stopVideo()
self.showLCDInfo()
self["image"].hide()

def openInfo(self):
if not self.slideshow_active and self.file[FILE_IDX_TYPE] in FILE_TYPE_FILE:
Expand Down
4 changes: 4 additions & 0 deletions src/Tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def selectTile(self, tile_pos):
self.csel[tile_element % tile_pos].instance.setBackgroundColor(self.selection_background_color)
self.csel[tile_element % tile_pos].instance.setForegroundColor(self.selection_foreground_color)
self.csel["Text%d" % tile_pos].instance.setFont(gFont(self.font_family, self.font_size + self.selection_font_offset))
pos = self.csel["Text%d" % tile_pos].instance.position()
self.csel["Text%s" % tile_pos].move(ePoint(pos.x(), pos.y() + self.selection_size_offset))
self.last_tile_pos = tile_pos

def unselectTile(self, tile_pos):
Expand All @@ -120,6 +122,8 @@ def unselectTile(self, tile_pos):
self.csel[tile_element % tile_pos].instance.setBackgroundColor(self.normal_background_color)
self.csel[tile_element % tile_pos].instance.setForegroundColor(self.normal_foreground_color)
self.csel["Text%d" % tile_pos].instance.setFont(gFont(self.font_family, self.font_size))
pos = self.csel["Text%d" % tile_pos].instance.position()
self.csel["Text%s" % tile_pos].move(ePoint(pos.x(), pos.y() - self.selection_size_offset))
self.last_tile_pos = -1

def displayLCD(self, _file_of_files, _path):
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 = "16.0.14"
VERSION = "17.0.3"
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."
Binary file modified src/locale/de/LC_MESSAGES/MediaCockpit.mo
Binary file not shown.
1 change: 1 addition & 0 deletions src/skin/Default-FHD/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<colors>
<color name="darkblue" value="#000d1940"/>
<color name="darkgrey" value="#141414"/>
<color name="mediumgrey" value="#808080"/>
</colors>
<listboxcontent>
<config offPixmap="skin_default/switch_off.svg" onPixmap="skin_default/switch_on.svg" size="60,32"/>
Expand Down
1 change: 1 addition & 0 deletions src/skin/Default-HD/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<colors>
<color name="darkblue" value="#000d1940"/>
<color name="darkgrey" value="#141414"/>
<color name="mediumgrey" value="#808080"/>
</colors>
<listboxcontent>
<config offPixmap="skin_default/switch_off.svg" onPixmap="skin_default/switch_on.svg" size="40,21"/>
Expand Down
1 change: 1 addition & 0 deletions src/skin/Default-WQHD/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<colors>
<color name="darkblue" value="#000d1940"/>
<color name="darkgrey" value="#141414"/>
<color name="mediumgrey" value="#808080"/>
</colors>
<listboxcontent>
<config offPixmap="skin_default/switch_off.svg" onPixmap="skin_default/switch_on.svg" size="80,43"/>
Expand Down
1 change: 1 addition & 0 deletions src/skin/Other-WQHD/skin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<colors>
<color name="darkblue" value="#000d1940"/>
<color name="darkgrey" value="#141414"/>
<color name="mediumgrey" value="#808080"/>
</colors>
<listboxcontent>
<config offPixmap="skin_default/switch_off.svg" onPixmap="skin_default/switch_on.svg" size="80,43"/>
Expand Down
9 changes: 8 additions & 1 deletion src/skin/Shadow-FHD/colors.xmlinc
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<colors>
<color name="white" value="#ffffff"/>
<color name="grey" value="#bababa"/>
<color name="grey1" value="#e0e0e0"/>
<color name="grey2" value="#c0c0c0"/>
<color name="grey3" value="#a0a0a0"/>
<color name="grey4" value="#808080"/>
<color name="grey5" value="#606060"/>
<color name="grey6" value="#404040"/>
<color name="grey7" value="#202020"/>
<color name="white" value="#ffffff"/>
<color name="black" value="#000000"/>
<color name="dark" value="#212121"/>
<color name="red" value="#ff0000"/>
Expand Down
6 changes: 6 additions & 0 deletions src/skin/Shadow-FHD/screen_MediaCockpit.xmlinc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<screen backgroundColor="background" flags="wfNoBorder" name="MDCMediaCockpit" position="center,center" size="1920,1080">
<xmlinc file="screenpart_Background"/>
<widget font="Regular;30" name="osd_info" noWrap="1" position="55,20" size="1650,35"/>
<xmlinc file="screenpart_Tiles" position="60,90"/>
<xmlinc file="screenpart_4Buttons_name" position="0,1030" width="480"/>
</screen>
7 changes: 7 additions & 0 deletions src/skin/Shadow-FHD/screen_Slideshow.xmlinc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<screen flags="wfNoBorder" name="MDCSlideshow" position="0,0" size="1920,1080">
<widget name="image" position="0,0" size="1920,1080" zPosition="3"/>
<widget name="picture_background" position="0,0" size="1920,1080" zPosition="1"/>
<widget name="picture" position="0,0" size="1920,1080" zPosition="2"/>
<widget font="Regular;20" halign="left" name="osd_info" noWrap="1" position="20,10" size="1885,25" transparent="1" zPosition="2"/>
<xmlinc file="screenpart_4Buttons_name" position="0,1030" width="480"/>
</screen>
Loading

0 comments on commit 9b38dc1

Please sign in to comment.