mirror of
https://github.com/barronwaffles/dwc_network_server_emulator.git
synced 2026-05-06 05:05:23 -05:00
Updated DLC code to use list file
This commit is contained in:
parent
624514a69d
commit
45af5c1222
1
dlc/A5FE/_list.txt
Normal file
1
dlc/A5FE/_list.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
wifi_encode26.dat MgA2AE9V7l1XMP9mSDA* 116
|
||||
2
dlc/B2KJ/_list.txt
Normal file
2
dlc/B2KJ/_list.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
distribution110609.bin 24
|
||||
tweet111209.bin 2416
|
||||
Binary file not shown.
BIN
dlc/B2KJ/tweet111209.bin
Normal file
BIN
dlc/B2KJ/tweet111209.bin
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
ôÎ<>Ÿô¦'O÷Ò~>
çDÌs•ìˆ)ÕÝŸÃ4m/“}b¸©´åÔ±S— ÷®,šítydÛf2t¥šyävVx!Ö¦Ÿ€ ãÔÆà-Äè4i¸ëñIµûn¶œoÉK¤<4B>!(’À‘õWÚ0ê’x‹á7õ‡]ùd$‚<FFWÓZçýläk½ð2Ôa^!
|
||||
|
|
@ -93,7 +93,7 @@ class NintendoNasHTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
|
||||
# TODO: Cache all DLC information in a database instead of querying the folder.
|
||||
ret = ""
|
||||
dlcpath = "dlc/" + post["rhgamecd"]
|
||||
dlcpath = "dlc/" + post["gamecd"]
|
||||
dlc_contenttype = False
|
||||
|
||||
if action == "count":
|
||||
|
|
@ -109,12 +109,10 @@ class NintendoNasHTTPServerHandler(BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
offset = int(post["offset"])
|
||||
|
||||
if os.path.exists(dlcpath):
|
||||
filelist = os.listdir(dlcpath)
|
||||
|
||||
if offset + num <= len(filelist):
|
||||
for file in filelist[offset:offset+num]:
|
||||
filesize = os.path.getsize(dlcpath + "/" + file)
|
||||
ret += "%s\t\t\t\t%d\r\n" % (file, filesize)
|
||||
# Look for a list file first.
|
||||
# If the list file exists, send the entire thing back to the client.
|
||||
if os.path.isfile(dlcpath + "/_list.txt"):
|
||||
ret = open(dlcpath + "/_list.txt", "rb").read()
|
||||
|
||||
if action == "contents":
|
||||
# Get only the base filename just in case there is a path involved somewhere in the filename string.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user