mirror of
https://github.com/barronwaffles/dwc_network_server_emulator.git
synced 2026-09-09 03:35:16 -05:00
@@ -70,6 +70,15 @@ class NintendoNasHTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||
logger.log(logging.DEBUG, ret)
|
||||
|
||||
self.wfile.write(self.dict_to_str(ret))
|
||||
|
||||
elif action == "SVCLOC":
|
||||
ret["returncd"] = "007"
|
||||
ret["statusdata"] = "Y"
|
||||
ret["svchost"] = "dls1.nintendowifi.net"
|
||||
|
||||
logger.log(logging.DEBUG, "SVCLOC response to %s", self.client_address)
|
||||
logger.log(logging.DEBUG, ret)
|
||||
self.wfile.write(self.dict_to_str(ret))
|
||||
|
||||
elif action == "SVCLOC" or action == "svcloc": # Get service based on service id number
|
||||
if post["svc"] == "9000": # DLC host = 9000
|
||||
@@ -115,6 +124,10 @@ class NintendoNasHTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
||||
|
||||
if os.path.exists(dlcpath):
|
||||
count = len(os.listdir(dlcpath))
|
||||
|
||||
# the above counts the file list as a file too, subtract that again if it exists
|
||||
if os.path.isfile(dlcpath + "/_list.txt"):
|
||||
count -= 1
|
||||
|
||||
ret = "%d" % count
|
||||
|
||||
|
||||
Reference in New Issue
Block a user