mirror of
https://github.com/pkali/piradio-mini.git
synced 2026-05-20 22:34:22 +02:00
New place for version number (better update procedure?)
This commit is contained in:
+6
-2
@@ -51,6 +51,7 @@ TimerFile = RadioLibDir + "/timer"
|
|||||||
AlarmFile = RadioLibDir + "/alarm"
|
AlarmFile = RadioLibDir + "/alarm"
|
||||||
StreamFile = RadioLibDir + "/streaming"
|
StreamFile = RadioLibDir + "/streaming"
|
||||||
BoardRevisionFile = RadioLibDir + "/boardrevision"
|
BoardRevisionFile = RadioLibDir + "/boardrevision"
|
||||||
|
VersionFile = "/usr/share/radio/version"
|
||||||
|
|
||||||
log = Log()
|
log = Log()
|
||||||
translate = Translate()
|
translate = Translate()
|
||||||
@@ -113,6 +114,7 @@ class Radio:
|
|||||||
ONEDAYSECS = 86400 # Day in seconds
|
ONEDAYSECS = 86400 # Day in seconds
|
||||||
ONEDAYMINS = 1440 # Day in minutes
|
ONEDAYMINS = 1440 # Day in minutes
|
||||||
|
|
||||||
|
version = "0.0"
|
||||||
boardrevision = 2 # Raspberry board version type
|
boardrevision = 2 # Raspberry board version type
|
||||||
udphost = 'localhost' # Remote IR listener UDP Host
|
udphost = 'localhost' # Remote IR listener UDP Host
|
||||||
udpport = 5100 # Remote IR listener UDP port number
|
udpport = 5100 # Remote IR listener UDP port number
|
||||||
@@ -187,7 +189,6 @@ class Radio:
|
|||||||
pandora_search_index = 0
|
pandora_search_index = 0
|
||||||
loadnew = False # Load new track from search
|
loadnew = False # Load new track from search
|
||||||
streaming = False # Streaming (Icecast) disabled
|
streaming = False # Streaming (Icecast) disabled
|
||||||
VERSION = "5.4c" # Version number
|
|
||||||
|
|
||||||
ADAFRUIT = 1 # I2C backpack type AdaFruit
|
ADAFRUIT = 1 # I2C backpack type AdaFruit
|
||||||
PCF8574 = 2 # I2C backpack type PCF8574
|
PCF8574 = 2 # I2C backpack type PCF8574
|
||||||
@@ -220,6 +221,9 @@ class Radio:
|
|||||||
if not os.path.isfile(CurrentStationFile):
|
if not os.path.isfile(CurrentStationFile):
|
||||||
self.execCommand ("mkdir -p " + RadioLibDir )
|
self.execCommand ("mkdir -p " + RadioLibDir )
|
||||||
|
|
||||||
|
# Get version from file
|
||||||
|
self.version = self.readFromFile(VersionFile) # (Pecus)
|
||||||
|
|
||||||
# Initialise configuration files from ConfigFiles list
|
# Initialise configuration files from ConfigFiles list
|
||||||
for file in self.ConfigFiles:
|
for file in self.ConfigFiles:
|
||||||
value = self.ConfigFiles[file]
|
value = self.ConfigFiles[file]
|
||||||
@@ -2506,7 +2510,7 @@ class Radio:
|
|||||||
|
|
||||||
# Version number
|
# Version number
|
||||||
def getVersion(self):
|
def getVersion(self):
|
||||||
return self.VERSION
|
return self.version
|
||||||
|
|
||||||
# Get the the backlight color number (option = bg_color etc)
|
# Get the the backlight color number (option = bg_color etc)
|
||||||
def getBackColor(self,option):
|
def getBackColor(self,option):
|
||||||
|
|||||||
Reference in New Issue
Block a user