View difference between Paste ID: Xv1bkse0 and 3t3cdKxZ
SHOW: | | - or go back to the newest paste.
1
import es
2
import path
3
4
class DownloadHandler:
5
    downloads = []
6
    
7
    @staticmethod
8
    def downloadAll(self):
9
        for d in self.downloads:
10
            d.addDownload()
11
12
class DownloadPath(path.path):
13
    
14-
        path.path.__init__(self, fullpath)
14+
15
        path.path.__init__(self, other)
16
        
17
        DownloadHandler.downloads.append(self)
18
        
19
    def addDownload(self):
20
        for f in self.files():
21
            es.stringtable('downloadables', str(f))
22
            
23
            
24
# Bitte in diesem Bereich alle deine Pfade angeben, die heruntergeladen werden sollen.
25
26
DownloadPath('maps')
27
DownloadPath('sound/ordner/und/so/weiter')
28
# DownloadPath('')
29
30
31
# Nichts Editieren!
32
          
33
def es_map_start(ev):
34
    DownloadHandler.downloadAll()
35
    
36
def load():
37
    DownloadHandler.downloadAll()