Skip to content

Commit

Permalink
Fixed post processing for 360 multi discs
Browse files Browse the repository at this point in the history
  • Loading branch information
05sonicblue committed May 4, 2015
1 parent 63b36d9 commit 333d83f
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
Binary file modified GamezServer.db
Binary file not shown.
6 changes: 6 additions & 0 deletions GamezServer/Task.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def PostProcess(self,folder,gameId):
for line in lines:
if(line.startswith("Game Name:")):
gameName = line.replace("Game Name: ", "").lstrip().rstrip()
if(line.startswith("Disc Number:")):
discNumber = line.replace("Disc Number: ", "").lstrip().rstrip()
if(line.startswith("SS looks valid")):
validSs = True
if(line.startswith("DMI looks valid")):
Expand All @@ -74,6 +76,7 @@ def PostProcess(self,folder,gameId):
regionCode = line.replace("Region Code: ", "").lstrip().rstrip().replace("0x", "")
if(line.lstrip().startswith("Region Free")):
regionFree = True

processFile = False
if(regionFree == False):
if(abgxRegion == ""):
Expand All @@ -87,6 +90,9 @@ def PostProcess(self,folder,gameId):
result = result + 'Copying file: ' + file + '\n'
extension = os.path.splitext(fileToProcess)[len(os.path.splitext(fileToProcess))-1]
finalFileName = os.path.join(destFolderGame,gameName + extension)
if(discNumber != None):
finalFileName = finalFileName + ' - ' + str(discNumber)
finalFileName = finalFileName + extension
buffer_size = 1024
with open(fileToProcess, 'rb') as fsrc:
with open(finalFileName, 'wb') as fdest:
Expand Down
Binary file modified GamezServer/Task.pyc
Binary file not shown.
43 changes: 43 additions & 0 deletions GamezServer/WebServe.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,49 @@ def upgradeGamezServer(self, downloadUrl, newVersion):
shutil.rmtree(updatePath)
dao = DAO()
dao.UpdateMasterSiteData("currentVersion",newVersion)
dao.UpdateMasterSiteData("HeaderContents", """
<script src="/static/scripts/jquery.js"></script>
<script src="/static/scripts/jquery-ui.js"></script>
<script src="/static/scripts/Menu.js"></script>
<script src="/static/scripts/jquery.dataTables.js"></script>
<script src="/static/scripts/dataTables.jqueryui.js"></script>
<script src="/static/scripts/dataTables.tableTools.js"></script>
<script src="/static/scripts/chosen.jquery.js"></script>
<script src="/static/scripts/toastr.js"></script>
<link href="/static/styles/jquery-ui.css" rel="stylesheet" />
<link href="/static/styles/Menu.css" rel="stylesheet" />
<link href="/static/styles/dataTables.jqueryui.css" rel="stylesheet" />
<link href="/static/styles/dataTables.tableTools.css" rel="stylesheet" />
<link href="/static/styles/chosen.css" rel="stylesheet" />
<link href="/static/styles/toastr.css" rel="stylesheet" />
<div id='cssmenu'>
<ul>
<li class='active align-center'>
<a href='/'><span>Home</span></a>
<ul>
<li><a href='/AddGame'><span>Add Game</span></a></li>
<li><a href='/AddByPlatform'><span>Add by Platform</span></a></li>
</ul>
</li>
<li class='active align-center'>
<a href='/Manage'><span>Manage</span></a>
</li>
<li class='active has-sub'><a href='/Settings'><span>Settings</span></a>
<ul>
<li><a href='/Settings#gamezserver-tab'><span>Gamez Server</span></a></li>
<li><a href='/Settings#downloaders-tab'><span>Downloaders</span></a></li>
<li><a href='/Settings#searchers-tab'><span>Searchers</span></a></li>
<li><a href='/Settings#postprocess-tab'><span>Post Process</span></a></li>
</ul>
</li>
<li class='active align-center'>
<a href='/Log'><span>Log</span></a>
</li>
<div style="float:right;padding: 15px 20px;color: #7a8189;">v.0.0.1</div>
</ul>
</div>
""")
result = "Gamez Server updated to V." + newVersion
raise cherrypy.HTTPRedirect("/?statusMessage=" + result)

Expand Down
Binary file modified GamezServer/WebServe.pyc
Binary file not shown.

0 comments on commit 333d83f

Please sign in to comment.