mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 01:22:13 -06:00
louder
This commit is contained in:
parent
214a367f48
commit
1d9f9f221a
|
@ -253,7 +253,9 @@ class ThumbSrv(object):
|
||||||
fun(abspath, tpath)
|
fun(abspath, tpath)
|
||||||
except:
|
except:
|
||||||
msg = "{} could not create thumbnail of {}\n{}"
|
msg = "{} could not create thumbnail of {}\n{}"
|
||||||
self.log(msg.format(fun.__name__, abspath, min_ex()), "1;30")
|
msg = msg.format(fun.__name__, abspath, min_ex())
|
||||||
|
c = 1 if "<Signals.SIG" in msg else "1;30"
|
||||||
|
self.log(msg, c)
|
||||||
with open(tpath, "wb") as _:
|
with open(tpath, "wb") as _:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -1085,18 +1085,20 @@ class Up2k(object):
|
||||||
if parser == "mtag":
|
if parser == "mtag":
|
||||||
parser = self.mtag.backend
|
parser = self.mtag.backend
|
||||||
|
|
||||||
msg = "{} failed to read tags from {}:\n{}"
|
self._log_tag_err(parser, abspath, ex)
|
||||||
self.log(msg.format(parser, abspath, ex), c=3)
|
|
||||||
|
|
||||||
q.task_done()
|
q.task_done()
|
||||||
|
|
||||||
|
def _log_tag_err(self, parser, abspath, ex):
|
||||||
|
msg = "{} failed to read tags from {}:\n{}".format(parser, abspath, ex)
|
||||||
|
self.log(msg.lstrip(), c=1 if "<Signals.SIG" in msg else 3)
|
||||||
|
|
||||||
def _tag_file(self, write_cur, entags, wark, abspath, tags=None):
|
def _tag_file(self, write_cur, entags, wark, abspath, tags=None):
|
||||||
if tags is None:
|
if tags is None:
|
||||||
try:
|
try:
|
||||||
tags = self.mtag.get(abspath)
|
tags = self.mtag.get(abspath)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
msg = "failed to read tags from {}:\n{}"
|
self._log_tag_err("", abspath, ex)
|
||||||
self.log(msg.format(abspath, ex), c=3)
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if not bos.path.isfile(abspath):
|
if not bos.path.isfile(abspath):
|
||||||
|
@ -2193,8 +2195,7 @@ class Up2k(object):
|
||||||
if parsers:
|
if parsers:
|
||||||
tags.update(self.mtag.get_bin(parsers, abspath))
|
tags.update(self.mtag.get_bin(parsers, abspath))
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
msg = "failed to read tags from {}:\n{}"
|
self._log_tag_err("", abspath, ex)
|
||||||
self.log(msg.format(abspath, ex), c=3)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
with self.mutex:
|
with self.mutex:
|
||||||
|
|
Loading…
Reference in a new issue