Changeset 5923 for ipk/source
- Timestamp:
- Feb 28, 2011, 6:45:52 PM (15 years ago)
- Location:
- ipk/source/system_addonmanager_2_0/usr/lib/enigma2/python/Plugins/Extensions/AddonManager
- Files:
-
- 2 edited
-
downloader.py (modified) (41 diffs)
-
ipkdownload (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ipk/source/system_addonmanager_2_0/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/downloader.py
r4929 r5923 1 from Components.ActionMap import HelpableActionMap 1 2 from Plugins.Plugin import PluginDescriptor 2 3 from Screens.PluginBrowser import * … … 30 31 from Screens.Console import Console 31 32 from os import system, remove, path, walk, makedirs, listdir 33 from Screens.VirtualKeyBoard import VirtualKeyBoard 32 34 33 35 import re … … 47 49 global activesource 48 50 global version 49 global b_version50 51 global checkok 52 global menu 53 global PreviewPath 51 54 52 55 # for local compile in the box … … 55 58 # py_compile.compile("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/downloader.py") 56 59 57 version = " 2.12"60 version = "3.04" 58 61 serverurl = "" 59 62 activenam = "" 60 63 activesource = "" 61 b_version = 121262 64 readyflag = 0 63 65 checkok = True … … 75 77 activenam = "Addons-Server" 76 78 serverurl = activesource + "/E2/" 79 PreviewPath = "http://97.74.32.10/svn/preview" 77 80 78 81 # Boytyp lesen … … 93 96 config.AddonManager.marker_off = ConfigInteger(1, limits=(0, 1)) 94 97 config.AddonManager.mark_color = ConfigInteger(1, limits=(0, 2)) 95 config.AddonManager.ungenau = ConfigInteger( 0, limits=(0, 1))96 config.AddonManager.Schriftart = ConfigInteger(1 4, limits=(10, 22))98 config.AddonManager.ungenau = ConfigInteger(1, limits=(0, 1)) 99 config.AddonManager.Schriftart = ConfigInteger(16, limits=(10, 22)) 97 100 98 101 config.AddonManager2 = ConfigSubsection() … … 279 282 <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pressed.png" position="{yellow2.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" /> 280 283 <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pressed.png" position="{blue2.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" /> 281 <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/aaf.png" position="{logo.pos}" zPosition="0" size="160,140" transparent="1" alphatest="on" />282 284 <widget source="key_red" render="Label" position="{red.pos}" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#9f1313" transparent="1" /> 283 285 <widget source="key_green" render="Label" position="{green.pos}" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#1f771f" transparent="1" /> … … 288 290 <widget source="key_3" render="Label" position="{yellow2.pos}" zPosition="1" size="140,40" font="Regular;16" valign="center" halign="center" backgroundColor="#a08500" transparent="1" /> 289 291 <widget source="key_4" render="Label" position="{blue2.pos}" zPosition="1" size="140,40" font="Regular;16" valign="center" halign="center" backgroundColor="#18188b" transparent="1" /> 290 <widget source="label_top" render="Label" position="10,94" size=" 240,20" foregroundColor="#3366ff" font="Regular;16" />292 <widget source="label_top" render="Label" position="10,94" size="340,20" foregroundColor="#3366ff" font="Regular;16" /> 291 293 <widget name="feedlist" position="10,116" size="{feed.size}" scrollbarMode="showOnDemand" /> 292 294 <widget name="destlist" position="0,116" size="{dest.size}" scrollbarMode="showOnDemand" /> … … 301 303 </screen>""" 302 304 305 # <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/aaf.png" position="{logo.pos}" zPosition="0" size="160,140" transparent="1" alphatest="on" /> 306 303 307 def __init__(self, session, destdir="/tmp/aaf/"): 304 self.BAtyp = "old"305 if os.path.exists("/var/baroot/.multipart") is True:306 self.BAtyp = "new"307 308 308 #switch automatic to current skin 309 309 current_w = getDesktop(0).size().width() … … 404 404 self.focus = None 405 405 self.download = None 406 self.plug = " plugins"406 self.plug = "all" 407 407 self.farbe = 1 408 408 self.ListTyp = "pic" 409 self.betacode = False410 409 411 410 self.feed_base = serverurl + "%s/" % self.plug … … 418 417 self.marker_off = config.AddonManager.marker_off.value 419 418 420 self.burl = activesource + "/version_b2.txt"421 self.beta_load()422 423 419 self.ThumbTimer = eTimer() 424 420 self.ThumbTimer.callback.append(self.list_download) 425 421 426 #self.box = "dm8000" 427 if box == "dm8000": 428 self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions", "EPGSelectActions", "MenuActions", "InfobarTeletextActions", "NumberActions", "MovieSelectionActions"], 422 self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions", "EPGSelectActions", "MenuActions", "InfobarTeletextActions", "NumberActions", "MovieSelectionActions", "InfobarActions"], 429 423 { 430 424 "cancel": self.closeCB, 431 "red": self.plugins_download, 432 "green": self.ipks_download, 433 "yellow": self.skins_download, 434 "blue": self.emus_download, 435 "1": self.settings_download, 436 "2": self.picons_download, 437 "5": self.BackupRestoreVU, 438 "8": self.beta_download, 425 "red": self.red_download, 426 "green": self.green_download, 427 "yellow": self.yellow_download, 428 "blue": self.blue_download, 429 430 "1": self.eins_download, 431 "2": self.FavMenu, 432 "3": self.drei_download, 433 "4": self.vier_download, 434 "5": self.fuenf_download, 435 "6": self.BackupRestore, 439 436 "9": self.sh_preview, 440 437 "0": self.update, … … 451 448 "startTeletext": self.switch_ListTyp, 452 449 "showEventInfo": self.info, 453 "down": self.down 454 }, -1) 455 else: 456 self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions", "EPGSelectActions", "MenuActions", "InfobarTeletextActions", "NumberActions", "MovieSelectionActions"], 457 { 458 "cancel": self.closeCB, 459 "red": self.plugins_download, 460 "green": self.ipks_download, 461 "yellow": self.emusconfig_download, 462 "blue": self.emus_download, 463 464 "1": self.settings_download, 465 "2": self.bootbilder_download, 466 "3": self.radiobilder_download, 467 "5": self.BackupRestore, 468 "7": self.skins_download, 469 "8": self.beta_download, 470 "9": self.sh_preview, 471 "0": self.update, 472 473 "prevBouquet": self.switchList, 474 "nextBouquet": self.switchList, 475 "ok": self.check_download, 476 "left": self.left, 477 "right": self.right, 478 "up": self.up, 479 "upRepeated": self.up, 480 "downRepeated": self.down, 481 "menu": self.settings_menu, 482 "startTeletext": self.switch_ListTyp, 483 "showEventInfo": self.info, 450 "showTv": self.FavMenu, 484 451 "down": self.down 485 452 }, -1) … … 510 477 if url.find("addons.aaf-board.net") > -1: 511 478 aafpointer = aafpointer +1 512 if url.find("ke2.aaf-board.info") > -1: 513 aafpointer = aafpointer +1 514 515 if str(aafpointer) <= "2": 479 480 if str(aafpointer) <= "0": 481 #if str(aafpointer) <= "2": 516 482 print "Permission denied ", str(aafpointer) 517 483 self["statusbar"].text = _("Sorry, Permission denied") … … 520 486 self.focus = self.LIST_SOURCE 521 487 self.read_Boxtyp() 488 489 self.plug = "ipk" 490 491 if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/startservice.cfg"): 492 file = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/startservice.cfg","r") 493 self.plugin_filter = str(file.readline().strip()) 494 file.close() 495 else: 496 self.plugin_filter = "-" # show all ipk 497 498 if box <> "dm8000": 499 evfd.getInstance().vfd_write_string("load PlugList") 500 if os.path.exists("/var/etc/ipkg/official-feed.conf") is True: 501 file = open("/var/etc/ipkg/official-feed.conf", "r") 502 self.feed_base = file.readline().strip() 503 self.feed_base = self.feed_base.replace(u"src/gz cross ","") 504 self.feed_base = str(self.feed_base) + "/" 505 elif os.path.exists("/etc/ipkg/official-feed.conf") is True: 506 file = open("/etc/ipkg/official-feed.conf", "r") 507 self.feed_base = file.readline().strip() 508 self.feed_base = self.feed_base.replace(u"src/gz cross ","") 509 self.feed_base = str(self.feed_base) + "/" 522 510 self.feed_download() 511 512 def FavMenu(self): 513 Filter = "-" 514 self.session.openWithCallback(self.MenuCallback, FilterPanel,Filter) 515 516 def MenuCallback(self): 517 global menu 518 print "FavMenu Callback", menu 519 if menu == "stop": 520 menu = "-" 521 self.plugin_filter = menu 522 self.feed_finished(self.feedhtml) 523 523 524 524 525 def BackupRestoreVU(self): … … 526 527 527 528 def BackupRestore(self): 528 if self.betacode == True:529 529 self.session.open(RestoreConfigScreenVU) 530 531 #----- Beta Download Procedures -------------------------------------------------------532 def beta_load(self):533 self.previewtimeout = config.AddonManager.preview_timeout.value534 print "[Addon-Manager] " + str(self.previewtimeout)535 self.downloading(True)536 self.download = self.beta_load537 client.getPage(self.burl).addCallback(self.beta_finished).addErrback(self.beta_failed)538 539 def beta_failed(self, failure_instance):540 print "[Addon-Manager] [feed_failed] " + str(failure_instance)541 self["infolabel"].text = _("Could not connect to AAF-Plugin Server:") + "\n" + failure_instance.getErrorMessage() + "\n\n" + _("Please check your network settings!")542 self.downloading(False)543 544 def beta_finished(self, feedhtml):545 print "[Addon-Manager] [feed_finished] " + str(feedhtml)546 self.downloading(False)547 b_version = feedhtml[0:len(feedhtml) -1]548 if str(self.previewtimeout) == str(b_version):549 self.previewtimeout = 600550 self.betacode = True551 else:552 self.betacode = False553 530 554 531 def downloading(self, state=True): … … 560 537 else: 561 538 self.download = None 562 self["key_red"].text = _("Plugin") 563 self["key_green"].text = (_("IPK")) 564 565 if box == "dm8000": 566 self["key_yellow"].text = (_("Skins")) 567 self["key_1"].text = _("(1) Settings") 568 self["key_2"].text = (_("(2) Picons")) 569 self["key_3"].text = (_("(5) Back/Rest")) 570 self["key_4"].text = (_(" ")) 571 else: 572 self["key_yellow"].text = (_("EmuConfig")) 573 self["key_1"].text = _("(1) Settings") 574 self["key_2"].text = (_("(2) Bootbilder")) 575 self["key_3"].text = (_("(3) Radiobilder")) 576 539 self["key_red"].text = _("System") 540 self["key_green"].text = (_("Skins")) 541 self["key_yellow"].text = (_("Players")) 577 542 self["key_blue"].text = (_("Emus")) 578 579 if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ufs922") is False: 580 if box <> "dm8000": 581 if self.betacode == True: 582 self["key_4"].text = (_("(5) Back/Rest")) 583 else: 584 self["key_4"].text = (_(" ")) 585 self.read_Boxtyp() 543 self["key_1"].text = _("(1) Bootbilder") 544 self["key_2"].text = (_("(2) Select")) 545 self["key_3"].text = (_("(3) SWAP all")) 546 self["key_4"].text = (_("(4) IPK all")) 586 547 587 548 def switchList(self,to_where=None): … … 591 552 self["job_progressbar"].value = 0 592 553 self["job_progresslabel"].text = "" 593 594 #self.focus = self.LIST_SOURCE595 554 596 555 if self.focus is self.LIST_DEST: … … 600 559 self["destlist"].show() 601 560 602 603 561 if self.focus is self.LIST_SOURCE: 604 562 self["statusbar"].text = _("Please choose file from AAF Server to download") 605 606 if self.betacode == True and self.plug == "beta": 607 self["label_top"].text = _("you are in the AAF BETA Zone!") 608 else: 609 self["label_top"].text = _("...select file from server ")+ self.box 610 563 self["label_top"].text = _("...select file (FAV = Filter)") 611 564 self["feedlist"].show() 612 565 self["destlist"].hide() 613 566 self["label_bottom"].text = _("attached to: ")+ activenam 614 #self["key_yellow"].text = (_(" ")) 567 615 568 616 569 #----- load Menutext or Picture ------------------------------------------------------- … … 750 703 os.system("mkdir /tmp/aaf") 751 704 752 if self.plug == "ipk": 753 ipkurl = command('cat /var/etc/ipkg/official-feed.conf | cut -d "/" -f4') 754 os.system("cd /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/; ./ipkdownload") 755 if os.path.exists("/tmp/aaf/index.txt") is True: 756 feedhtml = open("/tmp/aaf/index.txt").read() 757 self.feed_finished(feedhtml) 758 else: 759 client.getPage(self.feed_base + "index.txt").addCallback(self.feed_finished).addErrback(self.feed_failed) 705 ipkurl = command('cat /var/etc/ipkg/official-feed.conf | cut -d "/" -f4') 706 os.system("cd /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/; ./ipkdownload") 707 if os.path.exists("/tmp/aaf/index.txt") is True: 708 self.feedhtml = open("/tmp/aaf/index.txt").read() 709 self.feed_finished(self.feedhtml) 760 710 761 711 … … 766 716 767 717 def feed_finished(self, feedhtml): 768 print "[Addon-Manager] [feed_finished] " + str(feedhtml)718 #print "[Addon-Manager] [feed_finished] " + str(feedhtml) 769 719 self.downloading(False) 770 720 771 if self.plug == "ipk": 772 fileresultmask = re.compile("(?P<name>.*?)\#\#(?P<url>.*?_sh4.ipk)", re.DOTALL) 773 elif box == "dm8000": 721 fileresultmask = re.compile("(?P<name>.*?)\#\#(?P<url>.*?_sh4.ipk)", re.DOTALL) 722 if box == "dm8000": 774 723 fileresultmask = re.compile("(?P<name>.*?)\#\#(?P<url>.*?.ipk)", re.DOTALL) 775 else:776 fileresultmask = re.compile("(?P<name>.*?)\#\#(?P<url>.*?.gz)", re.DOTALL)777 724 778 725 if os.path.exists("/var/etc/uninst") is False: … … 786 733 fd.close() 787 734 inhalt = inhalt.lower() 788 inhalt = inhalt.replace("\ r\n","")789 735 inhalt = inhalt.replace("\n","") 736 inhalt = inhalt.replace("\r","") 790 737 searchresults = fileresultmask.finditer(feedhtml) 791 #print searchresults792 738 793 739 ausblenden = 0 794 self.ungenau = config.AddonManager.ungenau.value740 #self.ungenau = config.AddonManager.ungenau.value 795 741 self.farbe = config.AddonManager.mark_color.value 796 742 … … 805 751 for x in searchresults: 806 752 url = x.group("url") 753 754 # filtering the Filename string 755 if url.find(self.plugin_filter) > -1: 756 #print "url=", url 757 ausblenden = 0 758 else: 759 ausblenden = 1 760 807 761 if url[0:7] != "http://": 808 762 url = self.feed_base + x.group("url") … … 811 765 name_lo = name_lo.replace("\n","") 812 766 name_lo = name_lo.replace("\r","") 813 if self.ungenau == 1:814 name_lo = name_lo.split("_")[0]815 767 font_s = 0 768 name_lo = name_lo.split("_")[0] 769 #print "name_lo = ", str(name_lo) 816 770 817 771 if self.marker_on == True: 818 if inhalt.find(name_lo) > -1 :772 if inhalt.find(name_lo) > -1 and ausblenden == 0: 819 773 font_s = 1 820 774 if self.marker_off != True: … … 825 779 if ausblenden == 0: 826 780 if font_s == 1: 827 entry = [[name, url],(eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 250, 30, 0, RT_HALIGN_LEFT|RT_VALIGN_CENTER, name, farbwahl)]781 entry = [[name, url],(eListboxPythonMultiContent.TYPE_TEXT, 0, 0,300, 30, 0, RT_HALIGN_LEFT|RT_VALIGN_CENTER, name, farbwahl)] 828 782 else: 829 entry = [[name, url],(eListboxPythonMultiContent.TYPE_TEXT, 0, 0,250, 30, 0, RT_HALIGN_LEFT|RT_VALIGN_CENTER, name)] 830 #print "[Addon-Manager] adding to feedlist: " + str(entry) 783 entry = [[name, url],(eListboxPythonMultiContent.TYPE_TEXT, 0, 0,300, 30, 0, RT_HALIGN_LEFT|RT_VALIGN_CENTER, name)] 831 784 fileresultlist.append(entry) 832 #rot = ff0000 16711680833 #gruen = 00ff00 65280834 # blau = 0000ff 255835 785 else: 836 786 ausblenden = 0 787 837 788 self["feedlist"].l.setList(fileresultlist) 838 789 self["feedlist"].moveSelection(0) … … 843 794 self["infolabel"].text = _("Cannot parse feed directory") 844 795 796 if box <> "dm8000": 797 evfd.getInstance().vfd_write_string("AddonManager") 798 799 845 800 #----- List Download Procedures ------------------------------------------------------- 846 801 def list_download(self): 802 global PreviewPath 803 global LISTurlText 847 804 if self.showpreview == True: 848 print "[Addon-Manager] [check_for_LIST]"805 #print "[Addon-Manager] [check_for_LIST]" 849 806 if self["feedlist"].isValid(): 850 print "[Addon-Manager] PLUGINname: " + self["feedlist"].getPLUGINname()807 #print "[Addon-Manager] PLUGINname: " + self["feedlist"].getPLUGINname() 851 808 self["job_progressbar"].value = 0 852 809 self["job_progresslabel"].text = "" … … 856 813 self["key_green"].text = _("Download") 857 814 LISTurl = self["feedlist"].getLISTurl() 858 LISTurl = LISTurl+".png" 859 860 print "[Addon-Manager] downloading " + LISTurl 815 LISTurl1 = LISTurl.split("_")[0] 816 UrlLink = LISTurl.split("enigma2-plugin-")[0] 817 LISTName = LISTurl1.split("enigma2-plugin-")[1].split("-")[1] 818 819 if LISTName.find(".") > -1: 820 LISTName = LISTName.split(".")[0] 821 822 LISTurl = PreviewPath + "/enigma2-pluginpreview-" + LISTName+".png" 823 LISTurlText = PreviewPath + "/enigma2-pluginpreview-" + LISTName+".txt" 824 825 #print "[Addon-Manager] downloading " + LISTurl 861 826 self.download = self.list_download 862 827 self.downloading(True) … … 875 840 876 841 def list_finished(self,LISTdata=""): 877 print "[Addon-Manager] [list_finished] " + str(LISTdata)842 #print "[Addon-Manager] [list_finished] " + str(LISTdata) 878 843 self.downloading(False) 879 844 self.LIST = LISTdata … … 899 864 # no pic-file, now look for txt 900 865 self["statusbar"].text = _("Downloading file description...") 901 LISTurl = self["feedlist"].getLISTurl()866 #LISTurl = self["feedlist"].getLISTurl() 902 867 #client.getPage(LISTurl, headers={"Authorization":authHeader}).addCallback(self.list_finished).addErrback(self.list_failed) 903 client.getPage(LISTurl).addCallback(self.list_finished).addErrback(self.list_failed) 868 global LISTurlText 869 client.getPage(LISTurlText).addCallback(self.list_finished).addErrback(self.list_failed) 904 870 905 871 self.downloading(False) … … 937 903 self["Preview"].show() 938 904 self["Preview"].instance.setPixmapFromFile(self.previewPath) 939 #self["key_yellow"].text = (_("Skins"))940 905 else: 941 906 self.showpreview = 1 … … 945 910 946 911 def read_Boxtyp(self): 947 # Boytyp lesen948 912 file = open("/proc/stb/info/model", "r") 949 913 self.box = file.readline().strip() 950 914 file.close() 951 # Topfield "TF7700HDPVR" 952 if self.box == "cuberevo" or self.box == "cuberevo-mini" or self.box == "cuberevo-mini2": 953 self.box = "cuberevo" 954 #if self.box == "ufs910" or self.box == "UFS922": 955 # self.box = "ufs" 956 957 #----- you press au Menu-key, define the urls---------------------------------- 958 def beta_download(self): 959 self.beta_load() 960 if self.betacode == True: 961 print "[Addon-Manager] you are in AAF-Betasection" 962 self.previewtimeout = 600 963 if box <> "dm8000": 964 evfd.getInstance().vfd_write_string("BETA-Section") 965 self.plug = "beta" 966 serverurlbeta = "http://kati910.aaf-board.info/dbase/E2/" 967 #serverurlbeta = "http://addons.aaf-board.net/E2/" old server 968 self.feed_base = serverurlbeta + "%s/" % self.plug 969 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 970 self.feed_download() 971 972 def plugins_download(self): 973 self.plug = "plugins" 915 916 def red_download(self): 974 917 if box <> "dm8000": 975 918 evfd.getInstance().vfd_write_string("Plugins") 976 self.feed_base = serverurl + "%s/" % self.plug 977 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 978 self.feed_download() 979 980 def patches_download(self): 981 self.plug = "patches" 919 self.plugin_filter = "system-" 920 self.feed_finished(self.feedhtml) 921 922 def green_download(self): 982 923 if box <> "dm8000": 983 evfd.getInstance().vfd_write_string("Patches") 984 self.feed_base = serverurl + "%s/" % self.plug 985 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 986 self.feed_download() 987 988 def emus_download(self): 989 self.plug = "emus" 924 evfd.getInstance().vfd_write_string("Settings") 925 self.plugin_filter = "skins-" 926 self.feed_finished(self.feedhtml) 927 928 def yellow_download(self): 929 if box <> "dm8000": 930 evfd.getInstance().vfd_write_string("EmusConfig") 931 self.plugin_filter = "players-" 932 self.feed_finished(self.feedhtml) 933 934 def blue_download(self): 990 935 if box <> "dm8000": 991 936 evfd.getInstance().vfd_write_string("Emus") 992 self.feed_base = serverurl + "%s/" % self.plug 993 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 994 self.feed_download() 995 996 def emusconfig_download(self): 997 self.plug = "emusconfig" 998 if box <> "dm8000": 999 evfd.getInstance().vfd_write_string("EmusConfig") 1000 self.feed_base = serverurl + "%s/" % self.plug 1001 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 1002 self.feed_download() 1003 1004 def settings_download(self): 1005 self.plug = "settings" 1006 if box <> "dm8000": 1007 evfd.getInstance().vfd_write_string("Settings") 1008 self.feed_base = serverurl + "%s/" % self.plug 1009 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 1010 self.feed_download() 1011 1012 def skins_download(self): 1013 self["key_yellow"].text = (_("Skins")) 1014 self.read_Boxtyp() 1015 self.plug = "skins" 1016 if self.box == "cuberevo": 1017 self.plug = "skins_cuberevo" 1018 if box <> "dm8000": 1019 evfd.getInstance().vfd_write_string("Skins") 1020 self.feed_base = serverurl + "%s/" % self.plug 1021 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 1022 self.feed_download() 1023 1024 def ipks_download(self): 1025 self.read_Boxtyp() 1026 print "Boxtyp=" + self.box 1027 if box == "dm8000": 1028 self.ipks_vudownload() 1029 else: 1030 self.plug = "ipk" 1031 if box <> "dm8000": 1032 evfd.getInstance().vfd_write_string("IPK") 1033 if os.path.exists("/var/etc/ipkg/official-feed.conf") is True: 1034 file = open("/var/etc/ipkg/official-feed.conf", "r") 1035 self.feed_base = file.readline().strip() 1036 self.feed_base = self.feed_base.replace(u"src/gz cross ","") 1037 self.feed_base = str(self.feed_base) + "/" 1038 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 1039 elif os.path.exists("/etc/ipkg/official-feed.conf") is True: 1040 file = open("/etc/ipkg/official-feed.conf", "r") 1041 self.feed_base = file.readline().strip() 1042 self.feed_base = self.feed_base.replace(u"src/gz cross ","") 1043 self.feed_base = str(self.feed_base) + "/" 1044 else: 1045 self.feed_base = serverurl + "%s/" % self.plug 1046 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 1047 self.feed_download() 1048 1049 def ipks_vudownload(self): 1050 self.plug = "ipkvu" 1051 if box <> "dm8000": 1052 evfd.getInstance().vfd_write_string("IPK-VU") 1053 self.feed_base = serverurl + "ipk/" 1054 self.plugin_filter = "" 1055 print "DownTyp=" + self.feed_base 1056 self.feed_download() 1057 1058 def bootbilder_download(self): 1059 self.plug = "bootbilder" 937 self.plugin_filter = "emus-" 938 self.feed_finished(self.feedhtml) 939 940 941 # ----- Numbers -------- 942 def eins_download(self): 1060 943 if box <> "dm8000": 1061 944 evfd.getInstance().vfd_write_string("Bootbilder") 1062 self.feed_base = serverurl + "%s/" % self.plug 1063 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 1064 self.feed_download() 1065 1066 def radiobilder_download(self): 1067 self.plug = "radiobilder" 945 self.plugin_filter = "bootlogos-" 946 self.feed_finished(self.feedhtml) 947 948 def zwei_download(self): 1068 949 if box <> "dm8000": 1069 950 evfd.getInstance().vfd_write_string("Radiobilder") 1070 self.feed_base = serverurl + "%s/" % self.plug 1071 self.plugin_filter = "" # "release" # only show IPKs containing this string, or all if "" 1072 self.feed_download() 1073 1074 def spiele_download(self): 1075 self.plug = "spiele" 951 self.plugin_filter = "radiologos-" 952 self.feed_finished(self.feedhtml) 953 954 def drei_download(self): 1076 955 if box <> "dm8000": 1077 evfd.getInstance().vfd_write_string("Spiele") 1078 self.feed_base = serverurl + "%s/" % self.plug 1079 self.plugin_filter = "" 1080 self.feed_download() 1081 1082 def picons_download(self): 1083 self.plug = "picons" 956 evfd.getInstance().vfd_write_string("SWAP all") 957 self.plugin_filter = "swap" 958 self.feed_finished(self.feedhtml) 959 960 def vier_download(self): 1084 961 if box <> "dm8000": 1085 evfd.getInstance().vfd_write_string("Picons") 1086 self.feed_base = serverurl + "%s/" % self.plug 1087 self.plugin_filter = "" 1088 self.feed_download() 962 evfd.getInstance().vfd_write_string("IPK all") 963 self.plugin_filter = "-" 964 self.feed_finished(self.feedhtml) 965 966 def fuenf_download(self): 967 if box <> "dm8000": 968 evfd.getInstance().vfd_write_string("IPK all") 969 self.plugin_filter = "-" 970 self.feed_finished(self.feedhtml) 971 972 1089 973 1090 974 #----- plugin download ------------------------------------------------------------ … … 1153 1037 def plugin_finished(self, string=""): 1154 1038 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log", "w") 1155 ffile.write("BA-Typ:" + self.BAtyp)1156 ffile.write("\n")1157 1039 ffile.write("gedrueckte Kategorie:" + self.plug) 1158 1040 ffile.write("\n") … … 1165 1047 ffile.close() 1166 1048 1167 # Boxtyp lesen1168 file = open("/proc/stb/info/model", "r")1169 self.box = file.readline().strip()1170 file.close()1171 1172 self["statusbar"].text = _("Decompressing Tar-File...")1173 os.system("cd /tmp/aaf; tar -xzf downfile.tar.gz; sync")1174 #os.system("rm /tmp/aaf/downfile.tar.gz")1175 1176 # is it a Flashimage, check for freespace?1177 #GOst begin1178 if os.path.exists("/etc/.imagesignature") is True:1179 file = open("/etc/.imagesignature", "r")1180 imagetype = file.readline().strip()1181 imagetype = imagetype.replace("\n","")1182 file.close()1183 else:1184 imagetype = "NONE"1185 print imagetype1186 os.system("touch /flashtest.txt")1187 #GOst end1188 #GOst and imagetype is not "flash_gost_e2_ufs922"1189 if os.path.exists("/flashtest.txt") is False and imagetype != "flash_gost_e2_ufs922":1190 # is enough freespace on flash?1191 filesize = 01192 freesize = 01193 os.system("df /dev/mtdblock3 |grep var|cut -c41-50 >/tmp/free.txt")1194 if os.path.exists("/tmp/free.txt") is True:1195 f = open("/tmp/free.txt", "r" )1196 for line in f:1197 freesize = line.lstrip()1198 f.close1199 freesize = freesize.replace("\n","")1200 freesize = int(freesize)1201 print "[Addon-Manager] Flash=", freesize1202 #GOst ---> cut -c1-4 -nach-> cut -d\t -f11203 os.system("du -sc /tmp/aaf |grep total|cut -dt -f1 >/tmp/free2.txt")1204 if os.path.exists("/tmp/free2.txt") is True:1205 f = open("/tmp/free2.txt", "r" )1206 for line in f:1207 filesize = line.lstrip()1208 f.close1209 filesize = filesize.replace("\n","")1210 filesize = int(filesize)1211 print "[Addon-Manager] File=", filesize1212 1213 # no Test, while Emu is linked to swap1214 if os.path.exists("/tmp/aaf/var/emu") is True:1215 if self.box == "ufs910":1216 print "[Addon-Manager] linked to swap"1217 filesize = 11218 1219 if freesize > filesize:1220 print "[Addon-Manager] FreeSpace is ready"1221 self["statusbar"].text = _("FreeSpace in Flash is ready!")1222 # NOT enough memory1223 else:1224 print "[Addon-Manager] FreeSpace Error in Flash!"1225 #def __init__(self, session, title = "Console", cmdlist = None, finishedCallback = None, closeOnSuccess = False):1226 1227 self["statusbar"].text = _("FreeSpace Error!")1228 print "[Addon-Manager] frei=", freesize,"File=",filesize1229 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1230 ffile.write("FreeSpace Error in Flash!")1231 ffile.write("\n")1232 ffile.close()1233 self.downloading(False)1234 message = "%s %s %s %s %s" % (_("Speicherfehler: zu wenig Speicher im Flashimage frei!\n frei="),freesize, _("Kb benoetigt="), filesize, _("Kb\nBitte deinstallieren sie andere Plugins!"))1235 self.session.open(MessageBox,message, MessageBox.TYPE_INFO)1236 return1237 1238 # check if Directory /var/emu is correct linked1239 if os.path.exists("/var/emu") is False:1240 os.system("cd /var; ln -s /var/bin emu")1241 1242 # im Flash den emu nach /var/bin installieren1243 if os.path.exists("/tmp/aaf/var/emu") is True:1244 if self.box == "ufs910":1245 self.swaptest = False1246 if os.path.exists("/var/swap/bin") is True:1247 print "[Addon-Manager] Emu wird im Swap des Flash installiert"1248 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1249 ffile.write("Emu wird im Swap des Flash installiert")1250 ffile.write("\n")1251 ffile.close()1252 1253 os.system("mkdir -p /tmp/aaf/var/swap/bin")1254 os.system("cp /tmp/aaf/var/emu/* /tmp/aaf/var/swap/bin")1255 os.system("rm -r /tmp/aaf/var/emu")1256 self.swaptest = True1257 if os.path.exists("/tmp/aaf/lib") is True:1258 print "[Addon-Manager] Lib wird im Swap des Flash installiert"1259 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1260 ffile.write("Lib wird im Swap des Flash installiert")1261 ffile.write("\n")1262 ffile.close()1263 1264 os.system("mkdir -p /tmp/aaf/var/swap/lib")1265 os.system("cp /tmp/aaf/lib/* /tmp/aaf/var/swap/lib")1266 os.system("rm -r /tmp/aaf/lib")1267 else:1268 print "[Addon-Manager] Emu wird im Flash installiert"1269 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1270 ffile.write("Emu wird im Flash installiert")1271 ffile.write("\n")1272 ffile.close()1273 1274 os.system("mv /tmp/aaf/var/emu /tmp/aaf/var/bin")1275 1276 # und die inst.sh loeschen, Installation uebernimmt jetzt AM1277 if os.path.exists("/tmp/aaf/inst.sh") is True:1278 os.system("rm /tmp/aaf/inst.sh; sync")1279 1280 # und nun in der ufs910 im Flash den emu installieren1281 os.system("rm /tmp/aaf/*.tar.gz ; sync")1282 os.system("cp -RP /tmp/aaf/* / ; sync")1283 if self.swaptest == True:1284 os.system("cd /usr/lib/enigma2/python/Plugins/Extensions/AddonManager; ./do_link.sh")1285 print "[Addon-Manager] Emu wude nach /var/swap/bin verlinkt"1286 1287 if os.path.exists("/tmp/aaf/inst.sh") is True:1288 print "[Addon-Manager] Preinst gefunden (inst.sh)"1289 #os.system("sed -e 's/cp -RP /. \/usr\/lib\/enigma2\/python\/Plugins\/Extensions\/AddonManager\/cp_r.func; cp_r \/tmp\/aaf\//g' -i /tmp/aaf/inst.sh")1290 #os.system("sed -e 's/cp -RP /cp_r /g' -i /tmp/aaf/inst.sh")1291 #os.system("cd /tmp/aaf; ./inst.sh" )1292 os.system("(. /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/cp_r.func; cd /tmp/aaf; ./inst.sh)" )1293 #os.system("rm -r /tmp/aaf")1294 #os.system("cd / ; rm *tar.gz ; rm inst.sh")1295 else:1296 # Boxtyp lesen1297 file = open("/proc/stb/info/model", "r")1298 self.box = file.readline().strip()1299 file.close()1300 # Topfield "TF7700HDPVR"1301 1302 #self.box ="dm8000"1303 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1304 ffile.write("erkannter Boxtyp:" + self.box)1305 ffile.write("\n")1306 ffile.close()1307 1308 # is it a Flashimage and you press "plugins"?1309 os.system("touch /flashtest.txt")1310 1311 if os.path.exists("/flashtest.txt") is False:1312 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1313 ffile.write("es ist ein Flashimage")1314 ffile.write("\n")1315 ffile.close()1316 1317 if self.box == "cuberevo" or self.box == "cuberevo-mini" or self.box == "cuberevo-mini2":1318 self.box = "cuberevo"1319 1320 if self.box == "ufs910" or self.box == "UFS922" or self.box == "cuberevo":1321 if self.plug == "bootbilder" or self.plug == "plugins":1322 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1323 ffile.write("Bootbild oder Plugin wird installiert")1324 ffile.write("\n")1325 ffile.close()1326 1327 1328 #/tmp/aaf/usr/lib/enigma2/python/Plugins/Extensions/1329 if os.path.exists("/media/usb/sda1/swapfile") is True:1330 os.system("mount /dev/sda1 /var/swap")1331 if os.path.exists("/media/usb/sdb1/swapfile") is True:1332 os.system("mount /dev/sdb1 /var/swap")1333 if os.path.exists("/media/usb/sdc1/swapfile") is True:1334 os.system("mount /dev/sdc1 /var/swap")1335 if os.path.exists("/media/usb/sdd1/swapfile") is True:1336 os.system("mount /dev/sdd1 /var/swap")1337 1338 if os.path.exists("/var/swap/swapfile") is False:1339 message = "%s" % (_("Es ist kein Swapfile eingerichtet!\nBitte Swapstick aktivieren!"))1340 self.session.open(MessageBox, message, MessageBox.TYPE_INFO)1341 return1342 1343 swaptarget = "/var/swap/"1344 if os.path.exists(swaptarget + "Extensions") is False:1345 CpString = "mkdir -p " + swaptarget + "Extensions"1346 os.system(CpString)1347 1348 if self.plug == "plugins":1349 dir = listdir("/tmp/aaf/usr/lib/enigma2/python/Plugins/Extensions")1350 for x in dir:1351 if path.isdir("/tmp/aaf/usr/lib/enigma2/python/Plugins/Extensions/" + x) == True:1352 print x1353 #name = x.split('/')[-1]1354 1355 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1356 ffile.write("entpacken fuer Flashimage")1357 ffile.write("\n")1358 ffile.write("cp -RP /tmp/aaf/usr/lib/enigma2/python/Plugins/Extensions " + swaptarget)1359 ffile.write("\n")1360 ffile.close()1361 1362 CpString = "rm -r /usr/lib/enigma2/python/Plugins/Extensions/" + x1363 os.system(CpString)1364 CpString = "ln -s " + swaptarget + "Extensions/" + x + " /usr/lib/enigma2/python/Plugins/Extensions/"1365 os.system(CpString)1366 1367 CpString = "cp -RP /tmp/aaf/usr/lib/enigma2/python/Plugins/Extensions " + swaptarget + "; sync"1368 os.system(CpString)1369 os.system("cp -RP /tmp/aaf/var/etc/uninst /var/etc/ ; sync")1370 1371 if self.plug == "bootbilder":1372 CpString = "cp -RP /tmp/aaf/boot /var/etc/ ; sync"1373 os.system(CpString)1374 os.system("cp -RP /tmp/aaf/var/etc/uninst /var/etc/ ; sync")1375 1376 if self.plug == "emusconfig" or self.plug == "patches":1377 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1378 ffile.write("es ist ein Flashimage (emusconfig)")1379 ffile.write("\n")1380 ffile.write("cp -RP /tmp/aaf/* / ; sync")1381 ffile.write("\n")1382 ffile.close()1383 print "[Addon-Manager] EmuConfig wird installiert!"1384 os.system("cp -RP /tmp/aaf/* / ; sync")1385 1386 # es ist ein Flash aber keine ufs9101387 else:1388 #self.box = "dm8000"1389 if box == "dm8000":1390 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1391 ffile.write("es ist ein Flashimage aber keine ufs910")1392 ffile.write("\n")1393 ffile.write("IPKvu wird entpackt!")1394 ffile.write("\n")1395 ffile.close()1396 self["statusbar"].text = _("Decompressing IPK-File...")1397 os.system("cd /tmp/aaf ; ipkg install /tmp/aaf/downfile.sh4.ipk")1398 #os.system("rm -r /tmp/aaf")1399 else:1400 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1401 ffile.write("es ist ein Flashimage aber keine ufs910")1402 ffile.write("\n")1403 ffile.write("cp -RP /tmp/aaf/* / ; sync")1404 ffile.write("\n")1405 ffile.close()1406 #GOst begin1407 #os.system("cp -RP /tmp/aaf/* / ; sync")1408 os.system("(cd /tmp/aaf; tar -xzf *tar.gz -C / ; sync)")1409 #GOst end1410 1411 # es ist kein Flash1412 else:1413 if box == "dm8000":1414 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1415 ffile.write("IPKvu wird entpackt!")1416 ffile.write("\n")1417 ffile.close()1418 self["statusbar"].text = _("Decompressing IPK-File...")1419 os.system("cd /tmp/aaf ; ipkg install /tmp/aaf/downfile.sh4.ipk")1420 os.system("rm -r /tmp/aaf")1421 else:1422 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")1423 ffile.write("es ist kein Flashimage")1424 ffile.write("\n")1425 ffile.write("cp -RP /tmp/aaf/* / ; sync")1426 ffile.write("\n")1427 ffile.close()1428 #GOst begin1429 #os.system("(. /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/cp_r.func; cp_r /tmp/aaf / ; sync)")1430 os.system("(cd /tmp/aaf; tar -xzf *tar.gz -C / ; sync)")1431 #GOst end1432 1433 os.system("rm -r /tmp/aaf")1434 os.system("cd / ; rm *tar.gz")1435 1049 else: 1436 1050 ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a") … … 1441 1055 self["statusbar"].text = _("Decompressing IPK-File...") 1442 1056 os.system("cd /tmp/aaf ; ipkg update") 1443 os.system("cd /tmp/aaf ; ipkg install /tmp/aaf/downfile.sh4.ipk") 1057 1058 if config.AddonManager.ungenau.value == 1: 1059 self.CpString = "cd /tmp/aaf ; ipkg install /tmp/aaf/downfile.sh4.ipk" 1060 self.session.open(Console, title = _("IPK Installer"), cmdlist = ["%s" % self.CpString], closeOnSuccess = False) 1061 else: 1062 os.system("cd /tmp/aaf ; ipkg install /tmp/aaf/downfile.sh4.ipk") 1063 1444 1064 os.system("rm -r /tmp/aaf") 1445 1065 … … 1449 1069 #if self.plug == "skins": 1450 1070 # self.session.open(SkinSelector) 1451 1452 if self.plug == "settings":1453 restartbox = self.session.openWithCallback(self.restartGUI,MessageBox,_("Die Installation hat einen Neustart angefordert!\nBei NEIN muss die Installation wiederholt werden!"), MessageBox.TYPE_YESNO)1454 restartbox.setTitle(_("UFS-Box starten?"))1455 1456 def restart(self, answer):1457 if answer is True:1458 os.system("sync")1459 os.system("reboot -f")1460 1071 1461 1072 def restartGUI(self, answer): … … 1490 1101 def closeCB(self): 1491 1102 if self.download: 1492 #self.download.stop()1493 #self.plugin_failed(None, "Cancelled by user request")1494 1103 self.downloading(False) 1495 1104 else: … … 1535 1144 self.list.append(getConfigListEntry(_("Installierte Plugins in Liste farbig markieren"), config.AddonManager.marker_on)) 1536 1145 self.list.append(getConfigListEntry(_("Markierungsfarbe (0=rot, 1=gruen, 2=blau)"), config.AddonManager.mark_color)) 1537 self.list.append(getConfigListEntry(_("Install ierte Plugins feststellen (0=genau, 1=ungenau)"), config.AddonManager.ungenau))1146 self.list.append(getConfigListEntry(_("Installations Konsole am Bildschirm (0=Aus, 1=Ein)"), config.AddonManager.ungenau)) 1538 1147 1539 1148 ConfigListScreen.__init__(self, self.list) … … 1554 1163 x[1].save() 1555 1164 config.save() 1556 #config.AddonManager.save()1557 1165 self.showpreview = config.AddonManager.preview_on.value 1558 1166 self.previewtimeout = config.AddonManager.preview_timeout.value … … 1565 1173 activesource = "http://kati910.aaf-board.info/dbase" 1566 1174 activenam = "Secondary-Server" 1567 #if self.betacode == True:1568 # self.previewtimeout = 6001569 1175 #restore() 1570 1176 self.close() … … 1684 1290 Screen.__init__(self, session) 1685 1291 1686 #self.focus = None1687 1292 self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions", "MovieSelectionActions"], 1688 1293 { … … 1768 1373 self.filename = None 1769 1374 self.filename = self.filelist.getFilename() 1770 #self.filename = self.currDir + "/" + self.currBox + "/" + self.filename1771 1375 self.fullname = self.currDir + "/" + self.filename 1772 1376 print "[AddonManager] Select-Filename=", self.filename 1773 1377 self["filelist"].refresh() 1774 1775 1378 self.CpString = "/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.sh " + self.filename + " boot" 1776 1379 self.session.open(Console, title = _("Restore - Settings"), cmdlist = ["%s" % self.CpString], closeOnSuccess = False) … … 1779 1382 def Exit(self): 1780 1383 self.close() 1781 #----------------------------------------------------------------- 1384 1385 # ------------------------------------------------------------------- 1386 class FilterPanelList(MenuList): 1387 def __init__(self, list, font0 = 28, font1 = 16, itemHeight = 60, enableWrapAround = True): 1388 MenuList.__init__(self, [], False, eListboxPythonMultiContent) 1389 self.l.setFont(0, gFont("Regular", font0)) 1390 self.l.setFont(1, gFont("Regular", font1)) 1391 self.l.setItemHeight(itemHeight) 1392 1393 # ------------------------------------------------------------------- 1394 class FilterPanel(Screen, HelpableScreen): 1395 def __init__(self, session, Filter): 1396 self.session = session 1397 self.skin = """ 1398 <screen name="FilterPanel" position="center,center" size="430,440" title="Filterauswahl" backgroundColor="#252525"> 1399 <widget name="Mlist" position="10,5" size="400,400" zPosition="3" backgroundColor="#252525" backgroundColorSelected="#565656" scrollbarMode="showOnDemand" /> 1400 1401 <eLabel position="0,410" zPosition="2" size="430,1" backgroundColor="#c1cdc1" /> 1402 <widget source="key_blue" render="Label" position="260,417" zPosition="2" size="200,30" font="Regular;20" valign="center" halign="left" transparent="1" /> 1403 <ePixmap position="200,420" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" /> 1404 <widget source="key_red" render="Label" position="80,417" zPosition="2" size="150,30" font="Regular;20" valign="center" halign="left" transparent="1" /> 1405 <ePixmap position="20,420" size="36,20" pixmap="skin_default/buttons/key_red.png" transparent="1" alphatest="on" /> 1406 1407 </screen>""" 1408 1409 Screen.__init__(self, session) 1410 self.Mlist = [] 1411 1412 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('bootlogos'), _("bootlogos"), 'bootlogos'))) 1413 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('browsers'), _("browsers"), 'browsers'))) 1414 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('editors'), _("editors"), 'editors'))) 1415 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('emus'), _("emus"), 'emus'))) 1416 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('epg'), _("epg"), 'epg'))) 1417 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('fonts'), _("fonts"), 'fonts'))) 1418 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('games'), _("games"), 'games'))) 1419 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('infos'), _("infos"), 'infos'))) 1420 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('keymaps'), _("keymaps"), 'keymaps'))) 1421 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('mediacenter'), _("mediacenter"), 'mediacenter'))) 1422 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('picons'), _("picons"), 'picons'))) 1423 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('players'), _("players"), 'players'))) 1424 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('radiologos'), _("radiologos"), 'radiologos'))) 1425 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('settings'), _("settings"), 'settings'))) 1426 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('skins'), _("skins"), 'skins'))) 1427 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('spinner'), _("spinner"), 'spinner'))) 1428 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapbrowsers'), _("swapbrowsers"), 'swapbrowsers'))) 1429 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapeditors'), _("swapeditors"), 'swapeditors'))) 1430 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapemus'), _("swapemus"), 'swapemus'))) 1431 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapepg'), _("swapepg"), 'swapepg'))) 1432 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapgames'), _("swapgames"), 'swapgames'))) 1433 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapinfos'), _("swapinfos"), 'swapinfos'))) 1434 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapmediacenter'), _("swapmediacenter"), 'swapmediacenter'))) 1435 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapnetwork'), _("swapnetwork"), 'swapnetwork'))) 1436 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapplayers'), _("swapplayers"), 'swapplayers'))) 1437 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapscreensaver'), _("swapscreensaver"), 'swapscreensaver'))) 1438 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapskins'), _("swapskins"), 'swapskins'))) 1439 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapsystem'), _("swapsystem"), 'swapsystem'))) 1440 self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('system'), _("system"), 'system'))) 1441 1442 self.onChangedEntry = [] 1443 if (getDesktop(0).size().width() == 1280): 1444 self["Mlist"] = FilterPanelList([], font0=24, font1=15, itemHeight=40) 1445 else: 1446 self["Mlist"] = FilterPanelList([], font0=24, font1=15, itemHeight=50) 1447 self["Mlist"].l.setList(self.Mlist) 1448 self["Mlist"].selectionEnabled(1) 1449 1450 self["key_blue"] = StaticText() 1451 self["key_blue"].text = _("set Start") 1452 self["key_red"] = StaticText() 1453 self["key_red"].text = _("search") 1454 1455 HelpableScreen.__init__(self) 1456 self["actions"] = HelpableActionMap(self, "AAFKeyActions", 1457 { 1458 "cancel": (self.Exit, "Beenden"), 1459 "left": (self.left, "Seite hoch"), 1460 "right": (self.right, "Seite runter"), 1461 "up": (self.up, "Hoch"), 1462 "down": (self.down, "Runter"), 1463 "ok": (self.ok, "OK"), 1464 "blue": (self.blue, "Blau"), 1465 "red": (self.virtualKB, "Red"), 1466 }, -2) 1467 1468 def up(self): 1469 self["Mlist"].up() 1470 self["Mlist"].selectionEnabled(1) 1471 1472 def down(self): 1473 self["Mlist"].down() 1474 self["Mlist"].selectionEnabled(1) 1475 1476 def left(self): 1477 self["Mlist"].pageUp() 1478 1479 def right(self): 1480 self["Mlist"].pageDown() 1481 1482 def Exit(self): 1483 global menu 1484 menu = "stop" 1485 self.close() 1486 1487 def ok(self): 1488 global menu 1489 menu = self['Mlist'].l.getCurrentSelection()[0][2] 1490 self.close() 1491 1492 def blue(self): 1493 menu = self['Mlist'].l.getCurrentSelection()[0][2] 1494 fwrite = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/startservice.cfg", "w") 1495 fwrite.write(menu) 1496 fwrite.close() 1497 message = "%s %s" % (_("Dieser Filter wurde als Startfilter gesetzt!\n\n "), menu) 1498 self.session.open( MessageBox, message, MessageBox.TYPE_INFO, timeout=5) 1499 1500 1501 def FilterEntryComponent(self,file): 1502 png = LoadPixmap("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pics/" + file + ".png") 1503 if png == None: 1504 png = LoadPixmap("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pics/info.png") 1505 res = (png) 1506 return res 1507 1508 def FilterEntryItem(self,entry): 1509 rot = 16711680 1510 gruen = 60928 1511 dgruen = 52480 1512 drot = 0xf47d19 1513 mblau = 8900346 1514 hblau = 11592447 1515 dblau = 5215437 1516 weiss = 0xffffff 1517 orange = 0xf47d19 1518 grau = 0x565656 1519 1520 res = [entry] 1521 # return (eListboxPythonMultiContent.TYPE_TEXT, pos[0], pos[1], size[0], size[1], font, flags, text, color, color_sel, backcolor, backcolor_sel, border_width, border_color) 1522 res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(100, 50), png=entry[0])) # png vorn 1523 res.append(MultiContentEntryText(pos=(150, 15), size=(220, 35), font=0, text=entry[1], color=mblau, color_sel=mblau, backcolor_sel=grau)) 1524 return res 1525 1526 def virtualKB(self): 1527 self.search = "" 1528 self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, ''), VirtualKeyBoard, title = (_("Suchstring eingeben:")), text = self.search) 1529 1530 def VirtualKeyBoardCallback(self, callback = None, entry = None): 1531 global menu 1532 if callback is not None and len(callback): 1533 print "[AddonManager] virtual callback",str(callback) 1534 menu = callback 1535 self.close() 1782 1536 1783 1537 -
ipk/source/system_addonmanager_2_0/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ipkdownload
r2941 r5923 2 2 3 3 rm /tmp/aaf/* 4 5 # cat Packages | grep Filename: | sed "s/Filename: enigma2-plugin-//" | sed "s/.ipk//" | sed "s/_sh4//" | sed "s/_/ V/" >> PlugList 4 6 5 7 if [ -e /var/etc/ipkg/official-feed.conf ]; then … … 13 15 fi 14 16 15 url=$url"/P ackages"17 url=$url"/PlugList" 16 18 echo $url 17 19 18 20 wget -O /tmp/aaf/test $url 19 cat /tmp/aaf/test | grep "Filename: " | cut -d '"' -f8 >/tmp/aaf/first.txt 21 22 # remove first 2 lines and last 2 lines 23 cat /tmp/aaf/test| sed '1,2d'|sed '$d'|sed '$d'| sed -e 's/ V/_/' >/tmp/aaf/first.txt 20 24 21 25 for i in /tmp/aaf/first.txt; do … … 23 27 do 24 28 lines="$Zeile" 25 Titel="`echo $lines | sed -e 's/enigma2-plugin-//'| sed -e 's/Filename: //'`" 26 Filename="`echo $lines | sed -e 's/Filename: //'`" 27 echo $Titel"##"$Filename >>/tmp/aaf/index.txt 29 echo $lines"##enigma2-plugin-"$lines"_sh4.ipk" >>/tmp/aaf/index.txt 28 30 done < $i 29 31 done 30 32 31 cat /tmp/aaf/index.txt33 #cat /tmp/aaf/index.txt 32 34
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/openaaf/chrome/common/titannit_trac_banner.png)