1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
Description: Remove temporary files when exiting vlc
Author: Petter Reinholdtsen <pere@debian.org>
Origin: <vendor|upstream|other>, <url of original patch>
Bug: https://github.com/johang/vlc-bittorrent/issues/10
Forwarded: https://github.com/johang/vlc-bittorrent/issues/10
Reviewed-By: Petter Reinholdtsen <pere@debian.org>
Last-Update: 2018-10-14
Index: vlc-plugin-bittorrent-salsa/src/download.cpp
===================================================================
--- vlc-plugin-bittorrent-salsa.orig/src/download.cpp 2018-10-14 18:03:45.284958728 +0200
+++ vlc-plugin-bittorrent-salsa/src/download.cpp 2018-10-14 18:09:21.990184881 +0200
@@ -158,6 +158,14 @@
{
D(printf("%s:%d: %s()\n", __FILE__, __LINE__, __func__));
+#if LIBTORRENT_VERSION_NUM < 10200
+ int flags = 0;
+#else
+ libtorrent::remove_flags_t flags = {};
+#endif
+ flags |= libtorrent::session::delete_files;
+ m_session->m_session->remove_torrent(m_handle, flags);
+
// XXX: Workaround for weirdness in libtorrent
std::this_thread::sleep_for(std::chrono::seconds(1));
}
|