1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-21 13:52:16 +02:00

Compare commits

...

101 Commits

Author SHA1 Message Date
Christophe Dumez
924a82cce1 Tagged v2.0.7 release 2010-01-11 15:02:32 +00:00
Christophe Dumez
8271eb309d - Bump to v2.0.7 2010-01-11 14:52:17 +00:00
Christophe Dumez
304c20d3d8 - BUGFIX: RSS filters are now alphabetically sorted
- BUGFIX: Fix crash when renaming currently displayed RSS filter
    - BUGFIX: Remove overwriting confirmation when exporting RSS filters since Qt takes care of it
2010-01-11 14:47:01 +00:00
Christophe Dumez
fa09f5f48a - Fix several bugs in RSS plugin
* RSS downloader takes into consideration maximum number of articles per feed
  * Fix possible issue with RSS folder deletion
  * Clear persistant data whenever a RSS feed is deleted
2010-01-07 19:55:19 +00:00
Christophe Dumez
8125651a57 BUGFIX: Update RSS feed as soon as feed downloader is enabled 2010-01-07 18:53:05 +00:00
Christophe Dumez
739390134f BUGFIX: Fix 'Add in pause' setting in torrent addition dialog 2010-01-07 18:29:20 +00:00
Christophe Dumez
781f579037 - Updated spanish and catalan translations 2010-01-07 07:39:20 +00:00
Christophe Dumez
413dd60c56 - Bump to v2.0.6 2010-01-05 21:19:07 +00:00
Christophe Dumez
1c0d462785 COSMETIC: Improve torrent deletion confirmation dialog so that the text that not get truncated 2010-01-04 22:41:56 +00:00
Christophe Dumez
89f317dad2 BUGFIX: Force data recheck whenever a torrent is moved
BUGFIX: Detect existing torrent data even if incomplete torrents are saved to a different folder
2010-01-04 21:29:18 +00:00
Christophe Dumez
facbb650d0 - BUGFIX: Stop catching signals once one has been caught to avoid possible infinite loop 2010-01-03 14:41:28 +00:00
Christophe Dumez
893b7bf7f3 - Fix detection of invalid torrent files 2010-01-03 13:04:26 +00:00
Christophe Dumez
f39d3296ab - Use QDir::separator instead of / for Windows compatibility 2010-01-01 13:24:57 +00:00
Christophe Dumez
edbe67c4e6 - Updated spanish translation 2009-12-31 18:22:10 +00:00
Christophe Dumez
9836d4ec07 - Bump to v2.0.5 2009-12-31 16:53:20 +00:00
Christophe Dumez
b5b14d4d43 - BUGFIX: Fix crash with downloaded/availability bars when the torrent has too many pieces 2009-12-31 16:42:50 +00:00
Christophe Dumez
dff1666b6c BUGFIX: Fix possible crash when drawing piece downloaded/availability bars 2009-12-31 15:13:33 +00:00
Christophe Dumez
e6966bec31 - Updated release date 2009-12-30 16:53:19 +00:00
Christophe Dumez
e92f6a3d96 Display the correct DHT port in the log window 2009-12-30 16:49:38 +00:00
Christophe Dumez
f70aab3877 - Another fix for global download rate limiting in Web UI 2009-12-30 16:40:35 +00:00
Christophe Dumez
ec44efb261 BUGFIX: Fix global download rate limiting from Web UI 2009-12-30 16:38:46 +00:00
Christophe Dumez
d227ed8b59 - Use global maximum transfer rates as maximum values in per-torrent speed limiting dialogs (Web UI)
- Fix compilation error introduced in last commit
2009-12-30 16:35:45 +00:00
Christophe Dumez
395c2c862a - Use global maximum transfer rates as maximum values in per-torrent speed limit
ing dialogs
2009-12-30 16:21:04 +00:00
Christophe Dumez
e7eb61c0c3 - Updated French translation 2009-12-30 16:04:23 +00:00
Christophe Dumez
7cd2ec57d3 - qBittorrent no longer listens on a random port whenever it receives a listen_f
ailed_alert (because it may correspond to another network interface)
- Display a "disconnected" icon in status bar whenever qBittorrent fails to list
en on the selected port
2009-12-30 16:02:30 +00:00
Christophe Dumez
4941f24fff - Better Float JSON encoding fix for Qt 4.6 2009-12-29 22:58:32 +00:00
Christophe Dumez
94cb5fe0b6 - BUGFIX: Use Wildcard matching instead of full regex in RSS feed downloader 2009-12-29 21:42:19 +00:00
Christophe Dumez
4828ffa280 - Fix communication between qBittorrent and Web UI (broken by Qt 4.6) 2009-12-29 20:13:19 +00:00
Christophe Dumez
622d9701cb - Fix possible issues with DHT service port 2009-12-29 10:13:21 +00:00
Christophe Dumez
93c4b521bb - Make sure service port does not change 2009-12-28 21:23:51 +00:00
Christophe Dumez
9c7374e4a1 - Fix possible crash when closing a search engine tab that is not currently displayed 2009-12-28 20:56:46 +00:00
Christophe Dumez
1d58e7fd7f - Fix PeerGuardian .p2b file support 2009-12-28 19:36:42 +00:00
Christophe Dumez
ed9c68eea0 - Updated Catalan translator name 2009-12-23 20:08:15 +00:00
Christophe Dumez
1b8a87c54d - Updated spanish and catalan translations 2009-12-23 20:05:57 +00:00
Christophe Dumez
a33b978564 - Bump to v2.0.3 2009-12-23 08:53:21 +00:00
Christophe Dumez
f9cf937e20 - Minor french translation update 2009-12-22 21:35:28 +00:00
Christophe Dumez
7109685913 - Updated language files 2009-12-22 21:32:42 +00:00
Christophe Dumez
bd222ac8bd - BUGFIX: Use the save path set in program preferences as a default in torrent addition dialog 2009-12-22 19:22:33 +00:00
Christophe Dumez
b675f4ac58 - Fix issue with speed limiting (infinite value was not handled properly) 2009-12-22 17:37:45 +00:00
Christophe Dumez
9989ec79c9 - BUGFIX: Trackers are now displayed for torrents without metadata 2009-12-22 15:40:05 +00:00
Christophe Dumez
20167c2276 - Fix little typo 2009-12-22 14:21:03 +00:00
Christophe Dumez
e26a1d5342 - BUGFIX: Handle paths with [~, ., ..] properly 2009-12-22 10:39:38 +00:00
Christophe Dumez
3734e11879 - Update spanish translator name 2009-12-21 18:49:38 +00:00
Christophe Dumez
4632c6fda9 - Updated Spanish translation 2009-12-21 16:13:02 +00:00
Christophe Dumez
62ff08b6b5 - Fix "Temp path" button in program preferences 2009-12-19 20:46:51 +00:00
Christophe Dumez
f50b62624a - Fix to Serbian translation 2009-12-19 19:35:51 +00:00
Christophe Dumez
d380eb9958 - Updated Russian translation 2009-12-19 13:40:15 +00:00
Christophe Dumez
a71bdde022 - Updated Serbian translation 2009-12-19 07:50:26 +00:00
Christophe Dumez
e8e6894b5c - Minor cosmetic fix to program preferences 2009-12-18 20:02:55 +00:00
Christophe Dumez
d92f69fa0f - Prepare for v2.0.2 release 2009-12-18 15:24:13 +00:00
Christophe Dumez
77d7a1ec49 - Fix .qbittorrent folder not being created. This bug was introduced in v2.0.1 and it is very important. 2009-12-18 15:15:32 +00:00
Christophe Dumez
d5c174a6f8 - BUGFIX: Read RSS articles are remembered on restart for feeds with no torr
ents attached
2009-12-18 14:47:33 +00:00
Christophe Dumez
173999e504 - Fix Mininova search engine plugin 2009-12-18 14:16:19 +00:00
Christophe Dumez
1ed928bc39 - BUGFIX: Fix ThePirateBay.org search engine plugin 2009-12-18 14:00:39 +00:00
Christophe Dumez
b85d51ba79 - Do not use home folder as a fallback when the destination folder is not accessible 2009-12-17 20:01:18 +00:00
Christophe Dumez
779b53722b - Added referer parameter to download_file() helper function (required by some websites such as sumotorrent) 2009-12-14 21:50:21 +00:00
Christophe Dumez
76780c4c46 - Fix RSS downloader for feeds where torrents are not attached (but the links points to them) 2009-12-14 18:56:00 +00:00
Christophe Dumez
da74f24a71 - Update changelog 2009-12-13 17:53:04 +00:00
Christophe Dumez
01c56865db - Better checking of based32 encoded Magnet Links to increase robustness 2009-12-13 10:15:50 +00:00
Christophe Dumez
b541c9fa4c - Added Hex Magnet Link support (new standard, used for example by ThePirateBay) 2009-12-13 09:52:28 +00:00
Christophe Dumez
aac0fbcbe4 - Fix possible crash in torrent properties (files) 2009-12-13 00:44:47 +00:00
Christophe Dumez
b315551edd - Fix missing slot warning when using libtorrent v0.14 (Thanks Haypo) 2009-12-13 00:03:35 +00:00
Christophe Dumez
58a885cb87 - Updated version number to v2.0.1 2009-12-12 22:57:56 +00:00
Christophe Dumez
d19282285c - BUGFIX: ~/qBT_dir is created only when it is actually used 2009-12-12 22:39:29 +00:00
Christophe Dumez
32a8dec0e7 - ~/qBT_dir is no longer created when it is not used 2009-12-12 22:34:16 +00:00
Christophe Dumez
e0d8ca39a5 - BUGFIX: Fix link to plugins.qbittorrent.org in plugins dialog 2009-12-12 22:17:51 +00:00
Christophe Dumez
2dd5bccd49 - BUGFIX: Fix link to plugins.qbittorrent.org in plugins dialog 2009-12-12 22:15:55 +00:00
Christophe Dumez
ec3169c9b0 - Fix column hiding behavior when queueing system is disabled 2009-12-12 22:07:41 +00:00
Christophe Dumez
18d0283463 - Fix column hiding behavior when queueing system is disabled 2009-12-12 21:59:06 +00:00
Christophe Dumez
7bfd7e9cda - Disable debug mode 2009-12-11 13:05:46 +00:00
Christophe Dumez
459bb8c51d - Removed useless debug 2009-12-11 12:26:51 +00:00
Christophe Dumez
9fe807b6f1 - Removed useless debug 2009-12-11 12:23:53 +00:00
Christophe Dumez
9159a9f25d - µTorrent is now also spoofed correctly 2009-12-11 12:22:41 +00:00
Christophe Dumez
84f00bf3f6 - uTorrent user agent is now spoofed correctly 2009-12-11 12:18:00 +00:00
Christophe Dumez
8ea8f8a9f7 - Branched v2.0.x 2009-12-10 19:39:09 +00:00
Christophe Dumez
d3687fd863 - Store Web UI password as md5 2009-12-10 19:19:19 +00:00
Christophe Dumez
d1a549a6cc - Updated Korean translation
- Updated Changelog
2009-12-10 16:57:16 +00:00
Christophe Dumez
c1552ff254 - Updated Italian translation 2009-12-10 02:55:13 +00:00
Christophe Dumez
54a396bc6e - Updated Japanese translator's e-mail 2009-12-09 14:36:50 +00:00
Christophe Dumez
ed732bca63 - Updated Hungarian translation 2009-12-09 14:25:48 +00:00
Christophe Dumez
02a4464e8f - Updated Bulgarian translation 2009-12-09 13:43:17 +00:00
Christophe Dumez
7f97df4462 - Updated name of Turkish translation in AUTHORS file 2009-12-09 13:09:49 +00:00
Christophe Dumez
9d20af02a2 - Some fixes to Greek translation 2009-12-09 11:50:28 +00:00
Christophe Dumez
cbaef050f0 - Fixed Serbian language name in Serbian (Српски) 2009-12-08 22:01:26 +00:00
Christophe Dumez
148139c2c4 - Fixed serbian translation (forgot to embed it into qBittorrent executable) 2009-12-08 21:55:27 +00:00
Christophe Dumez
793f8a103d - Slovak and Serbian were inverted
- Updated Serbia flag (better resolution)
2009-12-08 21:48:14 +00:00
Christophe Dumez
ffa48b64ac - Updated language files 2009-12-08 21:44:34 +00:00
Christophe Dumez
59a8e651f9 - Updated Changelog
- Bump to rc7
2009-12-08 19:31:17 +00:00
Christophe Dumez
fb9f2a01b5 - Fix Paste action in search field 2009-12-08 19:24:14 +00:00
Christophe Dumez
944e25a5d8 - Remember torrent addition dialog size and position 2009-12-08 17:48:33 +00:00
Christophe Dumez
ad597c72d2 - Optimize torrent addition dialog vertical space usage 2009-12-08 17:26:43 +00:00
Christophe Dumez
abbbf1e562 - Torrent Addition Dialog: File priorities were not taken into consideration (Thanks Mariusz) 2009-12-08 17:20:28 +00:00
Christophe Dumez
d2dd29c35a - Suppress compilation warning when geoip is not embedded in qBittorrent executable 2009-12-08 17:16:29 +00:00
Christophe Dumez
906f2bab1e - Disable debug again 2009-12-08 16:43:48 +00:00
Christophe Dumez
bb6468005d - Fix torrent upload in Web UI (worked randomly) 2009-12-08 16:42:59 +00:00
Christophe Dumez
a2423e97eb - Fix download from MAGNET URI in regular UI 2009-12-08 08:06:42 +00:00
Christophe Dumez
ed1d75ecb1 - Also look in /var/lib/GeoIP/GeoIP.dat for GeoIP database (OpenSuse 11.2)
* Thanks to Mariusz Fik for his report and patch
2009-12-08 07:55:08 +00:00
Christophe Dumez
1e4200345a - Updated Serbian translation 2009-12-08 07:51:41 +00:00
Christophe Dumez
be11f4e039 - Clean up RSS preferences loading 2009-12-07 22:04:20 +00:00
Christophe Dumez
22ec528cdf - Fix regular refresh of RSS feeds 2009-12-07 21:58:26 +00:00
Christophe Dumez
ebf341a6de - Update INSTALL file to explain that geoip-database is a runtime-only dependency 2009-12-07 21:16:59 +00:00
115 changed files with 12239 additions and 10538 deletions

10
AUTHORS
View File

@@ -57,7 +57,7 @@ Translations authors:
copyright:
- Brazilian: Nick Marinho (nickmarinho@gmail.com)
- Bulgarian: Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)
- Catalan: Gekko Dam Beer (gekko04@users.sourceforge.net)
- Catalan: Francisco Luque Contreras (frannoe@ya.com)
- Chinese (Simplified): Guo Yue (yue.guo0418@gmail.com)
- Chinese (Traditional): Yi-Shun Wang (dnextstep@gmail.com)
- Czech: Jirka Vilim (web@tets.cz)
@@ -67,10 +67,10 @@ Translations authors:
- Finnish: Niklas Laxström (nikerabbit@users.sourceforge.net)
- French: Christophe Dumez (chris@qbittorrent.org)
- German: Niels Hoffmann (zentralmaschine@users.sourceforge.net)
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net)
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net) and Stephanos Antaris (santaris@csd.auth.gr)
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
- Italian: Mirko Ferrari (mirkoferrari@gmail.com) and Ferraro Luciano (luciano.ferraro@gmail.com)
- Japanese: Nardog (nardog@e2umail.com)
- Japanese: Nardog (alphisation@gmail.com)
- Korean: Jin Woo Sin (jin828sin@users.sourceforge.net)
- Norwegian: Lars-Erik Labori (hamil@users.sourceforge.net)
- Polish: Mariusz Fik (fisiu@opensuse.org)
@@ -79,8 +79,8 @@ Translations authors:
- Russian: Nick Khazov (m2k3d0n at users.sourceforge.net)
- Serbian: Anaximandar Milet (anaximandar at operamail.com)
- Slovak: helix84
- Spanish: Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net)
- Spanish: Francisco Luque Contreras (frannoe@ya.com)
- Swedish: Daniel Nylander (po@danielnylander.se)
- Turkish: Erdem Bingöl (erdem84@gmail.com)
- Turkish: Hasan Yilmaz (iletisim@hedefturkce.com)
- Ukrainian: Andrey Shpachenko (masterfix@users.sourceforge.net)
license: GPLv2

105
Changelog
View File

@@ -1,4 +1,60 @@
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v2.0.0
* Mon Jan 11 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.7
- BUGFIX: Fix 'Add in pause' setting in torrent addition dialog
- BUGFIX: Update RSS feed as soon as feed downloader is enabled
- BUGFIX: RSS Feed downloader ignores articles above maximum number of articles
- BUGFIX: Fix possible bug when deleting a RSS folder
- BUGFIX: Remove persistant data when a RSS feed is deleted
- BUGFIX: RSS filters are now alphabetically sorted
- BUGFIX: Fix crash when renaming currently displayed RSS filter
- BUGFIX: Remove overwriting confirmation when exporting RSS filters since Qt takes care of it
* Tue Jan 5 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.6
- BUGFIX: Fix detection of invalid torrent files
- BUGFIX: Stop catching signals once one has been caught to avoid possible infinite loop
- BUGFIX: Force data recheck whenever a torrent is moved
- BUGFIX: Detect existing torrent data even if incomplete torrents are saved to a different folder
- COSMETIC: Improve torrent deletion confirmation dialog so that the text that not get truncated
* Thu Dec 31 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.5
- BUGFIX: Fix crash with downloaded/availability bars when the torrent has too many pieces
* Wed Dec 30 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.4
- BUGFIX: Fix PeerGuardian .p2b binary filter support
- BUGFIX: Fix possible crash when closing a search engine tab
- BUGFIX: Make sure service port does not change
- BUGFIX: Fix possible DHT port saving issue
- BUGFIX: Fix communication between qBittorrent and Web UI (Qt 4.6)
- BUGFIX: Use Wildcard matching instead of full regex in RSS feed downloader
- BUGFIX: Fix code for listening on a random port whenever it failed to listen on the one defined
- BUGFIX: Use global maximum transfer rates as maximum values in per-torrent speed limiting dialogs
- BUGFIX: Fix global download rate limiting from Web UI
- COSMETIC: Display a disconnected icon in status bar whenever qBittorrent failed to listen on the port defined
* Wed Dec 23 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.3
- BUGFIX: Minor cosmetic fix to program preferences
- BUGFIX: Fix "Temp path" button in program preferences
- BUGFIX: Handle paths with [~, ., ..] properly
- BUGFIX: Trackers are now displayed for torrents without metadata
- BUGFIX: Fix issue with speed limiting (unlimited was not handled properly)
- BUGFIX: Use the save path set in program preferences as a default in torrent addition dialog
* Fri Dec 18 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.2
- BUGFIX: Fix .qbittorrent folder not being created (critical bug introduced in v2.0.1 that makes qBittorrent unusuable for new users)
- BUGFIX: Fix RSS Feed downloader for some feeds
- BUGFIX: Do not use home folder as a fallback when the save path is not accessible
- BUGFIX: Fix Mininova, ThePirateBay search engine plugins
- BUGFIX: Read RSS articles are remembered on restart for feeds with no torrents attached
* Sun Dec 13 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.1
- BUGFIX: µTorrent user-agent is now spoofed correctly
- BUGFIX: Fix column hiding behavior when queueing system is disabled
- BUGFIX: Fix link to plugins.qbittorrent.org in plugins dialog
- BUGFIX: ~/qBT_dir is created only when it is actually used
- BUGFIX: Fix possible missing slot message (toggleSelectedTorrentsSuperSeeding)
- BUGFIX: Fix possible crash in torrent properties (files)
- BUGFIX: Added Hex Magnet Links support (Thanks Haypo)
* Thu Dec 10 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.0
- FEATURE: Added program option to disable splash screen
- FEATURE: Dropped dependency on libcurl and libzzip
- FEATURE: Display more information regarding the torrent in its properties
@@ -38,10 +94,14 @@
- FEATURE: Support for bitcomet padding files (libtorrent >= v0.15 only)
- FEATURE: Option to skip file checking and start seeding immediately in torrent addition dialog (Stephanos Antaris) (libtorrent >= v0.15 only)
- BUGFIX: Made sure qBittorrent does not scrape the tracker too frequently (libtorrent >= 0.15 only)
- BUGFIX: Fix Paste action in search engine field
- BUGFIX: Fix possible double free in search engine destructor
- BUGFIX: Properly handle trackers error messages
- WEB UI: Remodeled Web UI to match new qBittorrent UI (Properties and preferences available)
- WEB UI: Added internationalization support
- WEB UI: Reduced computation in Javascript (do this one server side instead)
- WEB UI: Fixed Transfer list flickering
- WEB UI: Password is now stored as md5
- I18N: Added Serbian translation (By Anaximandar Milet)
- COSMETIC: Merged download / upload lists
- COSMETIC: Torrents can be filtered based on their status
@@ -55,6 +115,49 @@
- COSMETIC: New torrent status icons by Mateusz Tolola
- COSMETIC: Make use of libnotify if available for system notifications (Ubuntu, ...)
* Tue Nov 17 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.6
- BUGFIX: RSS feed articles can now be displayed using keyboard arrows
- BUGFIX: RSS feed downloader can only process unread articles now
- BUGFIX: Fixed memory leak in RSS parser
- BUGFIX: Fixed possible crash in search autocompletion
- BUGFIX: Improved ETA calculation for big torrents
- BUGFIX: Fixed per-torrent speed limiting
* Wed Nov 4 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.5
- BUGFIX: Fixed man page
- BUGFIX: Fix crash on torrent addition (if libtorrent-rasterbar has debug enabled)
- BUGFIX: Fix trackers addition to torrents (bug introduced in v1.5.4)
- BUGFIX: Suppress compilation warning regarding sortNewsList() not being used
- BUGFIX: Make sure scan folder is different than qBittorrent backup directory to avoid torrents deletion
- BUGFIX: Added safety mecanism which adds the torrents back to the list in case qbittorrent-resume.conf gets deleted or corrupted.
* Sun Oct 25 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.4
- BUGFIX: Updated man page
- BUGFIX: Fixed possible crash with torrents containing unicode characters
- BUGFIX: Fixed problem when disabling systray integration and starting minimized
- BUGFIX: Fixed PirateBay search plugin
- BUGFIX: Using Download button in search results list now downloads the right torrents
- BUGFIX: The search results list is no longer sorted automatically when a row color is updated
* Wed Sep 30 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.3
- BUGFIX: Fix a possible crash when pausing then deleting a torrent quickly
- BUGFIX: Fix a race condition in folder scanning and torrent downloader
- BUGFIX: Hide download url column in search results
- BUGFIX: Fix a crash when scanned directory does not exist
- BUGFIX: Fix compilation on Mac OS
- BUGFIX: Added a command line parameter to disable splash screen
- BUGFIX: Ignore permanent deletion button when no torrent is selected
- BUGFIX: When a selected torrent is deleted, select next suitable torrent
* Sun Sep 20 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.2
- BUGFIX: Some torrents were pausing for no reason
- I18N: Updated Korean translation
* Thu Sep 7 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.1
- BUGFIX: Fix crash in torrent addition dialog when save path does not exist (closes #425227)
- BUGFIX: Fix downloading from URL (broken in v1.5.0)
- BUGFIX: Pause torrents in error state
* Thu Sep 3 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.0
- FEATURE: Added Magnet URI support
- FEATURE: Search engine supports category-based requests

View File

@@ -18,6 +18,7 @@ Dependencies:
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
- python >= 2.3 (needed by search engine)
* Run time only dependency
- libnotify >= 0.4.2, glib-2.0 (optional)
* Can be used for system notifications to replace standard Qt notifications
@@ -25,6 +26,7 @@ Dependencies:
- geoip-database (optional)
* If qBittorrent cannot find this database, it will try to resolve countries using the Internet but it will be a lot slower.
* Run time only dependency
DOCUMENTATION:
Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org.

4
configure vendored
View File

@@ -461,9 +461,9 @@ public:
return true;
#ifdef Q_WS_X11
}
if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat") || QFile::exists("/var/lib/GeoIP/GeoIP.dat"))
return true;
printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat\nCountry resolution will be slow.");
printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat or /var/lib/GeoIP/GeoIP.dat\nCountry resolution will be slow.");
return false;
#endif
}

View File

@@ -20,9 +20,9 @@ public:
return true;
#ifdef Q_WS_X11
}
if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
if(QFile::exists("/usr/share/GeoIP/GeoIP.dat") || QFile::exists("/usr/local/share/GeoIP/GeoIP.dat") || QFile::exists("/var/lib/GeoIP/GeoIP.dat"))
return true;
printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat\nCountry resolution will be slow.");
printf("\nWarning: GeoIP database was not found at /usr/share/GeoIP/GeoIP.dat or /var/lib/GeoIP/GeoIP.dat\nCountry resolution will be slow.");
return false;
#endif
}

View File

@@ -749,7 +749,7 @@ void GUI::loadPreferences(bool configure_session) {
// RSS
if(Preferences::isRSSEnabled()) {
displayRSSTab(true);
rssWidget->updateRefreshInterval(Preferences::getRefreshInterval());
rssWidget->updateRefreshInterval(Preferences::getRSSRefreshInterval());
} else {
displayRSSTab(false);
}
@@ -913,6 +913,6 @@ void GUI::on_actionOptions_triggered() {
// an url
void GUI::on_actionDownload_from_URL_triggered() {
downloadFromURL *downloadFromURLDialog = new downloadFromURL(this);
connect(downloadFromURLDialog, SIGNAL(urlsReadyToBeDownloaded(const QStringList&)), BTSession, SLOT(downloadFromURLList(const QStringList&)));
connect(downloadFromURLDialog, SIGNAL(urlsReadyToBeDownloaded(const QStringList&)), this, SLOT(downloadFromURLList(const QStringList&)));
}

View File

@@ -157,6 +157,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
// Methods
int getCurrentTabIndex() const;
QPoint screenCenter() const;
TransferListWidget* getTransferList() const { return transferList; }
};
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

View File

@@ -1,6 +1,6 @@
[Desktop Entry]
Categories=Qt;Network;P2P;
Comment=V2.0.0
Comment=V2.0.7
Exec=qbittorrent %f
GenericName=Bittorrent client
GenericName[bg]=Торент клиент
@@ -21,7 +21,7 @@ GenericName[pt_BR]=Cliente Bittorrent
GenericName[ro]=Client Bittorrent
GenericName[ru]=клиент Bittorrent
GenericName[sk]=Klient siete Bittorrent
GenericName[sr]=БитТоррент клијент
GenericName[sr]=Bittorrent-клијент
GenericName[sv]=Bittorrent-klient
GenericName[tr]=Bittorrent istemcisi
GenericName[uk]=Bittorrent-клієнт

BIN
src/Icons/skin/disconnected.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -64,7 +64,7 @@ class about : public QDialog, private Ui::AboutDlg{
te_translation->append(QString::fromUtf8(
"<i>- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
- <u>Bulgarian:</u> Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)<br>\
- <u>Catalan:</u> Gekko Dam Beer (gekko04@users.sourceforge.net)<br>\
- <u>Catalan:</u> Francisco Luque Contreras (frannoe@ya.com)<br>\
- <u>Chinese (Simplified):</u> Guo Yue (yue.guo0418@gmail.com)<br>\
- <u>Chinese (Traditional):</u> Yi-Shun Wang (dnextstep@gmail.com)<br>\
- <u>Czech:</u> Jirka Vilim (web@tets.cz)<br>\
@@ -75,7 +75,7 @@ class about : public QDialog, private Ui::AboutDlg{
- <u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net)<br>\
- <u>Hungarian:</u> Majoros Péter (majoros.peterj@gmail.com)<br>\
- <u>Italian:</u> Mirko Ferrari (mirkoferrari@gmail.com) and Ferraro Luciano (luciano.ferraro@gmail.com)<br>\
- <u>Japanese:</u> Nardog (nardog@e2umail.com)<br>\
- <u>Japanese:</u> Nardog (alphisation@gmail.com)<br>\
- <u>Korean:</u> Jin Woo Sin (jin828sin@users.sourceforge.net)<br>\
- <u>Norwegian:</u> Lars-Erik Labori (hamil@users.sourceforge.net)<br>\
- <u>Polish:</u> Mariusz Fik (fisiu@opensuse.org)<br>\
@@ -84,7 +84,7 @@ class about : public QDialog, private Ui::AboutDlg{
- <u>Russian:</u> Nick Khazov (m2k3d0n@users.sourceforge.net) and Alexey Morsov (samurai@ricom.ru)<br>\
- <u>Serbian:</u> Anaximandar Milet (anaximandar@operamail.com)<br>\
- <u>Slovak:</u> helix84<br>\
- <u>Spanish:</u> Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net) and Gabriel de Oliveira (deadloop@hotmail.com)<br>\
- <u>Spanish:</u> Francisco Luque Contreras (frannoe@ya.com)<br>\
- <u>Swedish:</u> Daniel Nylander (po@danielnylander.se)<br>\
- <u>Turkish:</u> Hasan YILMAZ (iletisim@hedefturkce.com) and Erdem Bingöl (erdem84@gmail.com)<br>\
- <u>Ukrainian:</u> Andrey Shpachenko (masterfix@users.sourceforge.net)<br><br>"));

View File

@@ -63,7 +63,7 @@
enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4};
// Main constructor
Bittorrent::Bittorrent() : preAllocateAll(false), addInPause(false), ratio_limit(-1), UPnPEnabled(false), NATPMPEnabled(false), LSDEnabled(false), DHTEnabled(false), queueingEnabled(false), geoipDBLoaded(false), exiting(false) {
Bittorrent::Bittorrent() : preAllocateAll(false), addInPause(false), ratio_limit(-1), UPnPEnabled(false), NATPMPEnabled(false), LSDEnabled(false), DHTEnabled(false), current_dht_port(0), queueingEnabled(false), geoipDBLoaded(false), exiting(false) {
resolve_countries = false;
// To avoid some exceptions
fs::path::default_name_check(fs::no_check);
@@ -241,9 +241,9 @@ void Bittorrent::configureSession() {
// Connection
// * Ports binding
unsigned short old_listenPort = getListenPort();
setListeningPort(Preferences::getSessionPort());
unsigned short new_listenPort = getListenPort();
if(new_listenPort != old_listenPort) {
unsigned short new_listenPort = Preferences::getSessionPort();
if(old_listenPort != new_listenPort) {
setListeningPort(new_listenPort);
addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));
}
// * Global download limit
@@ -303,7 +303,7 @@ void Bittorrent::configureSession() {
// * Session settings
session_settings sessionSettings;
if(Preferences::isUtorrentSpoofingEnabled()) {
sessionSettings.user_agent = "uTorrent/1850";
sessionSettings.user_agent = "uTorrent/1850(17414)";
} else {
sessionSettings.user_agent = "qBittorrent "VERSION;
}
@@ -346,10 +346,13 @@ void Bittorrent::configureSession() {
if(Preferences::isDHTEnabled()) {
// Set DHT Port
if(enableDHT(true)) {
int dht_port = new_listenPort;
if(!Preferences::isDHTPortSameAsBT())
int dht_port;
if(Preferences::isDHTPortSameAsBT())
dht_port = 0;
else
dht_port = Preferences::getDHTPort();
setDHTPort(dht_port);
if(dht_port == 0) dht_port = new_listenPort;
addConsoleMessage(tr("DHT support [ON], port: UDP/%1").arg(dht_port), QString::fromUtf8("blue"));
} else {
addConsoleMessage(tr("DHT support [OFF]"), QString::fromUtf8("red"));
@@ -699,11 +702,13 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
}
}
QString savePath = getSavePath(hash);
qDebug("addMagnetURI: using save_path: %s", savePath.toLocal8Bit().data());
if(defaultTempPath.isEmpty() || (resumed && TorrentPersistentData::isSeed(hash))) {
p.save_path = savePath.toLocal8Bit().data();
} else {
if(!defaultTempPath.isEmpty() && resumed && !TorrentPersistentData::isSeed(hash)) {
qDebug("addMagnetURI: Temp folder is enabled.");
p.save_path = defaultTempPath.toLocal8Bit().data();
qDebug("addMagnetURI: using save_path: %s", defaultTempPath.toLocal8Bit().data());
} else {
p.save_path = savePath.toLocal8Bit().data();
qDebug("addMagnetURI: using save_path: %s", savePath.toLocal8Bit().data());
}
// Preallocate all?
if(preAllocateAll)
@@ -727,6 +732,13 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
return h;
}
Q_ASSERT(h.hash() == hash);
// If temp path is enabled, move torrent
if(!defaultTempPath.isEmpty() && !resumed) {
qDebug("Temp folder is enabled, moving new torrent to temp folder");
h.move_storage(defaultTempPath);
}
// Connections limit per torrent
h.set_max_connections(Preferences::getMaxConnecsPerTorrent());
// Uploads limit per torrent
@@ -791,6 +803,8 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
try {
// Getting torrent file informations
t = new torrent_info(file.toLocal8Bit().data());
if(!t->is_valid())
throw std::exception();
} catch(std::exception&) {
if(!from_url.isNull()) {
addConsoleMessage(tr("Unable to decode torrent file: '%1'", "e.g: Unable to decode torrent file: '/home/y/xxx.torrent'").arg(from_url), QString::fromUtf8("red"));
@@ -849,11 +863,13 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
} else {
savePath = getSavePath(hash);
}
qDebug("addTorrent: using save_path: %s", savePath.toLocal8Bit().data());
if(defaultTempPath.isEmpty() || (resumed && TorrentPersistentData::isSeed(hash))) {
p.save_path = savePath.toLocal8Bit().data();
} else {
if(!defaultTempPath.isEmpty() && resumed && !TorrentPersistentData::isSeed(hash)) {
qDebug("addTorrent::Temp folder is enabled.");
p.save_path = defaultTempPath.toLocal8Bit().data();
qDebug("addTorrent: using save_path: %s", defaultTempPath.toLocal8Bit().data());
} else {
p.save_path = savePath.toLocal8Bit().data();
qDebug("addTorrent: using save_path: %s", savePath.toLocal8Bit().data());
}
#ifdef LIBTORRENT_0_15
@@ -893,12 +909,13 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
if(!from_url.isNull()) QFile::remove(file);
return h;
}
// FIXME: Remove this debug
std::vector<announce_entry> trackers = h.trackers();
std::vector<announce_entry>::iterator it;
for(it=trackers.begin(); it!=trackers.end(); it++) {
qDebug("* Tracker: %s", it->url.c_str());
// If temp path is enabled, move torrent
if(!defaultTempPath.isEmpty() && !resumed) {
qDebug("Temp folder is enabled, moving new torrent to temp folder");
h.move_storage(defaultTempPath);
}
// Connections limit per torrent
h.set_max_connections(Preferences::getMaxConnecsPerTorrent());
// Uploads limit per torrent
@@ -910,6 +927,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
// Sequential download
if(TorrentTempData::hasTempData(hash)) {
qDebug("addTorrent: Setting download as sequential (from tmp data)");
h.prioritize_files(TorrentTempData::getFilesPriority(hash));
h.set_sequential_download(TorrentTempData::isSequential(hash));
}
// Save persistent data for new torrent
@@ -1366,10 +1384,12 @@ void Bittorrent::setDeleteRatio(float ratio) {
// Set DHT port (>= 1000 or 0 if same as BT)
void Bittorrent::setDHTPort(int dht_port) {
if(dht_port == 0 or dht_port >= 1000) {
if(dht_port == 0 || dht_port >= 1000) {
if(dht_port == current_dht_port) return;
struct dht_settings DHTSettings;
DHTSettings.service_port = dht_port;
s->set_dht_settings(DHTSettings);
current_dht_port = dht_port;
qDebug("Set DHT Port to %d", dht_port);
}
}
@@ -1492,6 +1512,11 @@ void Bittorrent::readAlerts() {
}
}
}
else if (storage_moved_alert* p = dynamic_cast<storage_moved_alert*>(a.get())) {
QTorrentHandle h(p->handle);
if(h.is_valid())
h.force_recheck(); //XXX: Required by libtorrent for now
}
else if (metadata_received_alert* p = dynamic_cast<metadata_received_alert*>(a.get())) {
QTorrentHandle h(p->handle);
if(h.is_valid()) {
@@ -1516,18 +1541,6 @@ void Bittorrent::readAlerts() {
}
}
}
else if (listen_failed_alert* p = dynamic_cast<listen_failed_alert*>(a.get())) {
// Level: fatal
int tried_port = p->endpoint.port();
srand(time(0));
int fallback_port = tried_port;
do {
fallback_port = rand() % 64512 + 1024;
} while(fallback_port == tried_port);
addConsoleMessage(tr("Couldn't listen on port %1, using %2 instead.").arg(QString::number(tried_port)).arg(QString::number(fallback_port)), QString::fromUtf8("red"));
setListeningPort(fallback_port);
//emit portListeningFailure();
}
/*else if (torrent_paused_alert* p = dynamic_cast<torrent_paused_alert*>(a.get())) {
QTorrentHandle h(p->handle);
qDebug("Received a torrent_paused_alert for %s", h.hash().toLocal8Bit().data());
@@ -1647,6 +1660,7 @@ QHash<QString, TrackerInfos> Bittorrent::getTrackersInfo(QString hash) const{
}
int Bittorrent::getListenPort() const{
qDebug("LISTEN PORT: %d", s->listen_port());
return s->listen_port();
}
@@ -1668,14 +1682,16 @@ QString Bittorrent::getSavePath(QString hash) {
qDebug("Using default save path because none was set: %s", defaultSavePath.toLocal8Bit().data());
savePath = defaultSavePath;
}
// Clean path
savePath = misc::expandPath(savePath);
// Checking if savePath Dir exists
// create it if it is not
QDir saveDir(savePath);
if(!saveDir.exists()) {
if(!saveDir.mkpath(saveDir.path())) {
if(!saveDir.mkpath(saveDir.absolutePath())) {
std::cerr << "Couldn't create the save directory: " << saveDir.path().toLocal8Bit().data() << "\n";
// XXX: handle this better
return QDir::homePath();
//return QDir::homePath();
}
}
return savePath;

View File

@@ -107,6 +107,7 @@ private:
bool NATPMPEnabled;
bool LSDEnabled;
bool DHTEnabled;
int current_dht_port;
bool queueingEnabled;
QString defaultSavePath;
QString defaultTempPath;

View File

@@ -36,6 +36,7 @@
#include <QList>
#include <QPixmap>
#include <libtorrent/bitfield.hpp>
#include <math.h>
using namespace libtorrent;
#define BAR_HEIGHT 18
@@ -55,19 +56,46 @@ public:
void setProgress(bitfield pieces) {
if(pieces.empty()) {
// Empty bar
pixmap = QPixmap(1, 1);
QPainter painter(&pixmap);
painter.setPen(Qt::white);
painter.drawPoint(0,0);
QPixmap pix = QPixmap(1, 1);
pix.fill();
pixmap = pix;
} else {
pixmap = QPixmap(pieces.size(), 1);
QPainter painter(&pixmap);
for(uint i=0; i<pieces.size(); ++i) {
if(pieces[i])
painter.setPen(Qt::blue);
else
painter.setPen(Qt::white);
painter.drawPoint(i,0);
int nb_pieces = pieces.size();
// Reduce the number of pieces before creating the pixmap
// otherwise it can crash when there are too many pieces
if(nb_pieces > width()) {
int ratio = floor(nb_pieces/(double)width());
QVector<bool> scaled_pieces;
for(int i=0; i<nb_pieces; i+= ratio) {
bool have = true;
for(int j=i; j<qMin(i+ratio, nb_pieces); ++j) {
if(!pieces[i]) { have = false; break; }
}
scaled_pieces << have;
}
QPixmap pix = QPixmap(scaled_pieces.size(), 1);
pix.fill();
QPainter painter(&pix);
for(int i=0; i<scaled_pieces.size(); ++i) {
if(scaled_pieces[i])
painter.setPen(Qt::blue);
else
painter.setPen(Qt::white);
painter.drawPoint(i,0);
}
pixmap = pix;
} else {
QPixmap pix = QPixmap(pieces.size(), 1);
pix.fill();
QPainter painter(&pix);
for(uint i=0; i<pieces.size(); ++i) {
if(pieces[i])
painter.setPen(Qt::blue);
else
painter.setPen(Qt::white);
painter.drawPoint(i,0);
}
pixmap = pix;
}
}
update();

View File

@@ -233,7 +233,7 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
}
event["name"] = QVariant(h.name());
event["size"] = QVariant(misc::friendlyUnit(h.actual_size()));
event["progress"] = QVariant(h.progress());
event["progress"] = QVariant((double)h.progress());
event["dlspeed"] = QVariant(tr("%1/s", "e.g. 120 KiB/s").arg(misc::friendlyUnit(h.download_payload_rate())));
if(BTSession->isQueueingEnabled()) {
if(h.queue_position() >= 0)

View File

@@ -47,10 +47,16 @@ public:
}
}
void itemRemoved(QTreeWidgetItem *item) {
void itemAboutToBeRemoved(QTreeWidgetItem *item) {
RssFile* file = mapping.take(item);
if(file->getType() == RssFile::STREAM)
if(file->getType() == RssFile::STREAM) {
feeds_items.remove(file->getID());
} else {
QList<RssStream*> feeds = ((RssFolder*)file)->getAllFeeds();
foreach(RssStream* feed, feeds) {
feeds_items.remove(feed->getID());
}
}
}
bool hasFeed(QString url) const {

View File

@@ -67,14 +67,14 @@ public:
foreach(const QString& token, match_tokens) {
if(token.isEmpty() || token == "")
continue;
QRegExp reg(token, Qt::CaseInsensitive);
QRegExp reg(token, Qt::CaseInsensitive, QRegExp::Wildcard);
if(reg.indexIn(s) < 0) return false;
}
// Checking not matching
QStringList notmatch_tokens = getNotMatchingTokens();
foreach(const QString& token, notmatch_tokens) {
if(token.isEmpty()) continue;
QRegExp reg(token, Qt::CaseInsensitive);
QRegExp reg(token, Qt::CaseInsensitive, QRegExp::Wildcard);
if(reg.indexIn(s) > -1) return false;
}
return true;
@@ -257,6 +257,7 @@ public:
// Restore saved info
enableDl_cb->setChecked(filters.isDownloadingEnabled());
fillFiltersList();
filtersList->sortItems(Qt::AscendingOrder);
if(filters.size() > 0) {
// Select first filter
filtersList->setCurrentItem(filtersList->item(0));
@@ -267,6 +268,8 @@ public:
}
~FeedDownloaderDlg() {
if(enableDl_cb->isChecked())
emit filteringEnabled();
// Make sure we save everything
saveCurrentFilterSettings();
filters.save();
@@ -374,11 +377,14 @@ protected slots:
QMessageBox::warning(0, tr("Invalid filter name"), tr("This filter name is already in use."));
}
}while(!validated);
// Save the current filter
saveCurrentFilterSettings();
// Rename the filter
filters.rename(current_name, new_name);
if(selected_filter == current_name)
selected_filter = new_name;
item->setText(new_name);
filtersList->sortItems(Qt::AscendingOrder);
}
}
@@ -432,6 +438,7 @@ protected slots:
}
}while(!validated);
QListWidgetItem *it = new QListWidgetItem(filter_name, filtersList);
filtersList->sortItems(Qt::AscendingOrder);
filtersList->setCurrentItem(it);
//showFilterSettings(it);
}
@@ -487,16 +494,19 @@ protected slots:
// Append file extension
if(!destination.endsWith(".filters"))
destination += ".filters";
if(QFile::exists(destination)) {
/*if(QFile::exists(destination)) {
int ret = QMessageBox::question(0, tr("Overwriting confirmation"), tr("Are you sure you want to overwrite existing file?"), QMessageBox::Yes|QMessageBox::No);
if(ret != QMessageBox::Yes) return;
}
}*/
if(filters.serialize(destination))
QMessageBox::information(0, tr("Export successful"), tr("Filters export was successful."));
else
QMessageBox::warning(0, tr("Export failure"), tr("Filters could not be exported due to an I/O error."));
}
signals:
void filteringEnabled();
};
#undef QHash

View File

@@ -71,7 +71,7 @@ class FilterParserThread : public QThread {
// PeerGuardian p2p file
parseP2PFilterFile(filePath);
} else {
if(filePath.endsWith(".p2p", Qt::CaseInsensitive)) {
if(filePath.endsWith(".p2b", Qt::CaseInsensitive)) {
// PeerGuardian p2b file
parseP2BFilterFile(filePath);
} else {

View File

@@ -42,14 +42,17 @@ using namespace libtorrent;
class GeoIP {
protected:
static QString geoipFolder(bool embedded=false) {
#ifdef WITH_GEOIP_EMBEDDED
static QString geoipFolder(bool embedded=false) {
if(embedded)
return ":/geoip/";
return misc::qBittorrentPath()+"geoip"+QDir::separator();
#else
static QString geoipFolder(bool) {
if(QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
return "/usr/local/share/GeoIP/";
if(QFile::exists("/var/lib/GeoIP/GeoIP.dat"))
return "/var/lib/GeoIP/";
return "/usr/share/GeoIP/";
#endif
}

View File

@@ -46,7 +46,7 @@
#include <QTemporaryFile>
HttpConnection::HttpConnection(QTcpSocket *socket, Bittorrent *BTSession, HttpServer *parent)
: QObject(parent), socket(socket), parent(parent), BTSession(BTSession)
: QObject(parent), socket(socket), parent(parent), BTSession(BTSession)
{
socket->setParent(this);
connect(socket, SIGNAL(readyRead()), this, SLOT(read()));
@@ -309,6 +309,11 @@ void HttpConnection::respondCommand(QString command)
torrent.close();
}
emit torrentReadyToBeDownloaded(filePath, false, QString(), false);
// Prepare response
generator.setStatusLine(200, "OK");
generator.setContentTypeByExt("html");
generator.setMessage(QString("<script type=\"text/javascript\">window.parent.hideAll();</script>"));
write();
return;
}
if(command == "resumeall") {
@@ -365,6 +370,18 @@ void HttpConnection::respondCommand(QString command)
h.file_priority(file_id, priority);
}
}
if(command == "getGlobalUpLimit") {
generator.setStatusLine(200, "OK");
generator.setContentTypeByExt("html");
generator.setMessage(QString::number(BTSession->getSession()->upload_rate_limit()));
write();
}
if(command == "getGlobalDlLimit") {
generator.setStatusLine(200, "OK");
generator.setContentTypeByExt("html");
generator.setMessage(QString::number(BTSession->getSession()->download_rate_limit()));
write();
}
if(command == "getTorrentUpLimit") {
QString hash = parser.post("hash");
QTorrentHandle h = BTSession->getTorrentHandle(hash);

View File

@@ -33,95 +33,103 @@
#include "httpconnection.h"
#include "eventmanager.h"
#include "bittorrent.h"
#include "preferences.h"
#include <QTimer>
#include <QCryptographicHash>
HttpServer::HttpServer(Bittorrent *_BTSession, int msec, QObject* parent) : QTcpServer(parent)
{
base64 = QByteArray(":").toBase64();
connect(this, SIGNAL(newConnection()), this, SLOT(newHttpConnection()));
BTSession = _BTSession;
manager = new EventManager(this, BTSession);
//add torrents
std::vector<torrent_handle> torrents = BTSession->getTorrents();
std::vector<torrent_handle>::iterator torrentIT;
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(h.is_valid())
manager->addedTorrent(h);
}
//connect BTSession to manager
connect(BTSession, SIGNAL(addedTorrent(QTorrentHandle&)), manager, SLOT(addedTorrent(QTorrentHandle&)));
connect(BTSession, SIGNAL(deletedTorrent(QString)), manager, SLOT(deletedTorrent(QString)));
//set timer
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(onTimer()));
timer->start(msec);
// Additional translations for Web UI
QString a = tr("File");
a = tr("Edit");
a = tr("Help");
a = tr("Delete from HD");
a = tr("Download Torrents from their URL or Magnet link");
a = tr("Only one link per line");
a = tr("Download local torrent");
a = tr("Torrent files were correctly added to download list.");
a = tr("Point to torrent file");
a = tr("Download");
a = tr("Are you sure you want to delete the selected torrents from the transfer list and hard disk?");
a = tr("Download rate limit must be greater than 0 or disabled.");
a = tr("Upload rate limit must be greater than 0 or disabled.");
a = tr("Maximum number of connections limit must be greater than 0 or disabled.");
a = tr("Maximum number of connections per torrent limit must be greater than 0 or disabled.");
a = tr("Maximum number of upload slots per torrent limit must be greater than 0 or disabled.");
a = tr("Unable to save program preferences, qBittorrent is probably unreachable.");
HttpServer::HttpServer(Bittorrent *_BTSession, int msec, QObject* parent) : QTcpServer(parent) {
username = Preferences::getWebUiUsername().toLocal8Bit();
password_md5 = Preferences::getWebUiPassword().toLocal8Bit();
connect(this, SIGNAL(newConnection()), this, SLOT(newHttpConnection()));
BTSession = _BTSession;
manager = new EventManager(this, BTSession);
//add torrents
std::vector<torrent_handle> torrents = BTSession->getTorrents();
std::vector<torrent_handle>::iterator torrentIT;
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(h.is_valid())
manager->addedTorrent(h);
}
//connect BTSession to manager
connect(BTSession, SIGNAL(addedTorrent(QTorrentHandle&)), manager, SLOT(addedTorrent(QTorrentHandle&)));
connect(BTSession, SIGNAL(deletedTorrent(QString)), manager, SLOT(deletedTorrent(QString)));
//set timer
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(onTimer()));
timer->start(msec);
// Additional translations for Web UI
QString a = tr("File");
a = tr("Edit");
a = tr("Help");
a = tr("Delete from HD");
a = tr("Download Torrents from their URL or Magnet link");
a = tr("Only one link per line");
a = tr("Download local torrent");
a = tr("Torrent files were correctly added to download list.");
a = tr("Point to torrent file");
a = tr("Download");
a = tr("Are you sure you want to delete the selected torrents from the transfer list and hard disk?");
a = tr("Download rate limit must be greater than 0 or disabled.");
a = tr("Upload rate limit must be greater than 0 or disabled.");
a = tr("Maximum number of connections limit must be greater than 0 or disabled.");
a = tr("Maximum number of connections per torrent limit must be greater than 0 or disabled.");
a = tr("Maximum number of upload slots per torrent limit must be greater than 0 or disabled.");
a = tr("Unable to save program preferences, qBittorrent is probably unreachable.");
}
HttpServer::~HttpServer()
{
delete timer;
delete manager;
delete timer;
delete manager;
}
void HttpServer::newHttpConnection()
{
QTcpSocket *socket;
while((socket = nextPendingConnection()))
{
HttpConnection *connection = new HttpConnection(socket, BTSession, this);
//connect connection to BTSession
connect(connection, SIGNAL(UrlReadyToBeDownloaded(QString)), BTSession, SLOT(downloadUrlAndSkipDialog(QString)));
connect(connection, SIGNAL(MagnetReadyToBeDownloaded(QString)), BTSession, SLOT(addMagnetSkipAddDlg(QString)));
connect(connection, SIGNAL(torrentReadyToBeDownloaded(QString, bool, QString, bool)), BTSession, SLOT(addTorrent(QString, bool, QString, bool)));
connect(connection, SIGNAL(deleteTorrent(QString, bool)), BTSession, SLOT(deleteTorrent(QString, bool)));
connect(connection, SIGNAL(pauseTorrent(QString)), BTSession, SLOT(pauseTorrent(QString)));
connect(connection, SIGNAL(resumeTorrent(QString)), BTSession, SLOT(resumeTorrent(QString)));
connect(connection, SIGNAL(pauseAllTorrents()), BTSession, SLOT(pauseAllTorrents()));
connect(connection, SIGNAL(resumeAllTorrents()), BTSession, SLOT(resumeAllTorrents()));
}
QTcpSocket *socket;
while((socket = nextPendingConnection()))
{
HttpConnection *connection = new HttpConnection(socket, BTSession, this);
//connect connection to BTSession
connect(connection, SIGNAL(UrlReadyToBeDownloaded(QString)), BTSession, SLOT(downloadUrlAndSkipDialog(QString)));
connect(connection, SIGNAL(MagnetReadyToBeDownloaded(QString)), BTSession, SLOT(addMagnetSkipAddDlg(QString)));
connect(connection, SIGNAL(torrentReadyToBeDownloaded(QString, bool, QString, bool)), BTSession, SLOT(addTorrent(QString, bool, QString, bool)));
connect(connection, SIGNAL(deleteTorrent(QString, bool)), BTSession, SLOT(deleteTorrent(QString, bool)));
connect(connection, SIGNAL(pauseTorrent(QString)), BTSession, SLOT(pauseTorrent(QString)));
connect(connection, SIGNAL(resumeTorrent(QString)), BTSession, SLOT(resumeTorrent(QString)));
connect(connection, SIGNAL(pauseAllTorrents()), BTSession, SLOT(pauseAllTorrents()));
connect(connection, SIGNAL(resumeAllTorrents()), BTSession, SLOT(resumeAllTorrents()));
}
}
void HttpServer::onTimer() {
std::vector<torrent_handle> torrents = BTSession->getTorrents();
std::vector<torrent_handle>::iterator torrentIT;
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(h.is_valid())
manager->modifiedTorrent(h);
}
std::vector<torrent_handle> torrents = BTSession->getTorrents();
std::vector<torrent_handle>::iterator torrentIT;
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(h.is_valid())
manager->modifiedTorrent(h);
}
}
void HttpServer::setAuthorization(QString username, QString password)
{
QString cat = username + ":" + password;
base64 = QByteArray(cat.toLocal8Bit()).toBase64();
void HttpServer::setAuthorization(QString _username, QString _password_md5) {
username = _username.toLocal8Bit();
password_md5 = _password_md5.toLocal8Bit();
}
bool HttpServer::isAuthorized(QByteArray auth) const
{
return (auth == base64);
bool HttpServer::isAuthorized(QByteArray auth) const {
// Decode Auth
QByteArray decoded = QByteArray::fromBase64(auth);
QList<QByteArray> creds = decoded.split(':');
if(creds.size() != 2) return false;
QByteArray prop_username = creds.first();
if(prop_username != username) return false;
QCryptographicHash md5(QCryptographicHash::Md5);
md5.addData(creds.last());
return (password_md5 == md5.result().toHex());
}
EventManager* HttpServer::eventManager() const
{
return manager;
return manager;
}

View File

@@ -44,7 +44,8 @@ class HttpServer : public QTcpServer {
Q_OBJECT
private:
QByteArray base64;
QByteArray username;
QByteArray password_md5;
Bittorrent *BTSession;
EventManager *manager;
QTimer *timer;
@@ -52,7 +53,7 @@ class HttpServer : public QTcpServer {
public:
HttpServer(Bittorrent *BTSession, int msec, QObject* parent = 0);
~HttpServer();
void setAuthorization(QString username, QString password);
void setAuthorization(QString username, QString password_md5);
bool isAuthorized(QByteArray auth) const;
EventManager *eventManager() const;

View File

@@ -60,6 +60,7 @@
<file>Icons/skin/exit.png</file>
<file>Icons/skin/delete_all.png</file>
<file>Icons/skin/splash.png</file>
<file>Icons/skin/disconnected.png</file>
<file>Icons/skin/decrease.png</file>
<file>Icons/skin/uploading.png</file>
<file>Icons/skin/filterall.png</file>
@@ -144,7 +145,6 @@
<file>Icons/oxygen/encrypted.png</file>
<file>Icons/oxygen/edit_clear.png</file>
<file>Icons/oxygen/download.png</file>
<file>Icons/oxygen/application-x-kgetlist-no.png</file>
<file>Icons/oxygen/gear.png</file>
<file>Icons/oxygen/remove.png</file>
<file>Icons/oxygen/dialog-warning.png</file>
@@ -165,7 +165,6 @@
<file>Icons/oxygen/help-about.png</file>
<file>Icons/oxygen/list-add.png</file>
<file>Icons/oxygen/network-server.png</file>
<file>Icons/oxygen/application-x-kgetlist.png</file>
<file>Icons/oxygen/folder.png</file>
<file>Icons/oxygen/urlseed.png</file>
<file>Icons/oxygen/edit-cut.png</file>

View File

@@ -47,6 +47,7 @@ namespace json {
case QVariant::LongLong:
case QVariant::UInt:
case QVariant::ULongLong:
case QMetaType::Float:
return v.value<QString>();
case QVariant::String:
{

View File

@@ -20,6 +20,7 @@
<file>lang/qbittorrent_pt_BR.qm</file>
<file>lang/qbittorrent_el.qm</file>
<file>lang/qbittorrent_ca.qm</file>
<file>lang/qbittorrent_sr.qm</file>
<file>lang/qbittorrent_hu.qm</file>
<file>lang/qbittorrent_da.qm</file>
<file>lang/qbittorrent_de.qm</file>

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More