Changeset 3151 for lliurex-store/trunk
- Timestamp:
- Dec 22, 2016, 9:54:49 AM (4 years ago)
- Location:
- lliurex-store/trunk/fuentes/lliurex-appstore.install/usr
- Files:
-
- 27 added
- 3 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-store/trunk/fuentes/lliurex-appstore.install/usr/bin/plugins/infoManager.py
r3144 r3151 1 1 import locale 2 2 import re 3 3 class infomanager: 4 4 def __init__(self): … … 92 92 for img in screenshot.get_images(): 93 93 #The values are the values of appstream.ImageKind. 1=Source, 2=Thumbnail, 0=UNKNOWN 94 #yml currently doen's support unkown images so we assign videos depending on file extension 95 if not re.search(r'\.....?$',img.get_url()): 96 appInfo['video']=img.get_url() 97 continue 98 if img.get_kind()==0: 99 appInfo['video']=img.get_url() 100 continue 94 101 if img.get_kind()==1: #2=Default;1=normal;0=unknown 95 102 default_screenshot=img.get_url() 103 continue 96 104 if img.get_kind()==2: 97 105 thumbnails_list.append(img.get_url()) 106 continue 107 98 108 appInfo['thumbnails']=thumbnails_list 99 109 appInfo['screenshot']=default_screenshot … … 114 124 if 'embed' not in appInfo['video']: 115 125 appInfo['video']=appInfo['video'].replace('watch?v=','embed/') 116 print(app.get_bundles())117 126 for bundle in app.get_bundles(): 118 print("3")119 127 if bundle.get_kind()==0: 120 128 appInfo['installerUrl']=bundle.get_id() -
lliurex-store/trunk/fuentes/lliurex-appstore.install/usr/bin/plugins/loadStore.py
r3144 r3151 37 37 def load_store(self,store): 38 38 iconPath='/usr/share/icons/hicolor/128x128' 39 store.load(appstream.StoreLoadFlags.APP_INFO_SYSTEM) 40 store.load(appstream.StoreLoadFlags.APP_INSTALL) 41 store.load(appstream.StoreLoadFlags.APP_INFO_USER) 42 store.load(appstream.StoreLoadFlags.DESKTOP) 39 flags=[appstream.StoreLoadFlags.APP_INFO_SYSTEM,appstream.StoreLoadFlags.APP_INSTALL,appstream.StoreLoadFlags.APP_INFO_USER,appstream.StoreLoadFlags.DESKTOP] 40 for flag in flags: 41 try: 42 store.load(flag) 43 except: 44 print ("Failed to load"+str(flag)) 45 pass 43 46 lliurex_dir="/usr/share/app-info/xmls2" 44 47 store.set_origin('lliurex') -
lliurex-store/trunk/fuentes/lliurex-appstore.install/usr/bin/plugins/zmdManager.py
r3146 r3151 60 60 61 61 def _install_Zmd(self,appInfo): 62 zmd=appInfo[' installerUrl']62 zmd=appInfo['package']+'.zmd' 63 63 self._debug("Installing "+str(zmd)) 64 64 os.chdir(self.zmdPath) … … 91 91 92 92 def _remove_Zmd(self,appInfo): 93 zmd=appInfo[' installerUrl']93 zmd=appInfo['package']+'.zmd' 94 94 self._debug("Removing "+str(zmd)) 95 95 os.chdir(self.zmdPath) … … 111 111 pkg=pkg.split("\t")[0] 112 112 pkg=pkg.replace('"','') 113 print("Append: "+pkg)113 self._debug("Append to remove list: "+pkg) 114 114 removePackages.append(pkg) 115 115 f2.close() … … 144 144 def _get_Zmd_Info(self,appInfo): 145 145 n4dvars=self.n4dclient.get_variable("","VariablesManager","ZEROCENTER") 146 zmd=appInfo['installerUrl'] 147 zmd=os.path.basename(zmd) 148 zmd=zmd.split('.')[0] 146 zmd=appInfo['package'] 149 147 appInfo['status']='Available' 150 148 for key in n4dvars: 151 if appInfo['name'].lower() in key.lower():149 if zmd.lower() in key.lower(): 152 150 if n4dvars[key]['state']==1: 153 151 appInfo['status']='Installed' -
lliurex-store/trunk/fuentes/lliurex-appstore.install/usr/share/app-info/xmls/lliurex_apps.xml
r3133 r3151 60 60 </categories> 61 61 <icon type="local">arasuite.png</icon> 62 <metadata> 63 <value key="x-zomando">/usr/share/zero-center/zmds/zero-lliurex-arasuite.zmd</value> 64 </metadata> 62 <bundle type="zomando">/usr/share/zero-center/zmds/zero-lliurex-arasuite.zmd</bundle> 65 63 </component> 66 64 … … 133 131 </categories> 134 132 <icon type="cached">pmb.png</icon> 135 <metadata> 136 <value key="x-zomando">/usr/share/zero-center/zmds/zero-lliurex-pmb-installer.zmd</value> 137 </metadata> 133 <bundle type="zomando">/usr/share/zero-center/zmds/zero-lliurex-pmb-installer.zmd</bundle> 138 134 </component> 139 135 … … 182 178 <image type="thumbnail" width="115" height="64">http://2.bp.blogspot.com/-5YkSk4LG_4o/UeOtPBN7mqI/AAAAAAAAGzs/KFVoJtGKWJg/s1600/pyromaths_6.png</image> 183 179 </screenshot> 180 <screenshot> 181 <image type="video">https://www.youtube.com/watch?v=xPHBG7jKekY</image> 182 </screenshot> 184 183 </screenshots> 185 184 <keywords> … … 194 193 </categories> 195 194 <icon type="cached">pyromaths.png</icon> 196 <metadata> 197 <value key="x-zomando">/usr/share/zero-center/zmds/install-pyromaths.zmd</value> 198 <value key="x-video">https://www.youtube.com/watch?v=xPHBG7jKekY</value> 199 </metadata> 195 <bundle type="zomando">/usr/share/zero-center/zmds/install-pyromaths.zmd</bundle> 200 196 </component> 201 197 … … 267 263 </categories> 268 264 <icon type="cached">moodle.png</icon> 269 <metadata> 270 <value key="x-zomando">/usr/share/zero-center/zmds/install-moodle.zmd</value> 271 </metadata> 265 <bundle type="zomando">/usr/share/zero-center/zmds/install-moodle.zmd</bundle> 272 266 </component> 273 267 … … 326 320 </categories> 327 321 <icon type="cached">hotpotatoes.png</icon> 328 <metadata> 329 <value key="x-zomando">/usr/share/zero-center/zmds/lliurex-zero-installer-hotpotatoes.zmd</value> 330 </metadata> 322 <bundle type="zomando">/usr/share/zero-center/zmds/lliurex-zero-installer-hotpotatoes.zmd</bundle> 331 323 </component> 332 324 … … 384 376 </categories> 385 377 <icon type="cached">cmaptools.png</icon> 386 <metadata> 387 <value key="x-zomando">/usr/share/zero-center/zmds/zero-lliurex-cmaptools.zmd</value> 388 </metadata> 378 <bundle type="zomando">/usr/share/zero-center/zmds/zero-lliurex-cmaptools.zmd</bundle> 389 379 </component> 390 380 … … 425 415 <image type="thumbnail" width="115" height="64">http://2.bp.blogspot.com/-5YkSk4LG_4o/UeOtPBN7mqI/AAAAAAAAGzs/KFVoJtGKWJg/s1600/pyromaths_6.png</image> 426 416 </screenshot> 417 <screenshot> 418 <image type="video">https://player.vimeo.com/video/65583694</image> 419 </screenshot> 427 420 </screenshots> 428 421 <provides> … … 441 434 </categories> 442 435 <icon type="cached">scratch.png</icon> 443 <metadata> 444 <value key="x-video">https://player.vimeo.com/video/65583694</value> 445 <value key="x-zomando">/usr/share/zero-center/zmds/zero-lliurex-adobeair-scratch2.zmd</value> 446 </metadata> 436 <bundle type="zomando">/usr/share/zero-center/zmds/zero-lliurex-adobeair-scratch2.zmd</bundle> 447 437 </component> 448 438 … … 491 481 </categories> 492 482 <icon type="cached">resources.png</icon> 493 <metadata> 494 <value key="x-zomando">/usr/share/zero-center/zmds/lliurex-zero-installer-recursos.zmd</value> 495 </metadata> 483 <bundle type="zomando">/usr/share/zero-center/zmds/lliurex-zero-installer-recursos.zmd</bundle> 496 484 </component> 497 485 … … 540 528 </categories> 541 529 <icon type="cached">AdobeAIR.png</icon> 542 <metadata> 543 <value key="x-zomando">/usr/share/zero-center/zmds/zero-lliurex-adobeair.zmd</value> 544 </metadata> 530 <bundle type="zomando">/usr/share/zero-center/zmds/zero-lliurex-adobeair.zmd</bundle> 545 531 </component> 546 532 … … 587 573 </categories> 588 574 <icon type="cached">dvdcss.png</icon> 589 <metadata> 590 <value key="x-zomando">/usr/share/zero-center/zmds/lliurex-zero-installer-dvdcss.zmd</value> 591 </metadata> 575 <bundle type="zomando">/usr/share/zero-center/zmds/lliurex-zero-installer-dvdcss.zmd</bundle> 592 576 </component> 593 577 … … 636 620 </categories> 637 621 <icon type="cached">school_fonts.png</icon> 638 <metadata> 639 <value key="x-zomando">/usr/share/zero-center/zmds/zero-installer-fonts.zmd</value> 640 </metadata> 622 <bundle type="zomando">/usr/share/zero-center/zmds/zero-installer-fonts.zmd</bundle> 641 623 </component> 642 624 … … 683 665 </categories> 684 666 <icon type="cached">school_fonts.png</icon> 685 <metadata> 686 <value key="x-zomando">/usr/share/zero-center/zmds/zero-installer-midi.zmd</value> 687 </metadata> 667 <bundle type="zomando">/usr/share/zero-center/zmds/zero-installer-midi.zmd</bundle> 688 668 </component> 689 669 … … 744 724 </categories> 745 725 <icon type="cached">wine64.png</icon> 746 <metadata> 747 <value key="x-zomando">/usr/share/zero-center/zmds/zero-installer-wine64.zmd</value> 748 </metadata> 726 <bundle type="zomando">/usr/share/zero-center/zmds/zero-installer-wine64.zmd</bundle> 749 727 </component> 750 728 </components>
Note: See TracChangeset
for help on using the changeset viewer.