1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-16 20:32:23 +02:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Christophe Dumez
882f3dcf0e Fix encoding bug in search engine on Windows
Attempt to address issue #29.
2012-09-15 14:18:35 +03:00
14 changed files with 428 additions and 843 deletions

View File

@@ -1,6 +1,4 @@
* Sun Sep 16 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.3
- BUGFIX: Fix issue with temporary directory not being taken into consideration (closes #94)
- BUGFIX: Address encoding issues when using search engine on Windows (closes #29)
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v3.0.3
- BUGFIX: Bypass cache when uploading a torrent file in Web UI (closes #68)
- BUGFIX: "Completed On" column is not updated until restart (closes #84)
- BUGFIX: Fix possible build error on some systems

View File

@@ -45,7 +45,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.3</string>
<string>3.0.2</string>
<key>CFBundleSignature</key>
<string>qBit</string>
<key>CFBundleExecutable</key>

View File

@@ -82,7 +82,7 @@ class about : public QDialog, private Ui::AboutDlg{
<li><u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net)</li>\
<li><u>Hebrew:</u> David Deutsch (d.deffo@gmail.com)</li>\
<li><u>Hungarian:</u> Majoros Péter (majoros.peterj@gmail.com)</li>\
<li><u>Italian:</u> bovirus (bovirus@live.it) and Matteo Sechi (bu17714@gmail.com)</li>\
<li><u>Italian:</u> Matteo Sechi (bu17714@gmail.com)</li>\
<li><u>Japanese:</u> Masato Hashimoto (cabezon.hashimoto@gmail.com)</li>\
<li><u>Korean:</u> Jin Woo Sin (jin828sin@users.sourceforge.net)</li>\
<li><u>Lithuanian:</u> Naglis Jonaitis (njonaitis@gmail.com)</li>\

File diff suppressed because it is too large Load Diff

View File

@@ -1,41 +1,41 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>lang/qbittorrent_ar.qm</file>
<file>lang/qbittorrent_be.qm</file>
<file>lang/qbittorrent_bg.qm</file>
<file>lang/qbittorrent_ca.qm</file>
<file>lang/qbittorrent_cs.qm</file>
<file>lang/qbittorrent_da.qm</file>
<file>lang/qbittorrent_de.qm</file>
<file>lang/qbittorrent_el.qm</file>
<file>lang/qbittorrent_en.qm</file>
<file>lang/qbittorrent_es.qm</file>
<file>lang/qbittorrent_eu.qm</file>
<file>lang/qbittorrent_fi.qm</file>
<file>lang/qbittorrent_fr.qm</file>
<file>lang/qbittorrent_gl.qm</file>
<file>lang/qbittorrent_he.qm</file>
<file>lang/qbittorrent_hr.qm</file>
<file>lang/qbittorrent_hu.qm</file>
<file>lang/qbittorrent_hy.qm</file>
<file>lang/qbittorrent_it.qm</file>
<file>lang/qbittorrent_ja.qm</file>
<file>lang/qbittorrent_ka.qm</file>
<file>lang/qbittorrent_ko.qm</file>
<file>lang/qbittorrent_lt.qm</file>
<file>lang/qbittorrent_nb.qm</file>
<file>lang/qbittorrent_nl.qm</file>
<file>lang/qbittorrent_pl.qm</file>
<file>lang/qbittorrent_pt.qm</file>
<file>lang/qbittorrent_pt_BR.qm</file>
<file>lang/qbittorrent_ro.qm</file>
<file>lang/qbittorrent_hu.qm</file>
<file>lang/qbittorrent_ru.qm</file>
<file>lang/qbittorrent_sk.qm</file>
<file>lang/qbittorrent_sr.qm</file>
<file>lang/qbittorrent_sv.qm</file>
<file>lang/qbittorrent_zh_TW.qm</file>
<file>lang/qbittorrent_tr.qm</file>
<file>lang/qbittorrent_fi.qm</file>
<file>lang/qbittorrent_sk.qm</file>
<file>lang/qbittorrent_ja.qm</file>
<file>lang/qbittorrent_el.qm</file>
<file>lang/qbittorrent_ca.qm</file>
<file>lang/qbittorrent_pt.qm</file>
<file>lang/qbittorrent_it.qm</file>
<file>lang/qbittorrent_fr.qm</file>
<file>lang/qbittorrent_uk.qm</file>
<file>lang/qbittorrent_zh.qm</file>
<file>lang/qbittorrent_zh_TW.qm</file>
<file>lang/qbittorrent_lt.qm</file>
<file>lang/qbittorrent_ko.qm</file>
<file>lang/qbittorrent_nb.qm</file>
<file>lang/qbittorrent_sv.qm</file>
<file>lang/qbittorrent_de.qm</file>
<file>lang/qbittorrent_gl.qm</file>
<file>lang/qbittorrent_sr.qm</file>
<file>lang/qbittorrent_pt_BR.qm</file>
<file>lang/qbittorrent_da.qm</file>
<file>lang/qbittorrent_cs.qm</file>
<file>lang/qbittorrent_hy.qm</file>
<file>lang/qbittorrent_pl.qm</file>
<file>lang/qbittorrent_bg.qm</file>
<file>lang/qbittorrent_ar.qm</file>
<file>lang/qbittorrent_es.qm</file>
<file>lang/qbittorrent_en.qm</file>
<file>lang/qbittorrent_hr.qm</file>
<file>lang/qbittorrent_ro.qm</file>
<file>lang/qbittorrent_ka.qm</file>
<file>lang/qbittorrent_be.qm</file>
<file>lang/qbittorrent_eu.qm</file>
<file>lang/qbittorrent_he.qm</file>
</qresource>
</RCC>
</RCC>

View File

@@ -1,46 +1,2 @@
IDI_ICON1 ICON DISCARDABLE "qbittorrent.ico"
IDI_ICON2 ICON DISCARDABLE "qbittorrent_file.ico"
#include <windows.h>
#define VER_FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_BUGFIX,0
#define VER_FILEVERSION_STR VERSION
#define VER_PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_BUGFIX,0
#define VER_PRODUCTVERSION_STR VERSION
#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif
1 VERSIONINFO
FILEVERSION VER_FILEVERSION
PRODUCTVERSION VER_PRODUCTVERSION
FILEFLAGSMASK VER_DEBUG
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Christophe Dumez"
VALUE "FileDescription", "qBittorrent - A Bittorrent Client"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "qbittorrent"
VALUE "LegalCopyright", "Copyright ©2006-2012 Christophe Dumez"
VALUE "OriginalFilename", "qbittorrent.exe"
VALUE "ProductName", "qBittorrent"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@@ -930,7 +930,7 @@ QTorrentHandle QBtSession::addMagnetUri(QString magnet_uri, bool resumed, bool f
}
if (savePath.isEmpty())
savePath = getSavePath(hash, false);
if (!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && !resumed) {
if (!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && resumed) {
qDebug("addMagnetURI: Temp folder is enabled.");
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
p.save_path = torrent_tmp_path.toUtf8().constData();
@@ -1119,7 +1119,7 @@ QTorrentHandle QBtSession::addTorrent(QString path, bool fromScanDir, QString fr
} else {
savePath = getSavePath(hash, fromScanDir, path);
}
if (!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && !resumed) {
if (!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && resumed) {
qDebug("addTorrent::Temp folder is enabled.");
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
p.save_path = torrent_tmp_path.toUtf8().constData();

File diff suppressed because it is too large Load Diff

View File

@@ -26,7 +26,7 @@
# POSSIBILITY OF SUCH DAMAGE.
#VERSION: 1.31
#VERSION: 1.30
# Author:
# Fabien Devaux <fab AT gnux DOT info>
@@ -42,7 +42,9 @@ import threading
import os
import glob
import fix_encoding
if os.name == 'nt':
from ctypes import WINFUNCTYPE, windll, POINTER, byref, c_int
from ctypes.wintypes import LPWSTR, LPCWSTR
THREADED = True
CATEGORIES = ('all', 'movies', 'tv', 'music', 'games', 'anime', 'software', 'pictures', 'books')
@@ -113,9 +115,6 @@ class EngineLauncher(threading.Thread):
self.engine.search(self.what)
if __name__ == '__main__':
# Make sure we enforce utf-8 encoding
fix_encoding.fix_encoding()
if len(sys.argv) < 2:
raise SystemExit('./nova2.py [all|engine1[,engine2]*] <category> <keywords>\navailable engines: %s'%
(','.join(supported_engines)))
@@ -137,8 +136,18 @@ if __name__ == '__main__':
if cat not in CATEGORIES:
raise SystemExit('Invalid category!')
what = '+'.join(sys.argv[3:])
search_tokens = sys.argv[3:]
if os.name == 'nt':
# We need this trick on Windows to get UTF-8 encoded arguments
GetCommandLineW = WINFUNCTYPE(LPWSTR)(("GetCommandLineW", windll.kernel32))
CommandLineToArgvW = WINFUNCTYPE(POINTER(LPWSTR), LPCWSTR, POINTER(c_int)) (("CommandLineToArgvW", windll.shell32))
argc = c_int(0)
argv_unicode = CommandLineToArgvW(GetCommandLineW(), byref(argc))
argv = [argv_unicode[i].encode('utf-8') for i in range(0, argc.value)]
search_tokens = argv[3:]
what = '+'.join(search_tokens)
threads = []
for engine in engines_list:

View File

@@ -1,56 +1,55 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>nova/fix_encoding.py</file>
<file>nova/helpers.py</file>
<file>nova/nova2.py</file>
<file>nova/nova2dl.py</file>
<file>nova/novaprinter.py</file>
<file>nova/socks.py</file>
<file>nova/engines/btdigg.png</file>
<file>nova/engines/btdigg.py</file>
<file>nova/engines/btjunkie.png</file>
<file>nova/engines/btjunkie.py</file>
<file>nova/engines/extratorrent.png</file>
<file>nova/engines/extratorrent.py</file>
<file>nova/engines/isohunt.png</file>
<file>nova/engines/isohunt.py</file>
<file>nova/nova2dl.py</file>
<file>nova/helpers.py</file>
<file>nova/engines/vertor.png</file>
<file>nova/engines/kickasstorrents.png</file>
<file>nova/engines/kickasstorrents.py</file>
<file>nova/engines/mininova.png</file>
<file>nova/engines/mininova.py</file>
<file>nova/engines/piratebay.png</file>
<file>nova/engines/piratebay.py</file>
<file>nova/engines/torrentdownloads.png</file>
<file>nova/engines/isohunt.png</file>
<file>nova/engines/torrentreactor.py</file>
<file>nova/engines/btjunkie.png</file>
<file>nova/engines/extratorrent.py</file>
<file>nova/engines/piratebay.py</file>
<file>nova/engines/torrentdownloads.py</file>
<file>nova/engines/torrentreactor.png</file>
<file>nova/engines/torrentreactor.py</file>
<file>nova/engines/vertor.png</file>
<file>nova/engines/isohunt.py</file>
<file>nova/engines/btdigg.py</file>
<file>nova/engines/btjunkie.py</file>
<file>nova/engines/kickasstorrents.py</file>
<file>nova/engines/extratorrent.png</file>
<file>nova/engines/piratebay.png</file>
<file>nova/engines/vertor.py</file>
<file>nova3/helpers.py</file>
<file>nova3/nova2.py</file>
<file>nova3/nova2dl.py</file>
<file>nova3/novaprinter.py</file>
<file>nova/engines/btdigg.png</file>
<file>nova3/sgmllib3.py</file>
<file>nova3/nova2.py</file>
<file>nova3/novaprinter.py</file>
<file>nova3/socks.py</file>
<file>nova3/engines/btdigg.png</file>
<file>nova3/engines/btdigg.py</file>
<file>nova3/engines/btjunkie.png</file>
<file>nova3/engines/btjunkie.py</file>
<file>nova3/engines/extratorrent.png</file>
<file>nova3/engines/extratorrent.py</file>
<file>nova3/engines/isohunt.png</file>
<file>nova3/engines/isohunt.py</file>
<file>nova3/nova2dl.py</file>
<file>nova3/helpers.py</file>
<file>nova3/engines/vertor.png</file>
<file>nova3/engines/kickasstorrents.png</file>
<file>nova3/engines/kickasstorrents.py</file>
<file>nova3/engines/mininova.png</file>
<file>nova3/engines/mininova.py</file>
<file>nova3/engines/piratebay.png</file>
<file>nova3/engines/piratebay.py</file>
<file>nova3/engines/torrentdownloads.png</file>
<file>nova3/engines/isohunt.png</file>
<file>nova3/engines/torrentreactor.py</file>
<file>nova3/engines/btjunkie.png</file>
<file>nova3/engines/extratorrent.py</file>
<file>nova3/engines/piratebay.py</file>
<file>nova3/engines/torrentdownloads.py</file>
<file>nova3/engines/torrentreactor.png</file>
<file>nova3/engines/torrentreactor.py</file>
<file>nova3/engines/vertor.png</file>
<file>nova3/engines/isohunt.py</file>
<file>nova3/engines/btdigg.py</file>
<file>nova3/engines/btjunkie.py</file>
<file>nova3/engines/kickasstorrents.py</file>
<file>nova3/engines/extratorrent.png</file>
<file>nova3/engines/piratebay.png</file>
<file>nova3/engines/vertor.py</file>
<file>nova3/engines/btdigg.png</file>
</qresource>
</RCC>

View File

@@ -443,12 +443,6 @@ void SearchEngine::updateNova() {
removePythonScriptIfExists(filePath);
QFile::copy(":/"+nova_folder+"/socks.py", filePath);
if (nova_folder == "nova") {
filePath = search_dir.absoluteFilePath("fix_encoding.py");
removePythonScriptIfExists(filePath);
QFile::copy(":/"+nova_folder+"/fix_encoding.py", filePath);
}
if (nova_folder == "nova3") {
filePath = search_dir.absoluteFilePath("sgmllib3.py");
removePythonScriptIfExists(filePath);

View File

@@ -1,5 +1,5 @@
PROJECT_NAME = qbittorrent
PROJECT_VERSION = 3.0.3
PROJECT_VERSION = 3.0.2
os2 {
DEFINES += VERSION=\'\"v$${PROJECT_VERSION}\"\'
@@ -9,4 +9,4 @@ os2 {
DEFINES += VERSION_MAJOR=3
DEFINES += VERSION_MINOR=0
DEFINES += VERSION_BUGFIX=3
DEFINES += VERSION_BUGFIX=2

View File

@@ -13,5 +13,5 @@ CONFIG(debug, debug|release) {
}
LIBS += advapi32.lib shell32.lib crypt32.lib
LIBS += libeay32.lib ssleay32.lib
LIBS += libeay32MD.lib ssleay32MD.lib
LIBS += PowrProf.lib

View File

@@ -2,7 +2,7 @@
#Point this to the boost include folder
INCLUDEPATH += $$quote(C:/qBittorrent/boost_1_51_0)
#Point this to the libtorrent include folder
#Point this to the libtorrent include folser
INCLUDEPATH += $$quote(C:/qBittorrent/RC_0_16/include)
#Point this to the boost lib folder