Skip to content

Commit

Permalink
autooff to the future
Browse files Browse the repository at this point in the history
  • Loading branch information
oottppxx authored and oottppxx committed Apr 13, 2024
1 parent 2ceb21a commit 3a17d2a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
3 changes: 1 addition & 2 deletions plugins/autooff/src/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
PKG_NAME=$(grep OE control.tmpl | cut -d" " -f2)
CONTROL_FILES="postrm postinst preinst"
DATA_PATH=/usr/lib/enigma2/python/Plugins/Extensions/AutoOff
DATA_FILES="README.txt autooff.png plugin.pyo __init__.pyo setup.xml"
DATA_FILES="README.txt autooff.png plugin.py __init__.py setup.xml"
VERSION_FILE=plugin.py
VERSION=$(grep VERSION= ${VERSION_FILE} | cut -d= -f2 | tr -d \')

rm -rf ipk
rm -rf control.tar.gz data.tar.gz ${PKG_NAME}*ipk
mkdir -p ipk/${DATA_PATH}
touch plugin.py __init__.py
python -O -m compileall plugin.py __init__.py
cp ${DATA_FILES} ipk/${DATA_PATH}
cat control.tmpl | sed "s#VERSION#${VERSION}#g" > control
tar czvf control.tar.gz control ${CONTROL_FILES}
Expand Down
8 changes: 5 additions & 3 deletions plugins/autooff/src/plugin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import print_function

openatv_like = True
try:
# This works in OpenATV (and similar code bases) but fails on OpenPLi.
Expand Down Expand Up @@ -33,7 +35,7 @@
from Components.config import configfile


PLUGIN_VERSION='6.2.0g'
PLUGIN_VERSION='6.2.0h'
PLUGIN_NAME='AutoOff'
PLUGIN_DESC='Stop On Standby'
PLUGIN_ICON='autooff.png'
Expand Down Expand Up @@ -81,7 +83,7 @@ def DEBUG(s):
f = open(DEBUG_FILE, 'a+')
f.write(s)
f.close()
print s
print(s)

SLEEP_TIME=2
THREAD=None
Expand Down Expand Up @@ -214,7 +216,7 @@ def bootCmd():


def autoStart(reason, **kwargs):
print 'AutoOff autostart!'
print('AutoOff autostart!')
onSetupClose()


Expand Down

0 comments on commit 3a17d2a

Please sign in to comment.