forked from premiere/premiere-libtorrent
improved alert message when torrent doesn't have metadata
This commit is contained in:
parent
b97dcc8c58
commit
0e9bdd9e53
|
@ -51,7 +51,16 @@ namespace libtorrent
|
|||
{}
|
||||
|
||||
virtual std::string message() const
|
||||
{ return handle.is_valid()?handle.name():" - "; }
|
||||
{
|
||||
if (!handle.is_valid()) return " - ";
|
||||
if (handle.name().empty())
|
||||
{
|
||||
char msg[41];
|
||||
to_hex((char const*)&handle.info_hash()[0], 20, msg);
|
||||
return msg;
|
||||
}
|
||||
return handle.name();
|
||||
}
|
||||
|
||||
torrent_handle handle;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue