Skip to content

Commit

Permalink
Merge pull request #804 from MrServo/master
Browse files Browse the repository at this point in the history
[CleverTanken] tiny improvement
  • Loading branch information
jbleyel authored Aug 21, 2024
2 parents 7427ea6 + 126f67a commit e312ebd
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions CleverTanken/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ def moveInfo(self, xpos, ypos):
self.instance.move(ePoint(xpos, ypos))


class CTchoicebox(Screen):
pass # future option


class CTmain(Screen, CTglobs):
skin = """
<screen name="CleverTankenMain" position="center,center" size="1863,1032" resolution="1920,1080" title="" flags="wfNoBorder">
Expand Down Expand Up @@ -354,9 +350,9 @@ def makeFavoriteView(self, output):
break
rawentry = self.searchOneValue(r'<div class="price-footer row col-12 text text-color-ice-blue d-flex flex-column">(.*?)</div>', output, "", flag_S=True)
pcngtype, pcngdate, pcngdur = ("geändert", "unbekannt", "unbekannt")
for last in rawentry.replace("<span>", "").replace("</span>", "").strip().split("\n"):
part = last.split(": ")
pcngdate, pcngdur = part[1].split(" ") if len(part) > 1 else ("unbekannt", "unbekannt")
changes = rawentry.replace("<span>", "").replace("</span>", "").strip().split("\n")
part = changes[0].split(": ") if changes else [] # changes[0] = Letzte MTS-K Preisänderung, changes[1] = Letzte Aktualisierung
pcngdate, pcngdur = part[1].split(" ") if len(part) > 1 else ("unbekannt", "unbekannt")
pricealert = self.createPricealert(price, self.sprit["B"])
self.framefavs.append(tuple((ident, price[0], price[1], pcngtype, pcngdate, pcngdur, name, street, f"{zipcode} {city}", "", "♥", pricealert)))
if len(self.framefavs) == len(self.favlist): # all favorites downloaded?
Expand Down

0 comments on commit e312ebd

Please sign in to comment.