Merge pull request #2145 from pmzqla/webui

Make Web API locale independent
This commit is contained in:
sledgehammer999
2014-11-12 00:32:00 +02:00
13 changed files with 228 additions and 136 deletions

View File

@@ -103,6 +103,15 @@ QString QTorrentHandle::creation_date() const {
return t ? misc::toQString(*t) : "";
}
qlonglong QTorrentHandle::creation_date_unix() const {
#if LIBTORRENT_VERSION_NUM < 10000
boost::optional<time_t> t = torrent_handle::get_torrent_info().creation_date();
#else
boost::optional<time_t> t = torrent_handle::torrent_file()->creation_date();
#endif
return t ? *t : -1;
}
QString QTorrentHandle::current_tracker() const {
return misc::toQString(status(0x0).current_tracker);
}

View File

@@ -84,6 +84,7 @@ public:
bool is_checking() const;
bool is_sequential_download() const;
QString creation_date() const;
qlonglong creation_date_unix() const;
bool priv() const;
bool first_last_piece_first() const;
QString root_path() const;