Commit 0870970c authored by marius david's avatar marius david
Browse files

better handling of ids

parent 3f4a3250
Loading
Loading
Loading
Loading
+212 −152
Original line number Diff line number Diff line
{
	"id": -1,
    "id": 6827443089,
    "name": "Some test",
	"description": "Look! Its the fan favorite Rainbow Dash",
    "description": "Look! It\u2019s the fan favorite Rainbow Dash",
    "links": {
        "website": [
            "https://mlp.fandom.com/fr/wiki/Rainbow_Dash"
@@ -16,139 +16,199 @@
    "path": {
        "0": [
            [
				569,
				386
                570,
                385
            ],
            [
                570,
				388
                378
            ],
            [
				576,
				390
                566,
                380
            ],
            [
                564,
                374
            ],
            [
                569,
                369
            ],
            [
                577,
				400
                368
            ],
            [
                583,
				403
                374
            ],
            [
				585,
				402
                586,
                374
            ],
            [
				586,
				398
                587,
                375
            ],
            [
				594,
				398
                603,
                358
            ],
            [
				597,
				401
                604,
                361
            ],
            [
                602,
				401
                363
            ],
            [
				603,
				397
                617,
                370
            ],
            [
				612,
				401
                607,
                381
            ],
            [
				618,
				400
                591,
                372
            ],
            [
				626,
				388
                586,
                377
            ],
            [
				624,
				379
                586,
                381
            ],
            [
				618,
				370
                584,
                382
            ],
            [
				614,
				373
                588,
                383
            ],
            [
				610,
                589,
                376
            ],
            [
                593,
                381
            ],
            [
                593,
                384
            ],
            [
                599,
                385
            ],
            [
                606,
                388
            ],
            [
                610,
                387
            ],
            [
				599,
				383
                615,
                378
            ],
            [
				595,
				383
                617,
                373
            ],
            [
				591,
				375
                623,
                382
            ],
            [
				588,
				376
                622,
                389
            ],
            [
				592,
				374
                615,
                398
            ],
            [
				605,
				382
                610,
                398
            ],
            [
				609,
				381
                597,
                390
            ],
            [
				620,
				367
                593,
                390
            ],
            [
				602,
				356
                594,
                393
            ],
            [
				585,
				371
                598,
                394
            ],
            [
				572,
				366
                600,
                399
            ],
            [
				560,
				374
                599,
                400
            ],
            [
				566,
				382
                594,
                395
            ],
            [
                591,
                397
            ],
            [
                587,
                398
            ],
            [
                583,
                402
            ],
            [
                582,
                402
            ],
            [
                578,
                399
            ],
            [
                578,
                393
            ],
            [
                577,
                392
            ],
            [
                577,
                389
            ],
            [
                573,
                388
            ]
        ]
    },
    "center": {
        "0": [
			577,
			379
            585,
            390
        ]
    }
}
 No newline at end of file
+4 −1
Original line number Diff line number Diff line
@@ -30,7 +30,10 @@ def load_data(self):
	def push_entry(self, content):
		id = None
		if content["id"] == -1:
			id = None
			while id is None or id in self.id_to_name:
				id = random.randint(0, 9999999999)
			content["id"] = id
		else:
			id = content["id"]