mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 02:08:50 +01:00
Warehouse
This commit is contained in:
parent
9062cc8e9b
commit
557cd04b64
@ -59,7 +59,6 @@ class RPCStack:
|
|||||||
|
|
||||||
class LoadHousePage(Page):
|
class LoadHousePage(Page):
|
||||||
_FootMsg = ["Nav.","","","Back","Cancel"]
|
_FootMsg = ["Nav.","","","Back","Cancel"]
|
||||||
_DownloaderTimer = -1
|
|
||||||
_Value = 0
|
_Value = 0
|
||||||
_URL = None
|
_URL = None
|
||||||
_ListFontObj = MyLangManager.TrFont("varela18")
|
_ListFontObj = MyLangManager.TrFont("varela18")
|
||||||
@ -188,7 +187,6 @@ class LoadHousePage(Page):
|
|||||||
|
|
||||||
class ImageDownloadProcessPage(Page):
|
class ImageDownloadProcessPage(Page):
|
||||||
_FootMsg = ["Nav.","","","Back",""]
|
_FootMsg = ["Nav.","","","Back",""]
|
||||||
_DownloaderTimer = -1
|
|
||||||
_Value = 0
|
_Value = 0
|
||||||
_URL = None
|
_URL = None
|
||||||
_ListFontObj = MyLangManager.TrFont("varela13")
|
_ListFontObj = MyLangManager.TrFont("varela13")
|
||||||
@ -344,7 +342,9 @@ class Aria2DownloadProcessPage(Page):
|
|||||||
self._SizeLabel.Init("0/0Kb",MyLangManager.TrFont("varela12"))
|
self._SizeLabel.Init("0/0Kb",MyLangManager.TrFont("varela12"))
|
||||||
self._SizeLabel.SetColor( self._URLColor )
|
self._SizeLabel.SetColor( self._URLColor )
|
||||||
|
|
||||||
|
@property
|
||||||
def GObjectUpdateProcessInterval(self):
|
def GObjectUpdateProcessInterval(self):
|
||||||
|
downloaded = 0
|
||||||
if self._Screen.CurPage() == self and self._GID is not None:
|
if self._Screen.CurPage() == self and self._GID is not None:
|
||||||
self._Value = config.RPC.tellStatus(self._GID)
|
self._Value = config.RPC.tellStatus(self._GID)
|
||||||
|
|
||||||
@ -352,9 +352,9 @@ class Aria2DownloadProcessPage(Page):
|
|||||||
total = 0
|
total = 0
|
||||||
|
|
||||||
if self._Value["status"] == "waiting":
|
if self._Value["status"] == "waiting":
|
||||||
self._FileNameLabel.SetText( "waiting to download..." )
|
self._FileNameLabel.SetText("waiting to download...")
|
||||||
if self._Value["status"] == "paused":
|
if self._Value["status"] == "paused":
|
||||||
self._FileNameLabel.SetText( "download paused..." )
|
self._FileNameLabel.SetText("download paused...")
|
||||||
if self._Value["status"] == "error":
|
if self._Value["status"] == "error":
|
||||||
self._FileNameLabel.SetText("download errors,cancel it please")
|
self._FileNameLabel.SetText("download errors,cancel it please")
|
||||||
|
|
||||||
@ -362,17 +362,16 @@ class Aria2DownloadProcessPage(Page):
|
|||||||
downloaded = self._Value["completedLength"]
|
downloaded = self._Value["completedLength"]
|
||||||
total = self._Value["totalLength"]
|
total = self._Value["totalLength"]
|
||||||
|
|
||||||
downloaded = downloaded/1000.0/1000.0
|
downloaded = downloaded / 1000.0 / 1000.0
|
||||||
total = total/1000.0/1000.0
|
total = total / 1000.0 / 1000.0
|
||||||
|
|
||||||
self._SizeLabel.SetText( "%.2f" % downloaded+"/"+ "%.2f" % total +"Mb")
|
self._SizeLabel.SetText("%.2f" % downloaded+"/"+"%.2f" % total+"Mb")
|
||||||
|
|
||||||
print("Progress: %d%%" % (self._Value))
|
print("Progress: %d%%" % (self._Value))
|
||||||
self._Screen.Draw()
|
self._Screen.Draw()
|
||||||
self._Screen.SwapAndShow()
|
self._Screen.SwapAndShow()
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def CheckDownload(self,aria2_gid):
|
def CheckDownload(self,aria2_gid):
|
||||||
self._GID = aria2_gid
|
self._GID = aria2_gid
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user