mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-03-10 04:11:16 +00:00
- Fixed typo in novaprinter.py (Thanks Cristian Greco)
This commit is contained in:
parent
fc3c123f5b
commit
baf5cb31af
@ -1,4 +1,4 @@
|
||||
#VERSION: 1.3
|
||||
#VERSION: 1.31
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
@ -32,13 +32,13 @@ PyFile_SetEncoding = pythonapi.PyFile_SetEncoding
|
||||
PyFile_SetEncoding.argtypes = (py_object, c_char_p)
|
||||
PyFile_SetEncoding(sys.stdout, "UTF-8")
|
||||
|
||||
def prettyPrinter(dictionnary):
|
||||
def prettyPrinter(dictionary):
|
||||
# Convert everything to unicode for safe printing
|
||||
for key,value in dictionnary.items():
|
||||
if isinstance(dictionnary[key], str):
|
||||
dictionnary[key] = unicode(dictionnary[key], 'utf-8')
|
||||
dictionnary['size'] = anySizeToBytes(dictionnary['size'])
|
||||
print u"%s|%s|%s|%s|%s|%s"%(dictionnary['link'],dictionnary['name'],dictionnary['size'],dictionnary['seeds'],dictionnary['leech'],dictionnary['engine_url'])
|
||||
for key,value in dictionary.items():
|
||||
if isinstance(dictionary[key], str):
|
||||
dictionary[key] = unicode(dictionary[key], 'utf-8')
|
||||
dictionary['size'] = anySizeToBytes(dictionary['size'])
|
||||
print u"%s|%s|%s|%s|%s|%s"%(dictionary['link'],dictionary['name'],dictionary['size'],dictionary['seeds'],dictionary['leech'],dictionary['engine_url'])
|
||||
|
||||
def anySizeToBytes(size_string):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user