Limit number of splits properly, https://github.com/connor4312/SpaceGDN/issues/12
Merge pull request #11 from totokaka/master

Added mojang's server
md5sum jars where sum is not provided
Now saves cached jars to folder on load
Added local file caching
Added pixelmon and FTB (which is broken)
Added working creeperrepo support
Added Attack of the B-Team, Hexxit and custom tekkit modpack support (API)
Patched craftbukkit loader and added cache folder
Added all technic packs
Added ProPack
Update slugs
[from now] 2014/05/29 22:12:26

diff --git a/loader/interfaces/creeperrepo_loader.py b/loader/interfaces/creeperrepo_loader.py
index 8a4dabd..87dda4c 100644
--- a/loader/interfaces/creeperrepo_loader.py
+++ b/loader/interfaces/creeperrepo_loader.py
@@ -28,8 +28,6 @@ class loader_creeperrepo:

 		for modpack in data.findall('modpack'):

-			if modpack.get('serverPack') == "": continue
-
 			if modpack.get('repoVersion') != None:
 				version = modpack.get('repoVersion')
 			else:
diff --git a/loader/loader.py b/loader/loader.py
index 17bfa40..c8c3e19 100644
--- a/loader/loader.py
+++ b/loader/loader.py
@@ -9,7 +9,7 @@ def loadSources():

 	import glob, json

-	files = glob.glob(_path + '/../sources/*.json')
+	files = glob.glob(_path + '/../sources/creeperrepo.json')
 	output = []

 	for f in files:
@@ -50,24 +50,51 @@ def load():
 	adder = yggdrasil.Yggdrasil()

 	for source in sources:
+		if source['name'] != 'creeperrepo' :

-		jar_obj = adder.addJar(source)
+			jar_obj = adder.addJar(source)

-		for channel_data in source['channels']:
-			channel = adder.addChannel(channel_data, jar_obj)
-			l = getLoader(channel_data['interface'])
+			for channel_data in source['channels']:
+				channel = adder.addChannel(channel_data, jar_obj)
+				l = getLoader(channel_data['interface'])

-			sys.stdout.write("\n\nLoading builds for %s" % (source['name'] + '#' + channel_data['name']))
+				sys.stdout.write("\n\nLoading builds for %s" % (source['name'] + '#' + channel_data['name']))

-			if not l: continue;
+				if not l: continue;

-			data = getLastBuild(channel)
-			last_build = 0
-			if data:
-				last_build = data.build
+				data = getLastBuild(channel)
+				last_build = 0
+				if data:
+					last_build = data.build

-			for build in l.load(channel_data, last_build):
-				adder.addBuild(build, channel)
+				for build in l.load(channel_data, last_build):
+					adder.addBuild(build, channel)
+			adder.commit()
+			sys.stdout.write("\n\n")
+		else:
+			for channel_data in source['channels']:
+				interface = channel_data['interface']
+				l = getLoader(channel_data['interface'])

-	adder.commit()
-	sys.stdout.write("\n\n")
\ No newline at end of file
+				for modpack in l.getXML(channel_data['interface']).findall('modpack'):
+
+					if modpack.get('serverPack') == "": continue
+
+					print modpack.get('name')
+
+					jar_obj = adder.addJarName(modpack.get('name'))
+					channel = adder.addChannel(channel_data, jar_obj)
+
+					sys.stdout.write("\n\nLoading builds for %s" % (source['name'] + '#' + channel_data['name']))
+
+					if not l: continue;
+
+					data = getLastBuild(channel)
+					last_build = 0
+					if data:
+						last_build = data.build
+
+					for build in l.load(channel_data, last_build):
+						adder.addBuild(build, channel)
+			adder.commit()
+			sys.stdout.write("\n\n")
diff --git a/loader/yggdrasil.py b/loader/yggdrasil.py
index 233b7ab..43d06e1 100644
--- a/loader/yggdrasil.py
+++ b/loader/yggdrasil.py
@@ -34,9 +34,15 @@ class Yggdrasil():
 			item.created_at = datetime.now()
 			db.session.add(item)
 			db.session.commit()
-
+
 		return item

+	def addJarName(self, data):
+		jar = self.getOrMake(model = Jar, data = data, where = {'name': data})
+		self.jars[jar.id] = jar
+
+		return jar.id
+
 	def addJar(self, data):
 		jar = self.getOrMake(model = Jar, data = data, where = {'name': data['name']})
 		self.jars[jar.id] = jar
@@ -47,7 +53,6 @@ class Yggdrasil():
 		if not jar in self.jars:
 			raise Exception('Tried to add a channel %s in a nonexistant jar %s.' % (data['name'], jar))

-
 		data['jar_id'] = jar
 		channel = self.getOrMake(model = Channel, data = data, where = {'name': data['name'], 'jar_id': jar})
 		self.channels[channel.id] = channel
CreeperHost stuff is now on seperate jars
Reset wildcard
Merge pull request #1 from MCProHosting/slugFix

Slug fix
Fixed file urls
Now urlencodes responses
Jon gon done messed up
Now checks for new format modpack files