iFlatFHD v7.1.0 (20200518) - ab VTI 14.x

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Spätestens jetzt sollte man mal über eine Fernbedienung von Logitech nachdenken.
      Damit entfällt der Wechsel der Fernbedienungen und damit natürlich auch die "viele Arbeit". :D

      Gruß
      Databox
      Gruß
      Databox
    • Auch die Fernbedienung der Solo² is ja eine Universal-Fernbedienung (Type 2). Ich regele damit z.B. die Lautstärke über den TV, an dem per HDMI-CEC die Soundbar hängt... man kann eben die Vol+/-/mute Tasten auf den TV programmieren... könnte auch mit nem AVR, denke ich.
      Alternativ gibt es bestimmt schon einige Skinparts für "Mute" ;)
    • Hallo jeder Körper.
      Ich möchte die meteorologischen Begriffe von iFlatVWeather2.py ins Französische übersetzen.
      Aber ich kann die Datei in der Struktur von VTI nicht finden oder lokalisieren
      Kannst du mir den Weg sagen?

      Danke
      Spoiler anzeigen

      Vu+ Ultimo 4K & Vu+ DUO 4K SE ;; 2 or 1 DVB-S NIM(45308X FBC) (DVB-S2X) und DVB-T NIM(TT3L10) ; HDD 2T ; VTi-Team Image 15.0.0 (2021-02-01-vti-master (531279a93))
      Vu+ Solo 4K ; 2x DVB-S NIM(7376 FBC) und DVB-T NIM(TT3L10 ; HDD 1T ;VTi-Team Image 15.0.0 (2021-02-01-vti-master (531279a93))
      enigma2-plugin-skin-linearfhd (v4.4.1)
      Oscam WebInterface r11704-798
      SAT 13E;28,2E;5W;9E
      @20220214 update
    • @Incendio : i don't speek french that much, so I'll try it in english :
      thank you but sorry, but no, there is currently no chance for translations in tha renderer iFlatVWeather2.py, as most of the weather descriptions are hardcoded in the python source.
      anyway, the Yahoo API, which is used here, does not support localization, means descriptions in other languages as far as I know.
      maybe someone could advice on a weather API for free, which supports localizations ?
    • Quellcode: WeatherMSN plugin.py

      1. # -*- coding: UTF-8 -*-
      2. ## Weather MSN
      3. ## Coded by Sirius
      4. ##
      5. from Plugins.Plugin import PluginDescriptor
      6. from Screens.Screen import Screen
      7. from Screens.MessageBox import MessageBox
      8. from Screens.VirtualKeyBoard import VirtualKeyBoard
      9. from Components.ActionMap import ActionMap
      10. from Components.Label import Label
      11. from Components.Sources.StaticText import StaticText
      12. from Components.Language import language
      13. from Components.ConfigList import ConfigListScreen
      14. from Components.config import getConfigListEntry, ConfigText, ConfigYesNo, ConfigSubsection, ConfigSelection, config, configfile, NoSave
      15. from Components.Pixmap import Pixmap
      16. from Tools.Directories import fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
      17. from twisted.web.client import downloadPage
      18. from enigma import eTimer, ePoint
      19. from os import system, environ
      20. import gettext
      21. import time
      22. import os
      23. lang = language.getLanguage()
      24. environ["LANGUAGE"] = lang[:2]
      25. gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))
      26. gettext.textdomain("enigma2")
      27. gettext.bindtextdomain("WeatherMSN", "%s%s" % (resolveFilename(SCOPE_PLUGINS), "Extensions/WeatherMSN/locale"))
      28. def _(txt):
      29. t = gettext.dgettext("WeatherMSN", txt)
      30. if t == txt:
      31. t = gettext.gettext(txt)
      32. return t
      33. config.plugins.weathermsn = ConfigSubsection()
      34. config.plugins.weathermsn.menu = ConfigSelection(default="no", choices = [
      35. ("no", _("no")),
      36. ("yes", _("yes"))])
      37. config.plugins.weathermsn.city = ConfigText(default="Moscow,Moscow-City,Russia", visible_width = 250, fixed_size = False)
      38. config.plugins.weathermsn.windtype = ConfigSelection(default="ms", choices = [
      39. ("ms", _("m/s")),
      40. ("fts", _("ft/s")),
      41. ("kmh", _("km/h")),
      42. ("mph", _("mp/h")),
      43. ("knots", _("knots"))])
      44. config.plugins.weathermsn.degreetype = ConfigSelection(default="C", choices = [
      45. ("C", _("Celsius")),
      46. ("F", _("Fahrenheit"))])
      47. SKIN_MSN = """
      48. <!-- WeatherMSN -->
      49. <screen name="WeatherMSN" position="40,55" size="1200,650" title=' ' >
      50. <eLabel position="600,10" size="3,590" backgroundColor="#00555555" zPosition="1" />
      51. <eLabel position="20,310" size="570,3" backgroundColor="#00555555" zPosition="1" />
      52. <eLabel position="20,460" size="570,3" backgroundColor="#00555555" zPosition="1" />
      53. <eLabel position="610,160" size="570,3" backgroundColor="#00555555" zPosition="1" />
      54. <eLabel position="610,310" size="570,3" backgroundColor="#00555555" zPosition="1" />
      55. <eLabel position="610,460" size="570,3" backgroundColor="#00555555" zPosition="1" />
      56. <eLabel position="20,610" size="1160,3" backgroundColor="#00555555" zPosition="1" />
      57. <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/WeatherMSN/logo.png" position="30,20" size="550,125" alphatest="blend" />
      58. <widget source="locationtxt" render="Label" position="20,175" size="200,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      59. <widget source="timezonetxt" render="Label" position="20,250" size="200,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      60. <widget source="latitudetxt" render="Label" position="20,200" size="200,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      61. <widget source="longitudetxt" render="Label" position="20,225" size="200,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      62. <widget source="temperaturetxt" render="Label" position="250,325" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      63. <widget source="feelsliketxt" render="Label" position="250,350" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      64. <widget source="humiditytxt" render="Label" position="250,375" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      65. <widget source="windtxt" render="Label" position="250,400" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      66. <widget source="pointtxt" render="Label" position="20,275" size="200,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      67. <widget source="location" render="Label" position="90,175" size="500,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      68. <widget source="timezone" render="Label" position="90,250" size="500,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      69. <widget source="latitude" render="Label" position="90,200" size="500,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      70. <widget source="longitude" render="Label" position="90,225" size="500,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      71. <widget source="observationtime" render="Label" position="20,620" size="100,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      72. <widget source="observationpoint" render="Label" position="90,275" size="500,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      73. <widget source="attribution" render="Label" position="120,620" size="500,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      74. <widget source="temperature" render="Label" position="440,325" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      75. <widget source="feelslike" render="Label" position="440,350" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      76. <widget source="skytext" render="Label" position="20,425" size="570,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      77. <widget source="humidity" render="Label" position="440,375" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      78. <widget source="wind" render="Label" position="300,400" size="290,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      79. <widget name="pic" position="70,320" size="128,128" zPosition="2" alphatest="blend" />
      80. <widget source="temperaturetxt" render="Label" position="250,525" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      81. <widget source="preciptxt" render="Label" position="250,550" size="250,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      82. <widget source="daytxt" render="Label" position="250,475" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      83. <widget source="datetxt" render="Label" position="250,500" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      84. <widget source="temperature0" render="Label" position="440,525" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      85. <widget source="skytext0" render="Label" position="20,575" size="570,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      86. <widget source="precip0" render="Label" position="440,550" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      87. <widget source="date0" render="Label" position="440,500" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      88. <widget source="day0" render="Label" position="440,475" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      89. <widget name="pic0" position="70,470" size="128,128" zPosition="2" alphatest="blend" />
      90. <widget source="temperaturetxt" render="Label" position="840,75" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      91. <widget source="preciptxt" render="Label" position="840,100" size="250,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      92. <widget source="daytxt" render="Label" position="840,25" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      93. <widget source="datetxt" render="Label" position="840,50" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      94. <widget source="temperature1" render="Label" position="1030,75" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      95. <widget source="skytext1" render="Label" position="610,125" size="570,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      96. <widget source="precip1" render="Label" position="1030,100" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      97. <widget source="date1" render="Label" position="1030,50" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      98. <widget source="day1" render="Label" position="1030,25" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      99. <widget name="pic1" position="660,20" size="128,128" zPosition="2" alphatest="blend" />
      100. <widget source="temperaturetxt" render="Label" position="840,225" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      101. <widget source="preciptxt" render="Label" position="840,250" size="250,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      102. <widget source="daytxt" render="Label" position="840,175" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      103. <widget source="datetxt" render="Label" position="840,200" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      104. <widget source="temperature2" render="Label" position="1030,225" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      105. <widget source="skytext2" render="Label" position="610,275" size="570,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      106. <widget source="precip2" render="Label" position="1030,250" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      107. <widget source="date2" render="Label" position="1030,200" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      108. <widget source="day2" render="Label" position="1030,175" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      109. <widget name="pic2" position="660,170" size="128,128" zPosition="2" alphatest="blend" />
      110. <widget source="temperaturetxt" render="Label" position="840,375" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      111. <widget source="preciptxt" render="Label" position="840,400" size="250,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      112. <widget source="daytxt" render="Label" position="840,325" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      113. <widget source="datetxt" render="Label" position="840,350" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      114. <widget source="temperature3" render="Label" position="1030,375" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      115. <widget source="skytext3" render="Label" position="610,425" size="570,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      116. <widget source="precip3" render="Label" position="1030,400" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      117. <widget source="date3" render="Label" position="1030,350" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      118. <widget source="day3" render="Label" position="1030,325" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      119. <widget name="pic3" position="660,320" size="128,128" zPosition="2" alphatest="blend" />
      120. <widget source="temperaturetxt" render="Label" position="840,525" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      121. <widget source="preciptxt" render="Label" position="840,550" size="250,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      122. <widget source="daytxt" render="Label" position="840,475" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      123. <widget source="datetxt" render="Label" position="840,500" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="left" transparent="1" />
      124. <widget source="temperature4" render="Label" position="1030,525" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      125. <widget source="skytext4" render="Label" position="610,575" size="570,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      126. <widget source="precip4" render="Label" position="1030,550" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      127. <widget source="date4" render="Label" position="1030,500" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      128. <widget source="day4" render="Label" position="1030,475" size="150,25" font="Regular; 20" foregroundColor="#00f4f4f4" backgroundColor="background" halign="right" transparent="1" />
      129. <widget name="pic4" position="660,470" size="128,128" zPosition="2" alphatest="blend" />
      130. <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/WeatherMSN/buttons/key_menu.png" position="1080,620" size="40,20" alphatest="on" />
      131. <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/WeatherMSN/buttons/key_epg.png" position="1130,620" size="40,20" alphatest="on" />
      132. </screen>"""
      133. class WeatherMSN(ConfigListScreen, Screen):
      134. def __init__(self, session):
      135. Screen.__init__(self, session)
      136. self.session = session
      137. self.skin = SKIN_MSN
      138. self.time_update = 20
      139. self.language = config.osd.language.value.replace('_', '-')
      140. if self.language == 'en-EN':
      141. self.language = 'en-US'
      142. self.city = config.plugins.weathermsn.city.value
      143. self.degreetype = config.plugins.weathermsn.degreetype.value
      144. self.windtype = config.plugins.weathermsn.windtype.value
      145. self.location = {'Location':''}
      146. self.timezone = {'Timezone':''}
      147. self.latitude = {'Latitude':''}
      148. self.longitude = {'Longitude':''}
      149. self.observationtime = {'Time':''}
      150. self.observationpoint = {'Point':''}
      151. self.attribution = {'Attribution':''}
      152. self.temperature = {'Temperature':''}
      153. self.feelslike = {'Feelslike':''}
      154. self.skytext = {'Skytext':''}
      155. self.humidity = {'Humidity':''}
      156. self.wind = {'Wind':''}
      157. self.windspeed = {'Windspeed':''}
      158. self.pic = {'Pic':''}
      159. self.lowtemp0 = {'Lowtemp0':''}
      160. self.hightemp0 = {'Hightemp0':''}
      161. self.skytext0 = {'Skytext0':''}
      162. self.precip0 = {'Precip0':''}
      163. self.date0 = {'Date0':''}
      164. self.day0 = {'Day0':''}
      165. self.pic0 = {'Pic0':''}
      166. self.lowtemp1 = {'Lowtemp1':''}
      167. self.hightemp1 = {'Hightemp1':''}
      168. self.skytext1 = {'Skytext1':''}
      169. self.precip1 = {'Precip1':''}
      170. self.date1 = {'Date1':''}
      171. self.day1 = {'Day1':''}
      172. self.pic1 = {'Pic1':''}
      173. self.lowtemp2 = {'Lowtemp2':''}
      174. self.hightemp2 = {'Hightemp2':''}
      175. self.skytext2 = {'Skytext2':''}
      176. self.precip2 = {'Precip2':''}
      177. self.date2 = {'Date2':''}
      178. self.day2 = {'Day2':''}
      179. self.pic2 = {'Pic2':''}
      180. self.lowtemp3 = {'Lowtemp3':''}
      181. self.hightemp3 = {'Hightemp3':''}
      182. self.skytext3 = {'Skytext3':''}
      183. self.precip3 = {'Precip3':''}
      184. self.date3 = {'Date3':''}
      185. self.day3 = {'Day3':''}
      186. self.pic3 = {'Pic3':''}
      187. self.lowtemp4 = {'Lowtemp4':''}
      188. self.hightemp4 = {'Hightemp4':''}
      189. self.skytext4 = {'Skytext4':''}
      190. self.precip4 = {'Precip4':''}
      191. self.date4 = {'Date4':''}
      192. self.day4 = {'Day4':''}
      193. self.pic4 = {'Pic4':''}
      194. self["shortcuts"] = ActionMap(["OkCancelActions", "ColorActions", "MenuActions", "EPGSelectActions"],
      195. { "cancel": self.exit,
      196. "menu": self.config,
      197. "info": self.about,
      198. }, -1)
      199. self.forecast = []
      200. self.forecastdata = {}
      201. self["Title"] = StaticText(_("Météo MSN"))
      202. self["locationtxt"] = StaticText(_("Lieu:"))
      203. self["timezonetxt"] = StaticText(_("Fuseau horraire:"))
      204. self["latitudetxt"] = StaticText(_("Latitude:"))
      205. self["longitudetxt"] = StaticText(_("Longitude:"))
      206. self["temperaturetxt"] = StaticText(_("Température:"))
      207. self["feelsliketxt"] = StaticText(_("Point de rosée:"))
      208. self["humiditytxt"] = StaticText(_("Humitité:"))
      209. self["preciptxt"] = StaticText(_("Probabilité:"))
      210. self["windtxt"] = StaticText(_("Vent:"))
      211. self["pointtxt"] = StaticText(_("Lieu d'observation:"))
      212. self["datetxt"] = StaticText(_("Date:"))
      213. self["daytxt"] = StaticText(_("Jour:"))
      214. self["location"] = StaticText()
      215. self["timezone"] = StaticText()
      216. self["latitude"] = StaticText()
      217. self["longitude"] = StaticText()
      218. self["observationtime"] = StaticText()
      219. self["observationpoint"] = StaticText()
      220. self["attribution"] = StaticText()
      221. self["temperature"] = StaticText()
      222. self["feelslike"] = StaticText()
      223. self["skytext"] = StaticText()
      224. self["humidity"] = StaticText()
      225. self["wind"] = StaticText()
      226. self["pic"] = Pixmap()
      227. self["temperature0"] = StaticText()
      228. self["skytext0"] = StaticText()
      229. self["precip0"] = StaticText()
      230. self["date0"] = StaticText()
      231. self["day0"] = StaticText()
      232. self["pic0"] = Pixmap()
      233. self["temperature1"] = StaticText()
      234. self["skytext1"] = StaticText()
      235. self["precip1"] = StaticText()
      236. self["date1"] = StaticText()
      237. self["day1"] = StaticText()
      238. self["pic1"] = Pixmap()
      239. self["temperature2"] = StaticText()
      240. self["skytext2"] = StaticText()
      241. self["precip2"] = StaticText()
      242. self["date2"] = StaticText()
      243. self["day2"] = StaticText()
      244. self["pic2"] = Pixmap()
      245. self["temperature3"] = StaticText()
      246. self["skytext3"] = StaticText()
      247. self["precip3"] = StaticText()
      248. self["date3"] = StaticText()
      249. self["day3"] = StaticText()
      250. self["pic3"] = Pixmap()
      251. self["temperature4"] = StaticText()
      252. self["skytext4"] = StaticText()
      253. self["precip4"] = StaticText()
      254. self["date4"] = StaticText()
      255. self["day4"] = StaticText()
      256. self["pic4"] = Pixmap()
      257. self.notdata = False
      258. self.onShow.append(self.get_weather_data)
      259. def get_xmlfile(self):
      260. # xmlfile = "http://weather.service.msn.com/data.aspx?weadegreetype=C&culture=ru-RU&weasearchstr=Moscow,Moscow-City,Russia&src=outlook"
      261. xmlfile = "http://weather.service.msn.com/data.aspx?weadegreetype=%s&culture=%s&weasearchstr=%s&src=outlook" % (self.degreetype, self.language, self.city)
      262. downloadPage(xmlfile, "/tmp/weathermsn.xml").addCallback(self.downloadFinished).addErrback(self.downloadFailed)
      263. def get_weather_data(self):
      264. if not os.path.exists("/tmp/weathermsn.xml") or int((time.time() - os.stat("/tmp/weathermsn.xml").st_mtime)/60) >= self.time_update or self.notdata:
      265. self.get_xmlfile()
      266. else:
      267. self.parse_weather_data()
      268. def downloadFinished(self, result):
      269. print "[WeatherMSN] Download finished"
      270. self.notdata = False
      271. self.parse_weather_data()
      272. def downloadFailed(self, result):
      273. self.notdata = True
      274. print "[WeatherMSN] Download failed!"
      275. def parse_weather_data(self):
      276. self.forecast = []
      277. for line in open("/tmp/weathermsn.xml"):
      278. try:
      279. if "<weather" in line:
      280. self.location['Location'] = line.split('weatherlocationname')[1].split('"')[1].split(',')[0]
      281. if not line.split('timezone')[1].split('"')[1][0] is '0':
      282. self.timezone['Timezone'] = '+' + line.split('timezone')[1].split('"')[1]
      283. else:
      284. self.timezone['Timezone'] = line.split('timezone')[1].split('"')[1]
      285. self.latitude['Latitude'] = line.split(' lat')[1].split('"')[1]
      286. self.longitude['Longitude'] = line.split(' long')[1].split('"')[1]
      287. self.observationtime['Time'] = line.split('observationtime')[1].split('"')[1]
      288. self.observationpoint['Point'] = line.split('observationpoint')[1].split('"')[1]
      289. self.attribution['Attribution'] = line.split('attribution')[1].split('"')[1]
      290. if "<current" in line:
      291. if not line.split('temperature')[1].split('"')[1][0] is '-' and not line.split('temperature')[1].split('"')[1][0] is '0':
      292. self.temperature['Temperature'] = '+' + line.split('temperature')[1].split('"')[1]
      293. else:
      294. self.temperature['Temperature'] = line.split('temperature')[1].split('"')[1]
      295. if not line.split('feelslike')[1].split('"')[1][0] is '-' and not line.split('feelslike')[1].split('"')[1][0] is '0':
      296. self.feelslike['Feelslike'] = '+' + line.split('feelslike')[1].split('"')[1]
      297. else:
      298. self.feelslike['Feelslike'] = line.split('feelslike')[1].split('"')[1]
      299. self.pic['Pic'] = line.split('skycode')[1].split('"')[1]
      300. self.skytext['Skytext'] = line.split('skytext')[1].split('"')[1]
      301. self.humidity['Humidity'] = line.split('humidity')[1].split('"')[1]
      302. try:
      303. self.wind['Wind'] = line.split('winddisplay')[1].split('"')[1].split(' ')[2]
      304. except:
      305. pass
      306. # m/s
      307. if self.windtype == 'ms' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'm/s':
      308. self.windspeed['Windspeed'] = _('%s m/s') % line.split('windspeed')[1].split('"')[1].split(' ')[0]
      309. elif self.windtype == 'ms' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'kmph':
      310. self.windspeed['Windspeed'] = _('%3.02f m/s') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 0.28)
      311. elif self.windtype == 'ms' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'mph':
      312. self.windspeed['Windspeed'] = _('%3.02f m/s') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 0.45)
      313. # ft/s
      314. elif self.windtype == 'fts' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'm/s':
      315. self.windspeed['Windspeed']= _('%3.02f ft/s') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 3.28)
      316. elif self.windtype == 'fts' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'kmph':
      317. self.windspeed['Windspeed']= _('%3.02f ft/s') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 0.91)
      318. elif self.windtype == 'ms' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'mph':
      319. self.windspeed['Windspeed'] = _('%3.02f ft/s') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 1.47)
      320. # mp/h
      321. elif self.windtype == 'mph' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'm/s':
      322. self.windspeed['Windspeed'] = _('%3.02f mp/h') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 2.24)
      323. elif self.windtype == 'mph' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'kmph':
      324. self.windspeed['Windspeed'] = _('%3.02f mp/h') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 0.62)
      325. elif self.windtype == 'ms' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'mph':
      326. self.windspeed['Windspeed'] = _('%s mp/h') % line.split('windspeed')[1].split('"')[1].split(' ')[0]
      327. # knots
      328. elif self.windtype == 'knots' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'm/s':
      329. self.windspeed['Windspeed'] = _('%3.02f knots') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 1.94)
      330. elif self.windtype == 'knots' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'kmph':
      331. self.windspeed['Windspeed'] = _('%3.02f knots') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 0.54)
      332. elif self.windtype == 'ms' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'mph':
      333. self.windspeed['Windspeed'] = _('%3.02f knots') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 0.87)
      334. # km/h
      335. elif self.windtype == 'kmh' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'm/s':
      336. self.windspeed['Windspeed'] = _('%3.02f km/h') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 3.6)
      337. elif self.windtype == 'kmh' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'kmph':
      338. self.windspeed['Windspeed'] = _('%s km/h') % line.split('windspeed')[1].split('"')[1].split(' ')[0]
      339. elif self.windtype == 'ms' and line.split('windspeed')[1].split('"')[1].split(' ')[1] == 'mph':
      340. self.windspeed['Windspeed'] = _('%3.02f km/h') % (float(line.split('windspeed')[1].split('"')[1].split(' ')[0]) * 1.61)
      341. # today #
      342. if "<forecast" in line:
      343. if not line.split('low')[1].split('"')[1][0] is '-' and not line.split('low')[1].split('"')[1][0] is '0':
      344. self.lowtemp0['Lowtemp0'] = '+' + line.split('low')[1].split('"')[1]
      345. else:
      346. self.lowtemp0['Lowtemp0'] = line.split('low')[1].split('"')[1]
      347. if not line.split('high')[1].split('"')[1][0] is '-' and not line.split('high')[1].split('"')[1][0] is '0':
      348. self.hightemp0['Hightemp0'] = '+' + line.split('high')[1].split('"')[1]
      349. else:
      350. self.hightemp0['Hightemp0'] = line.split('high')[1].split('"')[1]
      351. self.pic0['Pic0'] = line.split('skycodeday')[1].split('"')[1]
      352. self.date0['Date0'] = line.split('date')[2].split('"')[1].split('-')[2].strip() + '.' + line.split('date')[2].split('"')[1].split('-')[1].strip() + '.' + line.split('date')[2].split('"')[1].split('-')[0].strip()
      353. self.day0['Day0'] = line.split(' day')[2].split('"')[1]
      354. self.skytext0['Skytext0'] = line.split('skytextday')[1].split('"')[1]
      355. self.precip0['Precip0'] = line.split('precip')[1].split('"')[1]
      356. # day 1 #
      357. if "<forecast" in line:
      358. if not line.split('low')[2].split('"')[1][0] is '-' and not line.split('low')[2].split('"')[1][0] is '0':
      359. self.lowtemp1['Lowtemp1'] = '+' + line.split('low')[2].split('"')[1]
      360. else:
      361. self.lowtemp1['Lowtemp1'] = line.split('low')[2].split('"')[1]
      362. if not line.split('high')[2].split('"')[1][0] is '-' and not line.split('high')[2].split('"')[1][0] is '0':
      363. self.hightemp1['Hightemp1'] = '+' + line.split('high')[2].split('"')[1]
      364. else:
      365. self.hightemp1['Hightemp1'] = line.split('high')[2].split('"')[1]
      366. self.pic1['Pic1'] = line.split('skycodeday')[2].split('"')[1]
      367. self.date1['Date1'] = line.split('date')[3].split('"')[1].split('-')[2].strip() + '.' + line.split('date')[3].split('"')[1].split('-')[1].strip() + '.' + line.split('date')[3].split('"')[1].split('-')[0].strip()
      368. self.day1['Day1'] = line.split(' day')[3].split('"')[1]
      369. self.skytext1['Skytext1'] = line.split('skytextday')[2].split('"')[1]
      370. self.precip1['Precip1'] = line.split('precip')[2].split('"')[1]
      371. # day 2 #
      372. if "<forecast" in line:
      373. if not line.split('low')[3].split('"')[1][0] is '-' and not line.split('low')[3].split('"')[1][0] is '0':
      374. self.lowtemp2['Lowtemp2'] = '+' + line.split('low')[3].split('"')[1]
      375. else:
      376. self.lowtemp2['Lowtemp2'] = line.split('low')[3].split('"')[1]
      377. if not line.split('high')[3].split('"')[1][0] is '-' and not line.split('high')[3].split('"')[1][0] is '0':
      378. self.hightemp2['Hightemp2'] = '+' + line.split('high')[3].split('"')[1]
      379. else:
      380. self.hightemp2['Hightemp2'] = line.split('high')[3].split('"')[1]
      381. self.pic2['Pic2'] = line.split('skycodeday')[3].split('"')[1]
      382. self.date2['Date2'] = line.split('date')[4].split('"')[1].split('-')[2].strip() + '.' + line.split('date')[4].split('"')[1].split('-')[1].strip() + '.' + line.split('date')[4].split('"')[1].split('-')[0].strip()
      383. self.day2['Day2'] = line.split(' day')[4].split('"')[1]
      384. self.skytext2['Skytext2'] = line.split('skytextday')[3].split('"')[1]
      385. self.precip2['Precip2'] = line.split('precip')[3].split('"')[1]
      386. # day 3 #
      387. if "<forecast" in line:
      388. if not line.split('low')[4].split('"')[1][0] is '-' and not line.split('low')[4].split('"')[1][0] is '0':
      389. self.lowtemp3['Lowtemp3'] = '+' + line.split('low')[4].split('"')[1]
      390. else:
      391. self.lowtemp3['Lowtemp3'] = line.split('low')[4].split('"')[1]
      392. if not line.split('high')[4].split('"')[1][0] is '-' and not line.split('high')[4].split('"')[1][0] is '0':
      393. self.hightemp3['Hightemp3'] = '+' + line.split('high')[4].split('"')[1]
      394. else:
      395. self.hightemp3['Hightemp3'] = line.split('high')[4].split('"')[1]
      396. self.pic3['Pic3'] = line.split('skycodeday')[4].split('"')[1]
      397. self.date3['Date3'] = line.split('date')[5].split('"')[1].split('-')[2].strip() + '.' + line.split('date')[5].split('"')[1].split('-')[1].strip() + '.' + line.split('date')[5].split('"')[1].split('-')[0].strip()
      398. self.day3['Day3'] = line.split(' day')[5].split('"')[1]
      399. self.skytext3['Skytext3'] = line.split('skytextday')[4].split('"')[1]
      400. self.precip3['Precip3'] = line.split('precip')[4].split('"')[1]
      401. # day 4 #
      402. if "<forecast" in line:
      403. if not line.split('low')[5].split('"')[1][0] is '-' and not line.split('low')[5].split('"')[1][0] is '0':
      404. self.lowtemp4['Lowtemp4'] = '+' + line.split('low')[5].split('"')[1]
      405. else:
      406. self.lowtemp4['Lowtemp4'] = line.split('low')[5].split('"')[1]
      407. if not line.split('high')[5].split('"')[1][0] is '-' and not line.split('high')[5].split('"')[1][0] is '0':
      408. self.hightemp4['Hightemp4'] = '+' + line.split('high')[5].split('"')[1]
      409. else:
      410. self.hightemp4['Hightemp4'] = line.split('high')[5].split('"')[1]
      411. self.pic4['Pic4'] = line.split('skycodeday')[5].split('"')[1]
      412. self.date4['Date4'] = line.split('date')[6].split('"')[1].split('-')[2].strip() + '.' + line.split('date')[6].split('"')[1].split('-')[1].strip() + '.' + line.split('date')[6].split('"')[1].split('-')[0].strip()
      413. self.day4['Day4'] = line.split(' day')[6].split('"')[1]
      414. self.skytext4['Skytext4'] = line.split('skytextday')[5].split('"')[1]
      415. self.precip4['Precip4'] = line.split('precip')[5].split('"')[1]
      416. except:
      417. pass
      418. defpic = "%sExtensions/WeatherMSN/icons/na.png" % resolveFilename(SCOPE_PLUGINS)
      419. if self.location['Location'] is not '':
      420. self["location"].text = _('%s') % self.location['Location']
      421. else:
      422. self["location"].text = _('n/a')
      423. self.notdata = True
      424. if self.timezone['Timezone'] is not '':
      425. self["timezone"].text = _('%s h') % self.timezone['Timezone']
      426. else:
      427. self["timezone"].text = _('n/a')
      428. self.notdata = True
      429. if self.latitude['Latitude'] is not '':
      430. self["latitude"].text = _('%s') % self.latitude['Latitude']
      431. else:
      432. self["latitude"].text = _('n/a')
      433. self.notdata = True
      434. if self.longitude['Longitude'] is not '':
      435. self["longitude"].text = _('%s') % self.longitude['Longitude']
      436. else:
      437. self["longitude"].text = _('n/a')
      438. self.notdata = True
      439. if self.observationtime['Time'] is not '':
      440. self["observationtime"].text = _('%s') % self.observationtime['Time']
      441. else:
      442. self["observationtime"].text = _('n/a')
      443. self.notdata = True
      444. if self.observationpoint['Point'] is not '':
      445. self["observationpoint"].text = _('%s') % self.observationpoint['Point']
      446. else:
      447. self["observationpoint"].text = _('n/a')
      448. self.notdata = True
      449. if self.attribution['Attribution'] is not '':
      450. self["attribution"].text = _('%s') % self.attribution['Attribution']
      451. else:
      452. self["attribution"].text = _('n/a')
      453. self.notdata = True
      454. if self.temperature['Temperature'] is not '':
      455. self["temperature"].text = _('%s%s%s') % (self.temperature['Temperature'], unichr(176).encode("latin-1"), self.degreetype)
      456. else:
      457. self["temperature"].text = _('n/a')
      458. self.notdata = True
      459. if self.feelslike['Feelslike'] is not '':
      460. self["feelslike"].text = _('%s%s%s') % (self.feelslike['Feelslike'], unichr(176).encode("latin-1"), self.degreetype)
      461. else:
      462. self["feelslike"].text = _('n/a')
      463. self.notdata = True
      464. if self.skytext['Skytext'] is not '':
      465. self["skytext"].text = _('%s') % self.skytext['Skytext']
      466. else:
      467. self["skytext"].text = _('n/a')
      468. self.notdata = True
      469. if self.humidity['Humidity'] is not '':
      470. self["humidity"].text = _('%s %s') % (self.humidity['Humidity'], unichr(37).encode("latin-1"))
      471. else:
      472. self["humidity"].text = _('n/a')
      473. self.notdata = True
      474. if self.windspeed['Windspeed'] is not '':
      475. self["wind"].text = _('%s %s %s') % (self.wind['Wind'], unichr(126).encode("latin-1"), self.windspeed['Windspeed'])
      476. else:
      477. self["wind"].text = _('n/a')
      478. self.notdata = True
      479. self["pic"].instance.setScale(1)
      480. if self.pic['Pic'] is not '':
      481. self["pic"].instance.setPixmapFromFile("%sExtensions/WeatherMSN/icons/%s.png" % (resolveFilename(SCOPE_PLUGINS), self.pic['Pic']))
      482. else:
      483. self["pic"].instance.setPixmapFromFile(defpic)
      484. self["pic"].instance.show()
      485. if self.lowtemp0['Lowtemp0'] is not '' and self.hightemp0['Hightemp0'] is not '':
      486. self["temperature0"].text = _('%s%s%s / %s%s%s') % (self.hightemp0['Hightemp0'], unichr(176).encode("latin-1"), self.degreetype, self.lowtemp0['Lowtemp0'], unichr(176).encode("latin-1"), self.degreetype)
      487. else:
      488. self["temperature0"].text = _('n/a')
      489. self.notdata = True
      490. if self.skytext0['Skytext0'] is not '':
      491. self["skytext0"].text = _('%s') % self.skytext0['Skytext0']
      492. else:
      493. self["skytext0"].text = _('n/a')
      494. self.notdata = True
      495. if self.precip0['Precip0'] is not '':
      496. self["precip0"].text = _('%s %s') % (self.precip0['Precip0'], unichr(37).encode("latin-1"))
      497. else:
      498. self["precip0"].text = _('n/a')
      499. self.notdata = True
      500. if self.date0['Date0'] is not '':
      501. self["date0"].text = _('%s') % self.date0['Date0']
      502. else:
      503. self["date0"].text = _('n/a')
      504. self.notdata = True
      505. if self.day0['Day0'] is not '':
      506. self["day0"].text = _('%s') % self.day0['Day0']
      507. else:
      508. self["day0"].text = _('n/a')
      509. self.notdata = True
      510. self["pic0"].instance.setScale(1)
      511. if self.pic0['Pic0'] is not '':
      512. self["pic0"].instance.setPixmapFromFile("%sExtensions/WeatherMSN/icons/%s.png" % (resolveFilename(SCOPE_PLUGINS), self.pic0['Pic0']))
      513. else:
      514. self["pic0"].instance.setPixmapFromFile(defpic)
      515. self["pic0"].instance.show()
      516. if self.lowtemp1['Lowtemp1'] is not '' and self.hightemp1['Hightemp1'] is not '':
      517. self["temperature1"].text = _('%s%s%s / %s%s%s') % (self.hightemp1['Hightemp1'], unichr(176).encode("latin-1"), self.degreetype, self.lowtemp1['Lowtemp1'], unichr(176).encode("latin-1"), self.degreetype)
      518. else:
      519. self["temperature1"].text = _('n/a')
      520. self.notdata = True
      521. if self.skytext1['Skytext1'] is not '':
      522. self["skytext1"].text = _('%s') % self.skytext1['Skytext1']
      523. else:
      524. self["skytext1"].text = _('n/a')
      525. self.notdata = True
      526. if self.precip1['Precip1'] is not '':
      527. self["precip1"].text = _('%s %s') % (self.precip1['Precip1'], unichr(37).encode("latin-1"))
      528. else:
      529. self["precip1"].text = _('n/a')
      530. self.notdata = True
      531. if self.date1['Date1'] is not '':
      532. self["date1"].text = _('%s') % self.date1['Date1']
      533. else:
      534. self["date1"].text = _('n/a')
      535. self.notdata = True
      536. if self.day1['Day1'] is not '':
      537. self["day1"].text = _('%s') % self.day1['Day1']
      538. else:
      539. self["day1"].text = _('n/a')
      540. self.notdata = True
      541. self["pic1"].instance.setScale(1)
      542. if self.pic1['Pic1'] is not '':
      543. self["pic1"].instance.setPixmapFromFile("%sExtensions/WeatherMSN/icons/%s.png" % (resolveFilename(SCOPE_PLUGINS), self.pic1['Pic1']))
      544. else:
      545. self["pic1"].instance.setPixmapFromFile(defpic)
      546. self["pic1"].instance.show()
      547. if self.lowtemp2['Lowtemp2'] is not '' and self.hightemp2['Hightemp2'] is not '':
      548. self["temperature2"].text = _('%s%s%s / %s%s%s') % (self.hightemp2['Hightemp2'], unichr(176).encode("latin-1"), self.degreetype, self.lowtemp2['Lowtemp2'], unichr(176).encode("latin-1"), self.degreetype)
      549. else:
      550. self["temperature2"].text = _('n/a')
      551. self.notdata = True
      552. if self.skytext2['Skytext2'] is not '':
      553. self["skytext2"].text = _('%s') % self.skytext2['Skytext2']
      554. else:
      555. self["skytext2"].text = _('n/a')
      556. self.notdata = True
      557. if self.precip2['Precip2'] is not '':
      558. self["precip2"].text = _('%s %s') % (self.precip2['Precip2'], unichr(37).encode("latin-1"))
      559. else:
      560. self["precip2"].text = _('n/a')
      561. self.notdata = True
      562. if self.date2['Date2'] is not '':
      563. self["date2"].text = _('%s') % self.date2['Date2']
      564. else:
      565. self["date2"].text = _('n/a')
      566. self.notdata = True
      567. if self.day2['Day2'] is not '':
      568. self["day2"].text = _('%s') % self.day2['Day2']
      569. else:
      570. self["day2"].text = _('n/a')
      571. self.notdata = True
      572. self["pic2"].instance.setScale(1)
      573. if self.pic2['Pic2'] is not '':
      574. self["pic2"].instance.setPixmapFromFile("%sExtensions/WeatherMSN/icons/%s.png" % (resolveFilename(SCOPE_PLUGINS), self.pic2['Pic2']))
      575. else:
      576. self["pic2"].instance.setPixmapFromFile(defpic)
      577. self["pic2"].instance.show()
      578. if self.lowtemp3['Lowtemp3'] is not '' and self.hightemp3['Hightemp3'] is not '':
      579. self["temperature3"].text = _('%s%s%s / %s%s%s') % (self.hightemp3['Hightemp3'], unichr(176).encode("latin-1"), self.degreetype, self.lowtemp3['Lowtemp3'], unichr(176).encode("latin-1"), self.degreetype)
      580. else:
      581. self["temperature3"].text = _('n/a')
      582. self.notdata = True
      583. if self.skytext3['Skytext3'] is not '':
      584. self["skytext3"].text = _('%s') % self.skytext3['Skytext3']
      585. else:
      586. self["skytext3"].text = _('n/a')
      587. self.notdata = True
      588. if self.precip3['Precip3'] is not '':
      589. self["precip3"].text = _('%s %s') % (self.precip3['Precip3'], unichr(37).encode("latin-1"))
      590. else:
      591. self["precip3"].text = _('n/a')
      592. self.notdata = True
      593. if self.date3['Date3'] is not '':
      594. self["date3"].text = _('%s') % self.date3['Date3']
      595. else:
      596. self["date3"].text = _('n/a')
      597. self.notdata = True
      598. if self.day3['Day3'] is not '':
      599. self["day3"].text = _('%s') % self.day3['Day3']
      600. else:
      601. self["day3"].text = _('n/a')
      602. self.notdata = True
      603. self["pic3"].instance.setScale(1)
      604. if self.pic3['Pic3'] is not '':
      605. self["pic3"].instance.setPixmapFromFile("%sExtensions/WeatherMSN/icons/%s.png" % (resolveFilename(SCOPE_PLUGINS), self.pic3['Pic3']))
      606. else:
      607. self["pic3"].instance.setPixmapFromFile(defpic)
      608. self["pic3"].instance.show()
      609. if self.lowtemp4['Lowtemp4'] is not '' and self.hightemp4['Hightemp4'] is not '':
      610. self["temperature4"].text = _('%s%s%s / %s%s%s') % (self.hightemp4['Hightemp4'], unichr(176).encode("latin-1"), self.degreetype, self.lowtemp4['Lowtemp4'], unichr(176).encode("latin-1"), self.degreetype)
      611. else:
      612. self["temperature4"].text = _('n/a')
      613. self.notdata = True
      614. if self.skytext4['Skytext4'] is not '':
      615. self["skytext4"].text = _('%s') % self.skytext4['Skytext4']
      616. else:
      617. self["skytext4"].text = _('n/a')
      618. self.notdata = True
      619. if self.precip4['Precip4'] is not '':
      620. self["precip4"].text = _('%s %s') % (self.precip4['Precip4'], unichr(37).encode("latin-1"))
      621. else:
      622. self["precip4"].text = _('n/a')
      623. self.notdata = True
      624. if self.date4['Date4'] is not '':
      625. self["date4"].text = _('%s') % self.date4['Date4']
      626. else:
      627. self["date4"].text = _('n/a')
      628. self.notdata = True
      629. if self.day4['Day4'] is not '':
      630. self["day4"].text = _('%s') % self.day4['Day4']
      631. else:
      632. self["day4"].text = _('n/a')
      633. self.notdata = True
      634. self["pic4"].instance.setScale(1)
      635. if self.pic4['Pic4'] is not '':
      636. self["pic4"].instance.setPixmapFromFile("%sExtensions/WeatherMSN/icons/%s.png" % (resolveFilename(SCOPE_PLUGINS), self.pic4['Pic4']))
      637. else:
      638. self["pic4"].instance.setPixmapFromFile(defpic)
      639. self["pic4"].instance.show()
      640. def config (self):
      641. self.session.open(ConfigWeatherMSN)
      642. def about(self):
      643. self.session.open(MessageBox, _("Weather MSN\nDeveloper: Sirius0103 \nHomepage: www.gisclub.tv \n\nDonate:\nWMZ Z395874509364\nWME E284580190260\nWMR R213063691482\nWMU U658742613505"), MessageBox.TYPE_INFO)
      644. def exit(self):
      645. os.system("rm -f /tmp/weathermsn.xml")
      646. self.close()
      647. SKIN_CONF = """
      648. <!-- Config WeatherMSN -->
      649. <screen name="ConfigWeatherMSN" position="center,160" size="750,370" title=' '>
      650. <eLabel position="20,325" size="710,3" backgroundColor="#00555555" zPosition="1" />
      651. <widget name="config" position="15,10" size="720,300" scrollbarMode="showOnDemand" transparent="1" />
      652. <widget source="key_red" render="Label" position="80,330" size="165,30" font="Regular; 22" halign="left" valign="center" foregroundColor="#00f4f4f4" backgroundColor="background" transparent="1" />
      653. <widget source="key_green" render="Label" position="310,330" size="165,30" font="Regular; 22" halign="left" valign="center" foregroundColor="#00f4f4f4" backgroundColor="background" transparent="1" />
      654. <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/WeatherMSN/buttons/key_red.png" position="30,335" size="40,20" alphatest="blend" />
      655. <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/WeatherMSN/buttons/key_green.png" position="260,335" size="40,20" alphatest="blend" />
      656. <widget name="HelpWindow" position="285,300" zPosition="1" size="1,1" backgroundColor="background" transparent="1" alphatest="blend" />
      657. </screen>"""
      658. class ConfigWeatherMSN(ConfigListScreen, Screen):
      659. def __init__(self, session):
      660. Screen.__init__(self, session)
      661. self.session = session
      662. self.skin = SKIN_CONF
      663. self.list = []
      664. ConfigListScreen.__init__(self, self.list, session = session)
      665. self.setTitle(_("Config Weather MSN"))
      666. self.convertorpath = "/usr/lib/enigma2/python/Components/Converter/"
      667. self.pluginpath = "/usr/lib/enigma2/python/Plugins/Extensions/WeatherMSN/components/"
      668. self.city = config.plugins.weathermsn.city.value
      669. self.language = config.osd.language.value.replace('_', '-')
      670. if self.language == 'en-EN':
      671. self.language = 'en-US'
      672. self.degreetype = config.plugins.weathermsn.degreetype.value
      673. self.windtype = config.plugins.weathermsn.windtype.value
      674. self.createSetup()
      675. self["setupActions"] = ActionMap(["DirectionActions", "SetupActions", "ColorActions"],
      676. { "red": self.cancel,
      677. "cancel": self.cancel,
      678. "green": self.save,
      679. "ok": self.save
      680. }, -2)
      681. self["key_red"] = StaticText(_("Close"))
      682. self["key_green"] = StaticText(_("Save"))
      683. self["HelpWindow"] = Pixmap()
      684. def createSetup(self):
      685. self.list = []
      686. self.list.append(getConfigListEntry(_("Show Weather MSN in menu information:"), config.plugins.weathermsn.menu))
      687. self.list.append(getConfigListEntry(_("Location:"), config.plugins.weathermsn.city))
      688. self.list.append(getConfigListEntry(_("Scale of wind speed:"), config.plugins.weathermsn.windtype))
      689. self.list.append(getConfigListEntry(_("Scale of temperature:"), config.plugins.weathermsn.degreetype))
      690. self["config"].list = self.list
      691. self["config"].l.setList(self.list)
      692. self["config"].onSelectionChanged.append(self.selectionChanged)
      693. def selectionChanged(self):
      694. current = self["config"].getCurrent()
      695. try:
      696. helpwindowpos = self["HelpWindow"].getPosition()
      697. if current[1].help_window.instance is not None:
      698. current[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1]))
      699. except:
      700. pass
      701. def createConvertor(self):
      702. os.system("cp %sMSNWeather2.py %sMSNWeather2.py" % (self.pluginpath, self.convertorpath))
      703. def cancel(self):
      704. for x in self["config"].list:
      705. x[1].cancel()
      706. self.close(False)
      707. def save(self):
      708. for x in self["config"].list:
      709. x[1].save()
      710. configfile.save()
      711. self.createConvertor()
      712. self.mbox = self.session.open(MessageBox,(_("Configuration is saved")), MessageBox.TYPE_INFO, timeout = 3 )
      713. self.close()
      714. def WeatherMenu(menuid):
      715. if menuid != "information":
      716. return [ ]
      717. return [(_("Weather MSN"), openWeather, "Weather_MSN", None)]
      718. def openWeather(session, **kwargs):
      719. session.open(WeatherMSN)
      720. def main(session, **kwargs):
      721. session.open(WeatherMSN)
      722. def Plugins(**kwargs):
      723. if config.plugins.weathermsn.menu.value == 'yes':
      724. result = [
      725. PluginDescriptor(name=_("Weather MSN"),
      726. where=PluginDescriptor.WHERE_MENU,
      727. fnc=WeatherMenu),
      728. PluginDescriptor(name=_("Weather MSN"),
      729. description=_("Weather forecast for 5 days"),
      730. where = [PluginDescriptor.WHERE_PLUGINMENU, PluginDescriptor.WHERE_EXTENSIONSMENU],
      731. icon="plugin.png",
      732. fnc=main)
      733. ]
      734. return result
      735. else:
      736. result = [
      737. PluginDescriptor(name=_("Weather MSN"),
      738. description=_("Weather forecast for 5 days"),
      739. where = [PluginDescriptor.WHERE_PLUGINMENU, PluginDescriptor.WHERE_EXTENSIONSMENU],
      740. icon="plugin.png",
      741. fnc=main)
      742. ]
      743. return result
      Alles anzeigen
      @gordon55
      Thank you for that clarification
      I made modifications in the module:
      WeatherMSN

      For localization :

      For yahoo

      I do not know in VTI, but in on pyton module that uses Jason in the FHEM software we can transmit the parameters, for example :
      587051 600 fr
      localisation time refresh language
      Spoiler anzeigen

      Vu+ Ultimo 4K & Vu+ DUO 4K SE ;; 2 or 1 DVB-S NIM(45308X FBC) (DVB-S2X) und DVB-T NIM(TT3L10) ; HDD 2T ; VTi-Team Image 15.0.0 (2021-02-01-vti-master (531279a93))
      Vu+ Solo 4K ; 2x DVB-S NIM(7376 FBC) und DVB-T NIM(TT3L10 ; HDD 1T ;VTi-Team Image 15.0.0 (2021-02-01-vti-master (531279a93))
      enigma2-plugin-skin-linearfhd (v4.4.1)
      Oscam WebInterface r11704-798
      SAT 13E;28,2E;5W;9E
      @20220214 update
    • Hallo
      Habe da eine Frage. Bei den Bildern des Skins ganz am Anfang sind 2 Bilder der Filmauswahl.Einmal Packt der Wölfe ( Movie Selektion png) und Dirty Dancing.( Movielist png)
      Bei Packt der Wölfe ist rechts ein Balten zu sehen der besagt das noch mehr Filme auf der Festplatte sind als angezeigt.
      Wie kriege ich den in den Skin? Bei mir ist er nicht wie bei Dirty Dancing.( Movielist png)
      Danke für eine Antwort
    • Du meinst den Scrollbalken. Bei Dirty Dancing ist die Ansicht mit Backdrop, bei Pakt der Wölfe ohne Backdrop.
      Vielleicht ist der Scrollbalken beim der Filmliste mit Backdrop nicht vorgesehen.
      Wenn du die Backdrops nicht nutzen willst, aktivier mal den Skinpart "Movielist_ohne_backdrop", dann müsste es aussehen wie bei Pakt der Wölfe.
    • Bei Dirty Dancing sind backdrops vorhanden. Dort kann man einen Scrollbalken nicht wirklich richtig Skinnen. Das sieht sehr bescheiden aus, daher ist er dort nicht aktiviert.
      Pakt der Wölfe Ansicht ist ohne Backdrop, dort ist es kein Problem.
      Skin: [ linearFHD ] - [ iFlatFHD ] - Anpassungen: [ linearFHD ] - [ iFlatFHD ]

      Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Nathanael2316 ()

    • Also ich merke keinen Unterschied wenn ich es aktivier (Movielist ohne backdrop) Natürlich Neustart Kein Balken zu sehen. Sonst ist er eigentlich überall wo ich zb. nach unten scollen kann.
    • Grad mal nachgesehen. Da müsste man erst was umbauen. Ich schau mal fürs nächste Update
      Skin: [ linearFHD ] - [ iFlatFHD ] - Anpassungen: [ linearFHD ] - [ iFlatFHD ]
    • Alles möglich. Wenn du allerdings ein bewegtes Bild dahinter hast, schimmert das genau an der Stelle durch. Hab noch keine saubere Lösung dazu gefunden.
      Skin: [ linearFHD ] - [ iFlatFHD ] - Anpassungen: [ linearFHD ] - [ iFlatFHD ]
    • Seit den vorletzten Update (ich glaub gestern, 17.1.) habe ich keine aktive iNET-Anzeige mehr in der Infobar 1.

      Funktioniert aber mit Wetter alles bestens.
      Ist das nur bei mir so ???

      komisch,
      jetzt nach vielen vielen Stunden gehts wieder perfekt !! Woran liegt das denn?
      Also: wer es löschen kann, weg mit meinen 2 Einträgen hier.
      viele Grüße
      Nofri :)
      ..............................................................................................................................................
      Vu+ Ultimo 4k (2x DVB-S2 FBC Twin / 1x DVB-T2 Dual) an LG OLED55E6V, und noch einen iCord HD 2TB
    • Hi Leute,
      Meld`mich nun auch mal zu Wort. Zu eurer tollen und unermüdlichen Arbeit hier allen Skinnern und Beteilgten ein fettse THX :thumbup: - auch an Eismann, Gordon55 , etc. .... im Nachbarthread Infobar V.1.5xx.
      Der IFlatFHD Skin läuft bei mir auf dem aktuellem VTI 13.02 Stand mit den aktuellsten Updates (IFlatFHD 5.8) im Zusammenspiel m. aktueller Version Eismanns Infobar (V. 1.5rc2) und aktivierten Skinparts, klappt auch alles super.
      Irgendwo in den 258 Seiten stand etwas von einem Symbol oder einer Anzeige über eine Fremdaufnahme in der Movielist, wenn diese von einem amnderen Receiver aufgenommen wurde. Leider konnte ich bis jetzt keine Einstellung oder ein Screenshot entdecken, der mir zeigz, wie das aussehen sollte.
      Ich habe gestern mal von der Dream (im HS Netzwerk) eine Serie mal zur VU per FTP rüberkopiert, die Filmdatenbanl unter /media/movie/hdd aktualisieren lassen, aber keine Anzeige dafür entdecken können.
      Hab alle Anzeigenmöglichkeiten der Movielist durch (einzeilg, mit Erweitereung, ohne Erweiterung, zweizeilig, usw.) konnte aber nirgends ein extra Symbol finden,

      Oder wird die HDD Aufnahme einer Dreambox nicht als "fremde" Aufnahme ausgewertet, weil es sich hiebei ja auch um einen Enigma TS-Stream im selben
      Dateformat handelt ? ... Also "ext4"
      Besten Dank schon mal für eure Hilfe.

      gruß eraser65
    • Hi leutz,


      ich habe mal den iFlat HD skin installiert und das sieht auch so ganz gut aus, jedoch ist bei mir oben und unten immer ein Teil des Skins abgeschnitten. WIe kann man das einstellen?? Unter iFlatPro gibt es auch nix einzustellen. Und wie kann man die Farben ändern??? Das grau ist doch schon etwas langweilig.

      MfG