mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 06:26:37 +00:00
Remove json_serial
as it is in json.py instead
This commit is contained in:
parent
e46beb39c6
commit
3aa5ec9aae
@ -223,14 +223,6 @@ def clean_emoji(s):
|
|||||||
return emoji.replace_emoji(s)
|
return emoji.replace_emoji(s)
|
||||||
|
|
||||||
|
|
||||||
def json_serial(obj):
|
|
||||||
if isinstance(obj, datetime):
|
|
||||||
return obj.isoformat()
|
|
||||||
if isinstance(obj, LazyList):
|
|
||||||
return list(obj)
|
|
||||||
raise TypeError(f'Type {type(obj)} is not json_serial()-able')
|
|
||||||
|
|
||||||
|
|
||||||
def seconds_to_timestr(seconds):
|
def seconds_to_timestr(seconds):
|
||||||
seconds = seconds % (24 * 3600)
|
seconds = seconds % (24 * 3600)
|
||||||
hour = seconds // 3600
|
hour = seconds // 3600
|
||||||
|
Loading…
Reference in New Issue
Block a user