add total size of whats been found
This commit is contained in:
parent
98f4fe0742
commit
a5c5ef3710
@ -418,10 +418,15 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
if opts.action == 'show':
|
if opts.action == 'show':
|
||||||
print("The following items were added before {}".format(opts.date))
|
print("The following items were added before {}".format(opts.date))
|
||||||
|
sizes = []
|
||||||
for item in unwatched_lst:
|
for item in unwatched_lst:
|
||||||
added_at = datetime.datetime.utcfromtimestamp(float(item.added_at)).strftime("%Y-%m-%d")
|
added_at = datetime.datetime.utcfromtimestamp(float(item.added_at)).strftime("%Y-%m-%d")
|
||||||
print("\t{} added {}\tSize: {}\n\tFile: {}".format(
|
size = int(item.file_size) if item.file_size else ''
|
||||||
item.title, added_at, sizeof_fmt(int(item.file_size)), item.file))
|
sizes.append(size)
|
||||||
|
print(u"\t{} added {}\tSize: {}\n\t\tFile: {}".format(
|
||||||
|
item.title, added_at, sizeof_fmt(size), item.file))
|
||||||
|
total_size = sum(sizes)
|
||||||
|
print('Total size: {}'.format(sizeof_fmt(total_size)))
|
||||||
|
|
||||||
if opts.action == 'delete':
|
if opts.action == 'delete':
|
||||||
plex_deletion(unwatched_lst, libraries, opts.toggleDeletion)
|
plex_deletion(unwatched_lst, libraries, opts.toggleDeletion)
|
||||||
|
Loading…
Reference in New Issue
Block a user