From 65d6e3bcd1b0fbc75dca6e4076a7b09b5026dcda Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Fri, 21 Feb 2014 22:23:25 -0500 Subject: [PATCH] Remove SizeOnDisk from table of detected worlds This fields hasn't been properly filled in for many many releases. We could detect this value some other way, but i'm not sure the value in doing this --- overviewer.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/overviewer.py b/overviewer.py index eeaf2ed..f5b8969 100755 --- a/overviewer.py +++ b/overviewer.py @@ -528,9 +528,9 @@ def list_worlds(): # get max length of world name worldNameLen = max([len(x) for x in worlds] + [len("World")]) - formatString = "%-" + str(worldNameLen) + "s | %-8s | %-8s | %-16s | %s " - print(formatString % ("World", "Size", "Playtime", "Modified", "Path")) - print(formatString % ("-"*worldNameLen, "-"*8, "-"*8, '-'*16, '-'*4)) + formatString = "%-" + str(worldNameLen) + "s | %-8s | %-16s | %s " + print(formatString % ("World", "Playtime", "Modified", "Path")) + print(formatString % ("-"*worldNameLen, "-"*8, '-'*16, '-'*4)) for name, info in sorted(worlds.iteritems()): if isinstance(name, basestring) and name.startswith("World") and len(name) == 6: try: @@ -544,9 +544,8 @@ def list_worlds(): time.localtime(info['LastPlayed'] / 1000)) playtime = info['Time'] / 20 playstamp = '%d:%02d' % (playtime / 3600, playtime / 60 % 60) - size = "%.2fMB" % (info['SizeOnDisk'] / 1024. / 1024.) path = info['path'] - print(formatString % (name, size, playstamp, timestamp, path)) + print(formatString % (name, playstamp, timestamp, path)) if __name__ == "__main__": multiprocessing.freeze_support()