You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-11-09 10:02:39 +01:00
Compare commits
56 Commits
release-4.
...
release-4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
927732f190 | ||
|
|
88c991880f | ||
|
|
29290fa109 | ||
|
|
0a8d604ef3 | ||
|
|
532c985b50 | ||
|
|
a32182f794 | ||
|
|
1aebcd3258 | ||
|
|
9f743aab86 | ||
|
|
ece839739e | ||
|
|
2204757eca | ||
|
|
bfda520ef4 | ||
|
|
af91f4ed51 | ||
|
|
41c3a8af01 | ||
|
|
cc7f8372a8 | ||
|
|
d20633f9cc | ||
|
|
961e05e9a8 | ||
|
|
eb98a04245 | ||
|
|
5dc1c10848 | ||
|
|
dcbff74dc0 | ||
|
|
5e29960da2 | ||
|
|
aa43fc8ff4 | ||
|
|
2517e688d9 | ||
|
|
40d94fd8e9 | ||
|
|
eb97e640cb | ||
|
|
2123c1c259 | ||
|
|
6cf1351a77 | ||
|
|
c924904308 | ||
|
|
904bcc14d5 | ||
|
|
c3abe4c2a6 | ||
|
|
7144454a1f | ||
|
|
daaa88fa0d | ||
|
|
0b7c8497f9 | ||
|
|
e3562be0d6 | ||
|
|
e0d0efcc20 | ||
|
|
fb22b58ce6 | ||
|
|
c78ac614f5 | ||
|
|
de15907ea7 | ||
|
|
a4289a517f | ||
|
|
967c3bb55d | ||
|
|
c57896df8f | ||
|
|
911f0d4039 | ||
|
|
e822d4fca7 | ||
|
|
0da132b69e | ||
|
|
691cb4fe2b | ||
|
|
97a053916b | ||
|
|
24bf8eef6d | ||
|
|
4314bbdf9c | ||
|
|
65611cd3dc | ||
|
|
6a4bb1356a | ||
|
|
06593e3678 | ||
|
|
18577d9cb0 | ||
|
|
701b84dc48 | ||
|
|
9a95237b85 | ||
|
|
a6a99fbd36 | ||
|
|
86671bee46 | ||
|
|
f1432a2e3d |
2
.github/workflows/ci_macos.yaml
vendored
2
.github/workflows/ci_macos.yaml
vendored
@@ -46,7 +46,7 @@ jobs:
|
|||||||
curl \
|
curl \
|
||||||
-L \
|
-L \
|
||||||
-o "${{ runner.temp }}/boost.tar.bz2" \
|
-o "${{ runner.temp }}/boost.tar.bz2" \
|
||||||
"https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2"
|
"https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2"
|
||||||
tar -xf "${{ runner.temp }}/boost.tar.bz2" -C "${{ github.workspace }}/.."
|
tar -xf "${{ runner.temp }}/boost.tar.bz2" -C "${{ github.workspace }}/.."
|
||||||
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
|
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
|
||||||
|
|
||||||
|
|||||||
33
.github/workflows/ci_ubuntu.yaml
vendored
33
.github/workflows/ci_ubuntu.yaml
vendored
@@ -78,7 +78,7 @@ jobs:
|
|||||||
cmake --build build --target qbt_update_translations
|
cmake --build build --target qbt_update_translations
|
||||||
cmake --build build
|
cmake --build build
|
||||||
cmake --build build --target check
|
cmake --build build --target check
|
||||||
DESTDIR="qbittorrent" cmake --install build
|
DESTDIR="qbittorrent" cmake --install build --strip
|
||||||
|
|
||||||
- name: Build qBittorrent (Qt6)
|
- name: Build qBittorrent (Qt6)
|
||||||
if: ${{ startsWith(matrix.qt_version, 6) }}
|
if: ${{ startsWith(matrix.qt_version, 6) }}
|
||||||
@@ -97,7 +97,7 @@ jobs:
|
|||||||
cmake --build build --target qbt_update_translations
|
cmake --build build --target qbt_update_translations
|
||||||
cmake --build build
|
cmake --build build
|
||||||
cmake --build build --target check
|
cmake --build build --target check
|
||||||
DESTDIR="qbittorrent" cmake --install build
|
DESTDIR="qbittorrent" cmake --install build --strip
|
||||||
|
|
||||||
- name: Prepare build artifacts
|
- name: Prepare build artifacts
|
||||||
run: |
|
run: |
|
||||||
@@ -107,8 +107,35 @@ jobs:
|
|||||||
mkdir upload/cmake/libtorrent
|
mkdir upload/cmake/libtorrent
|
||||||
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
|
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
|
||||||
|
|
||||||
|
- name: 'AppImage: Prepare env'
|
||||||
|
run: |
|
||||||
|
sudo apt install libfuse2
|
||||||
|
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||||
|
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||||
|
wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
|
||||||
|
chmod +x linuxdeploy-x86_64.AppImage
|
||||||
|
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
|
||||||
|
chmod +x linuxdeploy-plugin-appimage-x86_64.AppImage
|
||||||
|
|
||||||
|
- name: 'AppImage: Prepare nox'
|
||||||
|
if: matrix.qbt_gui == 'GUI=OFF'
|
||||||
|
run: |
|
||||||
|
mkdir -p qbittorrent/usr/share/icons/hicolor/scalable/apps/
|
||||||
|
mkdir -p qbittorrent/usr/share/applications/
|
||||||
|
cp dist/unix/menuicons/scalable/apps/qbittorrent.svg qbittorrent/usr/share/icons/hicolor/scalable/apps/qbittorrent.svg
|
||||||
|
cp .github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop qbittorrent/usr/share/applications/org.qbittorrent.qBittorrent.desktop
|
||||||
|
|
||||||
|
- name: 'AppImage: Package'
|
||||||
|
run: |
|
||||||
|
./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --plugin qt
|
||||||
|
rm qbittorrent/apprun-hooks/*
|
||||||
|
cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh
|
||||||
|
NO_APPSTREAM=1 \
|
||||||
|
OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
|
||||||
|
./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --output appimage
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-info_ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
|
name: qBittorrent-CI_Ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
|
||||||
path: upload
|
path: upload
|
||||||
|
|||||||
2
.github/workflows/ci_windows.yaml
vendored
2
.github/workflows/ci_windows.yaml
vendored
@@ -67,7 +67,7 @@ jobs:
|
|||||||
- name: Install boost
|
- name: Install boost
|
||||||
run: |
|
run: |
|
||||||
aria2c `
|
aria2c `
|
||||||
"https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.7z" `
|
"https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.7z" `
|
||||||
-d "${{ runner.temp }}" `
|
-d "${{ runner.temp }}" `
|
||||||
-o "boost.7z"
|
-o "boost.7z"
|
||||||
7z x "${{ runner.temp }}/boost.7z" -o"${{ github.workspace }}/.."
|
7z x "${{ runner.temp }}/boost.7z" -o"${{ github.workspace }}/.."
|
||||||
|
|||||||
11
.github/workflows/helper/appimage/export_vars.sh
vendored
Normal file
11
.github/workflows/helper/appimage/export_vars.sh
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# this file is called from AppRun so 'root_dir' will point to where AppRun is
|
||||||
|
root_dir="$(readlink -f "$(dirname "$0")")"
|
||||||
|
|
||||||
|
# Insert the default values because after the test we prepend our path
|
||||||
|
# and it will create problems with DEs (eg KDE) that don't set the variable
|
||||||
|
# and rely on the default paths
|
||||||
|
if [[ -z ${XDG_DATA_DIRS} ]]; then
|
||||||
|
XDG_DATA_DIRS="/usr/local/share/:/usr/share/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export XDG_DATA_DIRS="${root_dir}/usr/share:${XDG_DATA_DIRS}"
|
||||||
6
.github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop
vendored
Normal file
6
.github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=qBittorrent
|
||||||
|
Exec=qbittorrent-nox %U
|
||||||
|
Icon=qbittorrent
|
||||||
|
Type=Application
|
||||||
|
Categories=Network
|
||||||
31
Changelog
31
Changelog
@@ -1,3 +1,34 @@
|
|||||||
|
Sun Feb 12 2023 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.5.1
|
||||||
|
- FEATURE: Re-allow to use icons from system theme (glassez)
|
||||||
|
- BUGFIX: Fix Speed limit icon size (Nowshed H. Imran)
|
||||||
|
- BUGFIX: Revise and fix some text colors (Chocobo1, Nowshed H. Imran)
|
||||||
|
- BUGFIX: Correctly load folder based UI theme (glassez)
|
||||||
|
- BUGFIX: Fix crash due to invalid encoding of tracker URLs (glassez)
|
||||||
|
- BUGFIX: Don't drop !qB extension when renaming incomplete file (glassez)
|
||||||
|
- BUGFIX: Correctly count the number of torrents in subcategories (glassez)
|
||||||
|
- BUGFIX: Use "additional trackers" when metadata retrieving (glassez)
|
||||||
|
- BUGFIX: Apply correct tab order to Category options dialog (glassez)
|
||||||
|
- BUGFIX: Add all torrents passed via the command line (glassez)
|
||||||
|
- BUGFIX: Fix startup performance on Qt5 (glassez)
|
||||||
|
- BUGFIX: Automatic move will now overwrite existing files (aka previous behavior) (glassez)
|
||||||
|
- BUGFIX: Some fixes for loading Chinese locales (sledgehammer999)
|
||||||
|
- BUGFIX: New Pause icon color for toolbar/menu (Nowshed H. Imran, sledgehammer999)
|
||||||
|
- BUGFIX: Adjust env variable for PDB discovery (sledgehammer999)
|
||||||
|
- WEBUI: Fix missing "queued" icon (thalieht)
|
||||||
|
- WEBUI: Return paths using platform-independent separator format (glassez)
|
||||||
|
- WEBUI: Change order of accepted types of file input (Jason Carr)
|
||||||
|
- WEBUI: Add missing icons (brvphoenix)
|
||||||
|
- WEBUI: Add "Resume data storage type" option (thalieht)
|
||||||
|
- WEBUI: Make rename file dialog resizable (Torsten Schwarz)
|
||||||
|
- WEBUI: Prevent incorrect line breaking (David Xuang)
|
||||||
|
- WEBUI: Improve hotkeys (Fidel Selva)
|
||||||
|
- WEBUI: Remove suggestions while searching for torrents (Midhun V Nadh)
|
||||||
|
- WEBUI: Expose "IS PRIVATE" flag (sotiris-bos)
|
||||||
|
- WEBUI: Return name/hash/infohash_v1/infohash_v2 torrent properties (qbittorrentfan)
|
||||||
|
- WINDOWS: Correctly detect drive letter in path (glassez)
|
||||||
|
- WINDOWS: NSIS: Update Swedish, Lithuanian translations (Jonatan, Deividas)
|
||||||
|
- LINUX: Fix tray icon issues (glassez)
|
||||||
|
|
||||||
Sat Nov 26 2022 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.5.0
|
Sat Nov 26 2022 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.5.0
|
||||||
- FEATURE: Add `Auto resize columns` functionality (Chocobo1)
|
- FEATURE: Add `Auto resize columns` functionality (Chocobo1)
|
||||||
- FEATURE: Allow to use Category paths in `Manual` mode (glassez)
|
- FEATURE: Allow to use Category paths in `Manual` mode (glassez)
|
||||||
|
|||||||
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.71 for qbittorrent v4.5.0.
|
# Generated by GNU Autoconf 2.71 for qbittorrent v4.5.1.
|
||||||
#
|
#
|
||||||
# Report bugs to <bugs.qbittorrent.org>.
|
# Report bugs to <bugs.qbittorrent.org>.
|
||||||
#
|
#
|
||||||
@@ -611,8 +611,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='qbittorrent'
|
PACKAGE_NAME='qbittorrent'
|
||||||
PACKAGE_TARNAME='qbittorrent'
|
PACKAGE_TARNAME='qbittorrent'
|
||||||
PACKAGE_VERSION='v4.5.0'
|
PACKAGE_VERSION='v4.5.1'
|
||||||
PACKAGE_STRING='qbittorrent v4.5.0'
|
PACKAGE_STRING='qbittorrent v4.5.1'
|
||||||
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
|
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
|
||||||
PACKAGE_URL='https://www.qbittorrent.org/'
|
PACKAGE_URL='https://www.qbittorrent.org/'
|
||||||
|
|
||||||
@@ -1329,7 +1329,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures qbittorrent v4.5.0 to adapt to many kinds of systems.
|
\`configure' configures qbittorrent v4.5.1 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1400,7 +1400,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of qbittorrent v4.5.0:";;
|
short | recursive ) echo "Configuration of qbittorrent v4.5.1:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1533,7 +1533,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
qbittorrent configure v4.5.0
|
qbittorrent configure v4.5.1
|
||||||
generated by GNU Autoconf 2.71
|
generated by GNU Autoconf 2.71
|
||||||
|
|
||||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||||
@@ -1648,7 +1648,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by qbittorrent $as_me v4.5.0, which was
|
It was created by qbittorrent $as_me v4.5.1, which was
|
||||||
generated by GNU Autoconf 2.71. Invocation command line was
|
generated by GNU Autoconf 2.71. Invocation command line was
|
||||||
|
|
||||||
$ $0$ac_configure_args_raw
|
$ $0$ac_configure_args_raw
|
||||||
@@ -4779,7 +4779,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='qbittorrent'
|
PACKAGE='qbittorrent'
|
||||||
VERSION='v4.5.0'
|
VERSION='v4.5.1'
|
||||||
|
|
||||||
|
|
||||||
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
|
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
|
||||||
@@ -7237,7 +7237,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by qbittorrent $as_me v4.5.0, which was
|
This file was extended by qbittorrent $as_me v4.5.1, which was
|
||||||
generated by GNU Autoconf 2.71. Invocation command line was
|
generated by GNU Autoconf 2.71. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -7297,7 +7297,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config='$ac_cs_config_escaped'
|
ac_cs_config='$ac_cs_config_escaped'
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
qbittorrent config.status v4.5.0
|
qbittorrent config.status v4.5.1
|
||||||
configured by $0, generated by GNU Autoconf 2.71,
|
configured by $0, generated by GNU Autoconf 2.71,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([qbittorrent], [v4.5.0], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
AC_INIT([qbittorrent], [v4.5.1], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
: ${CFLAGS=""}
|
: ${CFLAGS=""}
|
||||||
|
|||||||
8
dist/docker/.env
vendored
8
dist/docker/.env
vendored
@@ -1,8 +0,0 @@
|
|||||||
# refer to Readme.md for an explanation of the variables
|
|
||||||
|
|
||||||
QBT_EULA=
|
|
||||||
QBT_VERSION=devel
|
|
||||||
QBT_WEBUI_PORT=8080
|
|
||||||
|
|
||||||
QBT_CONFIG_PATH=<your_path>/config
|
|
||||||
QBT_DOWNLOADS_PATH=<your_path>/downloads
|
|
||||||
62
dist/docker/Dockerfile
vendored
62
dist/docker/Dockerfile
vendored
@@ -1,62 +0,0 @@
|
|||||||
# image for building
|
|
||||||
FROM alpine:latest AS builder
|
|
||||||
|
|
||||||
ARG QBT_VERSION
|
|
||||||
|
|
||||||
# alpine linux qbittorrent package: https://git.alpinelinux.org/aports/tree/community/qbittorrent/APKBUILD
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
apk --update-cache add \
|
|
||||||
boost-dev \
|
|
||||||
cmake \
|
|
||||||
g++ \
|
|
||||||
libtorrent-rasterbar-dev \
|
|
||||||
ninja \
|
|
||||||
qt6-qtbase-dev \
|
|
||||||
qt6-qttools-dev
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
if [ "$QBT_VERSION" = "devel" ]; then \
|
|
||||||
wget https://github.com/qbittorrent/qBittorrent/archive/refs/heads/master.zip && \
|
|
||||||
unzip master.zip && \
|
|
||||||
cd qBittorrent-master ; \
|
|
||||||
else \
|
|
||||||
wget "https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-${QBT_VERSION}.tar.gz" && \
|
|
||||||
tar -xf "release-${QBT_VERSION}.tar.gz" && \
|
|
||||||
cd "qBittorrent-release-${QBT_VERSION}" ; \
|
|
||||||
fi && \
|
|
||||||
cmake \
|
|
||||||
-B build \
|
|
||||||
-G Ninja \
|
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
||||||
-DGUI=OFF \
|
|
||||||
-DQT6=ON \
|
|
||||||
-DSTACKTRACE=OFF && \
|
|
||||||
cmake --build build && \
|
|
||||||
cmake --install build
|
|
||||||
|
|
||||||
# image for running
|
|
||||||
FROM alpine:latest
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
apk --no-cache add \
|
|
||||||
doas \
|
|
||||||
libtorrent-rasterbar \
|
|
||||||
python3 \
|
|
||||||
qt6-qtbase \
|
|
||||||
tini
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
adduser \
|
|
||||||
-D \
|
|
||||||
-H \
|
|
||||||
-s /sbin/nologin \
|
|
||||||
-u 1000 \
|
|
||||||
qbtUser && \
|
|
||||||
echo "permit nopass :root" >> "/etc/doas.d/doas.conf"
|
|
||||||
|
|
||||||
COPY --from=builder /usr/local/bin/qbittorrent-nox /usr/bin/qbittorrent-nox
|
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
|
||||||
|
|
||||||
ENTRYPOINT ["/sbin/tini", "-g", "--", "/entrypoint.sh"]
|
|
||||||
101
dist/docker/Readme.md
vendored
101
dist/docker/Readme.md
vendored
@@ -1,101 +0,0 @@
|
|||||||
# qBittorrent-nox Docker Image
|
|
||||||
|
|
||||||
This Dockerfile allows you to build a Docker Image containing qBittorrent-nox
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
In order to build/run this image you'll need Docker installed: https://docs.docker.com/get-docker/
|
|
||||||
|
|
||||||
If you don't need the GUI, you can just install Docker Engine: https://docs.docker.com/engine/install/
|
|
||||||
|
|
||||||
It is also recommended to install Docker Compose as it can significantly ease the process: https://docs.docker.com/compose/install/
|
|
||||||
|
|
||||||
## Building Docker Image
|
|
||||||
|
|
||||||
* If you are using Docker (not Docker Compose) then run the following commands in this folder:
|
|
||||||
```shell
|
|
||||||
export \
|
|
||||||
QBT_VERSION=devel
|
|
||||||
docker build \
|
|
||||||
--build-arg QBT_VERSION \
|
|
||||||
-t qbittorrent-nox:"$QBT_VERSION" \
|
|
||||||
.
|
|
||||||
```
|
|
||||||
|
|
||||||
* If you are using Docker Compose then you should edit `.env` file first.
|
|
||||||
You can find an explanation of the variables in the following [Parameters](#parameters) section. \
|
|
||||||
Then run the following commands in this folder:
|
|
||||||
```shell
|
|
||||||
docker compose build \
|
|
||||||
--build-arg QBT_VERSION
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
#### Environment variables
|
|
||||||
|
|
||||||
* `QBT_EULA` \
|
|
||||||
This environment variable defines whether you accept the end-user license agreement (EULA) of qBittorrent. \
|
|
||||||
**Put `accept` only if you understand and accepted the EULA.** You can find
|
|
||||||
the EULA [here](https://github.com/qbittorrent/qBittorrent/blob/56667e717b82c79433ecb8a5ff6cc2d7b315d773/src/app/main.cpp#L320-L323).
|
|
||||||
* `QBT_VERSION` \
|
|
||||||
This environment variable specifies the version of qBittorrent-nox to be built. \
|
|
||||||
For example, `4.4.0` is a valid entry. You can find all tagged versions [here](https://github.com/qbittorrent/qBittorrent/tags). \
|
|
||||||
Or you can put `devel` to build the latest development version.
|
|
||||||
* `QBT_WEBUI_PORT` \
|
|
||||||
This environment variable sets the port number which qBittorrent WebUI will be binded to.
|
|
||||||
|
|
||||||
#### Volumes
|
|
||||||
|
|
||||||
There are some paths involved:
|
|
||||||
* `<your_path>/config` \
|
|
||||||
Full path to a folder on your host machine which will store qBittorrent configurations.
|
|
||||||
Using relative path won't work.
|
|
||||||
* `<your_path>/downloads` \
|
|
||||||
Full path to a folder on your host machine which will store the files downloaded by qBittorrent.
|
|
||||||
Using relative path won't work.
|
|
||||||
|
|
||||||
## Running container
|
|
||||||
|
|
||||||
* Using Docker (not Docker Compose), simply run:
|
|
||||||
```shell
|
|
||||||
export \
|
|
||||||
QBT_EULA=accept \
|
|
||||||
QBT_VERSION=devel \
|
|
||||||
QBT_WEBUI_PORT=8080 \
|
|
||||||
QBT_CONFIG_PATH="/tmp/bbb/config"
|
|
||||||
QBT_DOWNLOADS_PATH="/tmp/bbb/downloads"
|
|
||||||
docker run \
|
|
||||||
-t \
|
|
||||||
--read-only \
|
|
||||||
--rm \
|
|
||||||
--tmpfs /tmp \
|
|
||||||
--name qbittorrent-nox \
|
|
||||||
-e QBT_EULA \
|
|
||||||
-e QBT_WEBUI_PORT \
|
|
||||||
-p "$QBT_WEBUI_PORT":"$QBT_WEBUI_PORT"/tcp \
|
|
||||||
-p 6881:6881/tcp \
|
|
||||||
-p 6881:6881/udp \
|
|
||||||
-v "$QBT_CONFIG_PATH":/config \
|
|
||||||
-v "$QBT_DOWNLOADS_PATH":/downloads \
|
|
||||||
qbittorrent-nox:"$QBT_VERSION"
|
|
||||||
```
|
|
||||||
|
|
||||||
* Using Docker Compose:
|
|
||||||
```shell
|
|
||||||
docker compose up
|
|
||||||
```
|
|
||||||
|
|
||||||
Then you can login at: `http://127.0.0.1:8080`
|
|
||||||
|
|
||||||
## Stopping container
|
|
||||||
|
|
||||||
* Using Docker (not Docker Compose):
|
|
||||||
```shell
|
|
||||||
docker stop -t 1800 qbittorrent-nox
|
|
||||||
```
|
|
||||||
|
|
||||||
* Using Docker Compose:
|
|
||||||
```shell
|
|
||||||
docker compose down
|
|
||||||
```
|
|
||||||
25
dist/docker/docker-compose.yml
vendored
25
dist/docker/docker-compose.yml
vendored
@@ -1,25 +0,0 @@
|
|||||||
version: "3.9"
|
|
||||||
|
|
||||||
services:
|
|
||||||
qbittorrent-nox:
|
|
||||||
build: .
|
|
||||||
container_name: qbittorrent-nox
|
|
||||||
environment:
|
|
||||||
- QBT_EULA=${QBT_EULA}
|
|
||||||
- QBT_VERSION=${QBT_VERSION}
|
|
||||||
- QBT_WEBUI_PORT=${QBT_WEBUI_PORT}
|
|
||||||
image: qbittorrent-nox:${QBT_VERSION}
|
|
||||||
ports:
|
|
||||||
# for bittorrent traffic
|
|
||||||
- 6881:6881/tcp
|
|
||||||
- 6881:6881/udp
|
|
||||||
# for WebUI
|
|
||||||
- ${QBT_WEBUI_PORT}:${QBT_WEBUI_PORT}/tcp
|
|
||||||
read_only: true
|
|
||||||
stop_grace_period: 30m
|
|
||||||
tmpfs:
|
|
||||||
- /tmp
|
|
||||||
tty: true
|
|
||||||
volumes:
|
|
||||||
- ${QBT_CONFIG_PATH}:/config
|
|
||||||
- ${QBT_DOWNLOADS_PATH}:/downloads
|
|
||||||
35
dist/docker/entrypoint.sh
vendored
35
dist/docker/entrypoint.sh
vendored
@@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
downloadsPath="/downloads"
|
|
||||||
profilePath="/config"
|
|
||||||
qbtConfigFile="$profilePath/qBittorrent/config/qBittorrent.conf"
|
|
||||||
|
|
||||||
if [ ! -f "$qbtConfigFile" ]; then
|
|
||||||
mkdir -p "$(dirname $qbtConfigFile)"
|
|
||||||
cat << EOF > "$qbtConfigFile"
|
|
||||||
[BitTorrent]
|
|
||||||
Session\DefaultSavePath=/downloads
|
|
||||||
Session\Port=6881
|
|
||||||
Session\TempPath=/downloads/temp
|
|
||||||
|
|
||||||
[LegalNotice]
|
|
||||||
Accepted=false
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ "$QBT_EULA" = "accept" ]; then
|
|
||||||
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1true|}}' "$qbtConfigFile"
|
|
||||||
else
|
|
||||||
sed -i '/^\[LegalNotice\]$/{$!{N;s|\(\[LegalNotice\]\nAccepted=\).*|\1false|}}' "$qbtConfigFile"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# those are owned by root by default
|
|
||||||
# don't change existing files owner in `$downloadsPath`
|
|
||||||
chown qbtUser:qbtUser "$downloadsPath"
|
|
||||||
chown qbtUser:qbtUser -R "$profilePath"
|
|
||||||
|
|
||||||
doas -u qbtUser \
|
|
||||||
qbittorrent-nox \
|
|
||||||
--profile="$profilePath" \
|
|
||||||
--webui-port="$QBT_WEBUI_PORT" \
|
|
||||||
"$@"
|
|
||||||
2
dist/mac/Info.plist
vendored
2
dist/mac/Info.plist
vendored
@@ -55,7 +55,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.5.0</string>
|
<string>4.5.1</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
|
|||||||
@@ -74,6 +74,6 @@
|
|||||||
<url type="translate">https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent</url>
|
<url type="translate">https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent</url>
|
||||||
<content_rating type="oars-1.1"/>
|
<content_rating type="oars-1.1"/>
|
||||||
<releases>
|
<releases>
|
||||||
<release version="4.5.0" date="2022-11-26"/>
|
<release version="4.5.1" date="2023-02-12"/>
|
||||||
</releases>
|
</releases>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
2
dist/windows/config.nsi
vendored
2
dist/windows/config.nsi
vendored
@@ -25,7 +25,7 @@
|
|||||||
; 4.5.1.3 -> good
|
; 4.5.1.3 -> good
|
||||||
; 4.5.1.3.2 -> bad
|
; 4.5.1.3.2 -> bad
|
||||||
; 4.5.0beta -> bad
|
; 4.5.0beta -> bad
|
||||||
!define /ifndef QBT_VERSION "4.5.0"
|
!define /ifndef QBT_VERSION "4.5.1"
|
||||||
|
|
||||||
; Option that controls the installer's window name
|
; Option that controls the installer's window name
|
||||||
; If set, its value will be used like this:
|
; If set, its value will be used like this:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||||
LangString inst_qbt_req ${LANG_LITHUANIAN} "qBittorrent (reikalingas)"
|
LangString inst_qbt_req ${LANG_LITHUANIAN} "qBittorrent (reikalingas)"
|
||||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||||
LangString inst_dekstop ${LANG_LITHUANIAN} "Sukurti darbalaukyje nuorodą"
|
LangString inst_dekstop ${LANG_LITHUANIAN} "Sukurti nuorodą darbalaukyje"
|
||||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||||
LangString inst_startmenu ${LANG_LITHUANIAN} "Sukurti Pradėti meniu nuorodą"
|
LangString inst_startmenu ${LANG_LITHUANIAN} "Sukurti Pradėti meniu nuorodą"
|
||||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||||
@@ -13,27 +13,27 @@ LangString inst_torrent ${LANG_LITHUANIAN} "Atidaryti .torrent failus su qBittor
|
|||||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||||
LangString inst_magnet ${LANG_LITHUANIAN} "Atidaryti magneto nuorodas su qBittorrent"
|
LangString inst_magnet ${LANG_LITHUANIAN} "Atidaryti magneto nuorodas su qBittorrent"
|
||||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||||
LangString inst_firewall ${LANG_LITHUANIAN} "Sukurti Windows užkardos leidimą"
|
LangString inst_firewall ${LANG_LITHUANIAN} "Sukurti Windows interneto užkardos leidimą"
|
||||||
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
||||||
LangString inst_pathlimit ${LANG_LITHUANIAN} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
LangString inst_pathlimit ${LANG_LITHUANIAN} "Išjungti Windows path ilgio limitaciją (260 ženklų MAX_PATH limitacija, reikalinga versija yra Windows 10 1607 ar naujesnė)"
|
||||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||||
LangString inst_firewallinfo ${LANG_LITHUANIAN} "Pridedu Windows užkardos leidimą"
|
LangString inst_firewallinfo ${LANG_LITHUANIAN} "Pridedu Windows užkardos leidimą"
|
||||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||||
LangString inst_warning ${LANG_LITHUANIAN} "qBittorrent yra paleistas. Prašau uždaryti programą prieš įdiegiant."
|
LangString inst_warning ${LANG_LITHUANIAN} "qBittorrent yra paleistas. Prašome uždaryti programą prieš įdiegiant."
|
||||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||||
LangString inst_uninstall_question ${LANG_LITHUANIAN} "Current version will be uninstalled. User settings and torrents will remain intact."
|
LangString inst_uninstall_question ${LANG_LITHUANIAN} "Dabartinė versija bus pašalinta. Naudotojo nustatymai ir torrentai liks nepakeisti."
|
||||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||||
LangString inst_unist ${LANG_LITHUANIAN} "Šalinu ankstesnę versiją."
|
LangString inst_unist ${LANG_LITHUANIAN} "Šalinama ankstesnė versija."
|
||||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||||
LangString launch_qbt ${LANG_LITHUANIAN} "Paleisti qBittorrent."
|
LangString launch_qbt ${LANG_LITHUANIAN} "Paleisti qBittorrent."
|
||||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||||
LangString inst_requires_64bit ${LANG_LITHUANIAN} "This installer works only in 64-bit Windows versions."
|
LangString inst_requires_64bit ${LANG_LITHUANIAN} "Šis įdiegėjas veikia tik su 64 bitų Windows versija."
|
||||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||||
LangString inst_requires_win7 ${LANG_LITHUANIAN} "This qBittorrent version requires at least Windows 7."
|
LangString inst_requires_win7 ${LANG_LITHUANIAN} "Ši qBittorent versija reikalauja bent Windows 7."
|
||||||
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 1809."
|
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 1809."
|
||||||
LangString inst_requires_win10 ${LANG_LITHUANIAN} "This installer requires at least Windows 10 1809."
|
LangString inst_requires_win10 ${LANG_LITHUANIAN} "Šis įdiegėjas reikalauja bent Windows 10 1809."
|
||||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||||
LangString inst_uninstall_link_description ${LANG_LITHUANIAN} "Uninstall qBittorrent"
|
LangString inst_uninstall_link_description ${LANG_LITHUANIAN} "Pašalinti qBittorrent"
|
||||||
|
|
||||||
;------------------------------------
|
;------------------------------------
|
||||||
;Uninstaller strings
|
;Uninstaller strings
|
||||||
@@ -49,14 +49,14 @@ LangString remove_registry ${LANG_LITHUANIAN} "Pašalinti registro raktus"
|
|||||||
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||||
LangString remove_conf ${LANG_LITHUANIAN} "Pašalinti nustatymų failus"
|
LangString remove_conf ${LANG_LITHUANIAN} "Pašalinti nustatymų failus"
|
||||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||||
LangString remove_firewall ${LANG_LITHUANIAN} "Pašalinti Windows užkardos leidimą"
|
LangString remove_firewall ${LANG_LITHUANIAN} "Pašalinti Windows interneto užkardos leidimą"
|
||||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||||
LangString remove_firewallinfo ${LANG_LITHUANIAN} "Šalinu Windows užkardos leidimą"
|
LangString remove_firewallinfo ${LANG_LITHUANIAN} "Šalinamas Windows interneto užkardos leidimas"
|
||||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||||
LangString remove_cache ${LANG_LITHUANIAN} "Pašalinti torentus ir podėlio duomenis"
|
LangString remove_cache ${LANG_LITHUANIAN} "Pašalinti torentus ir talpyklos duomenis"
|
||||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||||
LangString uninst_warning ${LANG_LITHUANIAN} "qBittorrent yra paleistas. Prašau uždarykite programą prieš išdiegiant."
|
LangString uninst_warning ${LANG_LITHUANIAN} "qBittorrent yra paleistas. Prašome uždaryti programą prieš išdiegiant."
|
||||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||||
LangString uninst_tor_warn ${LANG_LITHUANIAN} "Negaliu pašalinti .torrent asociacijos. Ji yra susieti su:"
|
LangString uninst_tor_warn ${LANG_LITHUANIAN} "Neįmanoma pašalinti .torrent asociacijos. Ji yra susieta su:"
|
||||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||||
LangString uninst_mag_warn ${LANG_LITHUANIAN} "Negaliu pašalinti magneto asociacijos. Jis susietas su:"
|
LangString uninst_mag_warn ${LANG_LITHUANIAN} "Neįmanoma pašalinti magneto asociacijos. Ji yra susieta su:"
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ LangString inst_unist ${LANG_SWEDISH} "Avinstallerar tidigare version."
|
|||||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||||
LangString launch_qbt ${LANG_SWEDISH} "Kör qBittorrent."
|
LangString launch_qbt ${LANG_SWEDISH} "Kör qBittorrent."
|
||||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||||
LangString inst_requires_64bit ${LANG_SWEDISH} "Installationsprogrammet fungerar endast i 64-bitars Windows-versioner."
|
LangString inst_requires_64bit ${LANG_SWEDISH} "Det här installationsprogrammet fungerar endast i 64-bitars Windows-versioner."
|
||||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||||
LangString inst_requires_win7 ${LANG_SWEDISH} "Den här qBittorrent-versionen kräver minst Windows 7."
|
LangString inst_requires_win7 ${LANG_SWEDISH} "Den här qBittorrent-versionen kräver minst Windows 7."
|
||||||
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 1809."
|
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 1809."
|
||||||
LangString inst_requires_win10 ${LANG_SWEDISH} "This installer requires at least Windows 10 1809."
|
LangString inst_requires_win10 ${LANG_SWEDISH} "Det här installationsprogrammet kräver minst Windows 10 1809."
|
||||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||||
LangString inst_uninstall_link_description ${LANG_SWEDISH} "Avinstallera qBittorrent"
|
LangString inst_uninstall_link_description ${LANG_SWEDISH} "Avinstallera qBittorrent"
|
||||||
|
|
||||||
|
|||||||
2
dist/windows/installer.nsi
vendored
2
dist/windows/installer.nsi
vendored
@@ -35,6 +35,8 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
|
|||||||
SetOutPath "$INSTDIR\translations"
|
SetOutPath "$INSTDIR\translations"
|
||||||
; Put files there
|
; Put files there
|
||||||
File /r "translations\qt*.qm"
|
File /r "translations\qt*.qm"
|
||||||
|
; Restore output path because it affects `CreateShortCut`. It affects the "Start in" field.
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
; Write the installation path into the registry
|
; Write the installation path into the registry
|
||||||
WriteRegStr HKLM "Software\qBittorrent" "InstallLocation" "$INSTDIR"
|
WriteRegStr HKLM "Software\qBittorrent" "InstallLocation" "$INSTDIR"
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
#include "base/version.h"
|
#include "base/version.h"
|
||||||
#include "applicationinstancemanager.h"
|
#include "applicationinstancemanager.h"
|
||||||
#include "filelogger.h"
|
#include "filelogger.h"
|
||||||
|
#include "upgrade.h"
|
||||||
|
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
#include "gui/addnewtorrentdialog.h"
|
#include "gui/addnewtorrentdialog.h"
|
||||||
@@ -171,6 +172,18 @@ Application::Application(int &argc, char **argv)
|
|||||||
SettingsStorage::initInstance();
|
SettingsStorage::initInstance();
|
||||||
Preferences::initInstance();
|
Preferences::initInstance();
|
||||||
|
|
||||||
|
const bool firstTimeUser = !Preferences::instance()->getAcceptedLegal();
|
||||||
|
if (!firstTimeUser)
|
||||||
|
{
|
||||||
|
if (!upgrade())
|
||||||
|
throw RuntimeError(u"Failed migration of old settings"_qs); // Not translatable. Translation isn't configured yet.
|
||||||
|
handleChangedDefaults(DefaultPreferencesMode::Legacy);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
handleChangedDefaults(DefaultPreferencesMode::Current);
|
||||||
|
}
|
||||||
|
|
||||||
initializeTranslation();
|
initializeTranslation();
|
||||||
|
|
||||||
connect(this, &QCoreApplication::aboutToQuit, this, &Application::cleanup);
|
connect(this, &QCoreApplication::aboutToQuit, this, &Application::cleanup);
|
||||||
@@ -658,8 +671,7 @@ Application::AddTorrentParams Application::parseParams(const QStringList ¶ms
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
parsedParams.torrentSource = param;
|
parsedParams.torrentSources.append(param);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return parsedParams;
|
return parsedParams;
|
||||||
@@ -675,10 +687,16 @@ void Application::processParams(const AddTorrentParams ¶ms)
|
|||||||
// should be overridden.
|
// should be overridden.
|
||||||
const bool showDialogForThisTorrent = !params.skipTorrentDialog.value_or(!AddNewTorrentDialog::isEnabled());
|
const bool showDialogForThisTorrent = !params.skipTorrentDialog.value_or(!AddNewTorrentDialog::isEnabled());
|
||||||
if (showDialogForThisTorrent)
|
if (showDialogForThisTorrent)
|
||||||
AddNewTorrentDialog::show(params.torrentSource, params.torrentParams, m_window);
|
{
|
||||||
|
for (const QString &torrentSource : params.torrentSources)
|
||||||
|
AddNewTorrentDialog::show(torrentSource, params.torrentParams, m_window);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
BitTorrent::Session::instance()->addTorrent(params.torrentSource, params.torrentParams);
|
{
|
||||||
|
for (const QString &torrentSource : params.torrentSources)
|
||||||
|
BitTorrent::Session::instance()->addTorrent(torrentSource, params.torrentParams);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Application::exec(const QStringList ¶ms)
|
int Application::exec(const QStringList ¶ms)
|
||||||
@@ -706,7 +724,7 @@ try
|
|||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
UIThemeManager::initInstance();
|
UIThemeManager::initInstance();
|
||||||
|
|
||||||
m_desktopIntegration = new DesktopIntegration(this);
|
m_desktopIntegration = new DesktopIntegration;
|
||||||
m_desktopIntegration->setToolTip(tr("Loading torrents..."));
|
m_desktopIntegration->setToolTip(tr("Loading torrents..."));
|
||||||
#ifndef Q_OS_MACOS
|
#ifndef Q_OS_MACOS
|
||||||
auto *desktopIntegrationMenu = new QMenu;
|
auto *desktopIntegrationMenu = new QMenu;
|
||||||
@@ -788,12 +806,9 @@ try
|
|||||||
});
|
});
|
||||||
|
|
||||||
disconnect(m_desktopIntegration, &DesktopIntegration::activationRequested, this, &Application::createStartupProgressDialog);
|
disconnect(m_desktopIntegration, &DesktopIntegration::activationRequested, this, &Application::createStartupProgressDialog);
|
||||||
// we must not delete menu while it is used by DesktopIntegration
|
|
||||||
auto *oldMenu = m_desktopIntegration->menu();
|
|
||||||
const MainWindow::State windowState = (!m_startupProgressDialog || (m_startupProgressDialog->windowState() & Qt::WindowMinimized))
|
const MainWindow::State windowState = (!m_startupProgressDialog || (m_startupProgressDialog->windowState() & Qt::WindowMinimized))
|
||||||
? MainWindow::Minimized : MainWindow::Normal;
|
? MainWindow::Minimized : MainWindow::Normal;
|
||||||
m_window = new MainWindow(this, windowState);
|
m_window = new MainWindow(this, windowState);
|
||||||
delete oldMenu;
|
|
||||||
delete m_startupProgressDialog;
|
delete m_startupProgressDialog;
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
auto *pref = Preferences::instance();
|
auto *pref = Preferences::instance();
|
||||||
@@ -1201,6 +1216,7 @@ void Application::cleanup()
|
|||||||
::ShutdownBlockReasonDestroy(reinterpret_cast<HWND>(m_window->effectiveWinId()));
|
::ShutdownBlockReasonDestroy(reinterpret_cast<HWND>(m_window->effectiveWinId()));
|
||||||
#endif // Q_OS_WIN
|
#endif // Q_OS_WIN
|
||||||
delete m_window;
|
delete m_window;
|
||||||
|
delete m_desktopIntegration;
|
||||||
UIThemeManager::freeInstance();
|
UIThemeManager::freeInstance();
|
||||||
}
|
}
|
||||||
#endif // DISABLE_GUI
|
#endif // DISABLE_GUI
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
struct AddTorrentParams
|
struct AddTorrentParams
|
||||||
{
|
{
|
||||||
QString torrentSource;
|
QStringList torrentSources;
|
||||||
BitTorrent::AddTorrentParams torrentParams;
|
BitTorrent::AddTorrentParams torrentParams;
|
||||||
std::optional<bool> skipTorrentDialog;
|
std::optional<bool> skipTorrentDialog;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -118,6 +118,17 @@ int main(int argc, char *argv[])
|
|||||||
// Create Application
|
// Create Application
|
||||||
auto app = std::make_unique<Application>(argc, argv);
|
auto app = std::make_unique<Application>(argc, argv);
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
// QCoreApplication::applicationDirPath() needs an Application object instantiated first
|
||||||
|
// Let's hope that there won't be a crash before this line
|
||||||
|
const char *envName = "_NT_SYMBOL_PATH";
|
||||||
|
const QString envValue = qEnvironmentVariable(envName);
|
||||||
|
if (envValue.isEmpty())
|
||||||
|
qputenv(envName, Application::applicationDirPath().toLocal8Bit());
|
||||||
|
else
|
||||||
|
qputenv(envName, u"%1;%2"_qs.arg(envValue, Application::applicationDirPath()).toLocal8Bit());
|
||||||
|
#endif
|
||||||
|
|
||||||
const QBtCommandLineParameters params = app->commandLineArgs();
|
const QBtCommandLineParameters params = app->commandLineArgs();
|
||||||
if (!params.unknownParameter.isEmpty())
|
if (!params.unknownParameter.isEmpty())
|
||||||
{
|
{
|
||||||
@@ -221,26 +232,6 @@ int main(int argc, char *argv[])
|
|||||||
app->setAttribute(Qt::AA_DontShowIconsInMenus);
|
app->setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!firstTimeUser)
|
|
||||||
{
|
|
||||||
handleChangedDefaults(DefaultPreferencesMode::Legacy);
|
|
||||||
|
|
||||||
#ifndef DISABLE_GUI
|
|
||||||
if (!upgrade()) return EXIT_FAILURE;
|
|
||||||
#elif defined(Q_OS_WIN)
|
|
||||||
if (!upgrade(_isatty(_fileno(stdin))
|
|
||||||
&& _isatty(_fileno(stdout)))) return EXIT_FAILURE;
|
|
||||||
#else
|
|
||||||
if (!upgrade(!params.shouldDaemonize
|
|
||||||
&& isatty(fileno(stdin))
|
|
||||||
&& isatty(fileno(stdout)))) return EXIT_FAILURE;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
handleChangedDefaults(DefaultPreferencesMode::Current);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(DISABLE_GUI) && !defined(Q_OS_WIN)
|
#if defined(DISABLE_GUI) && !defined(Q_OS_WIN)
|
||||||
if (params.shouldDaemonize)
|
if (params.shouldDaemonize)
|
||||||
{
|
{
|
||||||
@@ -274,6 +265,11 @@ int main(int argc, char *argv[])
|
|||||||
displayBadArgMessage(er.message());
|
displayBadArgMessage(er.message());
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
catch (const RuntimeError &er)
|
||||||
|
{
|
||||||
|
qDebug() << er.message();
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(DISABLE_GUI)
|
#if !defined(DISABLE_GUI)
|
||||||
|
|||||||
@@ -384,9 +384,21 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void migrateChineseLocale()
|
||||||
|
{
|
||||||
|
auto *settingsStorage = SettingsStorage::instance();
|
||||||
|
const auto key = u"Preferences/General/Locale"_qs;
|
||||||
|
if (settingsStorage->hasKey(key))
|
||||||
|
{
|
||||||
|
const auto locale = settingsStorage->loadValue<QString>(key);
|
||||||
|
if (locale.compare(u"zh"_qs, Qt::CaseInsensitive) == 0)
|
||||||
|
settingsStorage->storeValue(key, u"zh_CN"_qs);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool upgrade(const bool /*ask*/)
|
bool upgrade()
|
||||||
{
|
{
|
||||||
CachedSettingValue<int> version {MIGRATION_VERSION_KEY, 0};
|
CachedSettingValue<int> version {MIGRATION_VERSION_KEY, 0};
|
||||||
|
|
||||||
@@ -413,6 +425,9 @@ bool upgrade(const bool /*ask*/)
|
|||||||
migrateMemoryPrioritySettings();
|
migrateMemoryPrioritySettings();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{
|
||||||
|
migrateChineseLocale();
|
||||||
|
}
|
||||||
version = MIGRATION_VERSION;
|
version = MIGRATION_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,5 +35,5 @@ enum class DefaultPreferencesMode
|
|||||||
};
|
};
|
||||||
|
|
||||||
void handleChangedDefaults(DefaultPreferencesMode mode);
|
void handleChangedDefaults(DefaultPreferencesMode mode);
|
||||||
bool upgrade(bool ask = true);
|
bool upgrade();
|
||||||
void setCurrentMigrationVersion();
|
void setCurrentMigrationVersion();
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ add_library(qbt_base STATIC
|
|||||||
utils/password.h
|
utils/password.h
|
||||||
utils/random.h
|
utils/random.h
|
||||||
utils/string.h
|
utils/string.h
|
||||||
|
utils/thread.h
|
||||||
utils/version.h
|
utils/version.h
|
||||||
version.h
|
version.h
|
||||||
|
|
||||||
@@ -183,6 +184,7 @@ add_library(qbt_base STATIC
|
|||||||
utils/password.cpp
|
utils/password.cpp
|
||||||
utils/random.cpp
|
utils/random.cpp
|
||||||
utils/string.cpp
|
utils/string.cpp
|
||||||
|
utils/thread.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(qbt_base
|
target_link_libraries(qbt_base
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ HEADERS += \
|
|||||||
$$PWD/utils/password.h \
|
$$PWD/utils/password.h \
|
||||||
$$PWD/utils/random.h \
|
$$PWD/utils/random.h \
|
||||||
$$PWD/utils/string.h \
|
$$PWD/utils/string.h \
|
||||||
|
$$PWD/utils/thread.h \
|
||||||
$$PWD/utils/version.h \
|
$$PWD/utils/version.h \
|
||||||
$$PWD/version.h
|
$$PWD/version.h
|
||||||
|
|
||||||
@@ -182,4 +183,5 @@ SOURCES += \
|
|||||||
$$PWD/utils/net.cpp \
|
$$PWD/utils/net.cpp \
|
||||||
$$PWD/utils/password.cpp \
|
$$PWD/utils/password.cpp \
|
||||||
$$PWD/utils/random.cpp \
|
$$PWD/utils/random.cpp \
|
||||||
$$PWD/utils/string.cpp
|
$$PWD/utils/string.cpp \
|
||||||
|
$$PWD/utils/thread.cpp
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Bittorrent Client using Qt and libtorrent.
|
* Bittorrent Client using Qt and libtorrent.
|
||||||
* Copyright (C) 2015, 2018 Vladimir Golovnev <glassez@yandex.ru>
|
* Copyright (C) 2015-2022 Vladimir Golovnev <glassez@yandex.ru>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -91,7 +91,7 @@ namespace
|
|||||||
|
|
||||||
BitTorrent::BencodeResumeDataStorage::BencodeResumeDataStorage(const Path &path, QObject *parent)
|
BitTorrent::BencodeResumeDataStorage::BencodeResumeDataStorage(const Path &path, QObject *parent)
|
||||||
: ResumeDataStorage(path, parent)
|
: ResumeDataStorage(path, parent)
|
||||||
, m_ioThread {new QThread(this)}
|
, m_ioThread {new QThread}
|
||||||
, m_asyncWorker {new Worker(path)}
|
, m_asyncWorker {new Worker(path)}
|
||||||
{
|
{
|
||||||
Q_ASSERT(path.isAbsolute());
|
Q_ASSERT(path.isAbsolute());
|
||||||
@@ -117,17 +117,11 @@ BitTorrent::BencodeResumeDataStorage::BencodeResumeDataStorage(const Path &path,
|
|||||||
|
|
||||||
qDebug() << "Registered torrents count: " << m_registeredTorrents.size();
|
qDebug() << "Registered torrents count: " << m_registeredTorrents.size();
|
||||||
|
|
||||||
m_asyncWorker->moveToThread(m_ioThread);
|
m_asyncWorker->moveToThread(m_ioThread.get());
|
||||||
connect(m_ioThread, &QThread::finished, m_asyncWorker, &QObject::deleteLater);
|
connect(m_ioThread.get(), &QThread::finished, m_asyncWorker, &QObject::deleteLater);
|
||||||
m_ioThread->start();
|
m_ioThread->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
BitTorrent::BencodeResumeDataStorage::~BencodeResumeDataStorage()
|
|
||||||
{
|
|
||||||
m_ioThread->quit();
|
|
||||||
m_ioThread->wait();
|
|
||||||
}
|
|
||||||
|
|
||||||
QVector<BitTorrent::TorrentID> BitTorrent::BencodeResumeDataStorage::registeredTorrents() const
|
QVector<BitTorrent::TorrentID> BitTorrent::BencodeResumeDataStorage::registeredTorrents() const
|
||||||
{
|
{
|
||||||
return m_registeredTorrents;
|
return m_registeredTorrents;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Bittorrent Client using Qt and libtorrent.
|
* Bittorrent Client using Qt and libtorrent.
|
||||||
* Copyright (C) 2015, 2018 Vladimir Golovnev <glassez@yandex.ru>
|
* Copyright (C) 2015-2022 Vladimir Golovnev <glassez@yandex.ru>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -32,6 +32,8 @@
|
|||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
|
||||||
#include "base/pathfwd.h"
|
#include "base/pathfwd.h"
|
||||||
|
#include "base/utils/thread.h"
|
||||||
|
|
||||||
#include "resumedatastorage.h"
|
#include "resumedatastorage.h"
|
||||||
|
|
||||||
class QByteArray;
|
class QByteArray;
|
||||||
@@ -46,7 +48,6 @@ namespace BitTorrent
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit BencodeResumeDataStorage(const Path &path, QObject *parent = nullptr);
|
explicit BencodeResumeDataStorage(const Path &path, QObject *parent = nullptr);
|
||||||
~BencodeResumeDataStorage() override;
|
|
||||||
|
|
||||||
QVector<TorrentID> registeredTorrents() const override;
|
QVector<TorrentID> registeredTorrents() const override;
|
||||||
LoadResumeDataResult load(const TorrentID &id) const override;
|
LoadResumeDataResult load(const TorrentID &id) const override;
|
||||||
@@ -60,7 +61,7 @@ namespace BitTorrent
|
|||||||
LoadResumeDataResult loadTorrentResumeData(const QByteArray &data, const QByteArray &metadata) const;
|
LoadResumeDataResult loadTorrentResumeData(const QByteArray &data, const QByteArray &metadata) const;
|
||||||
|
|
||||||
QVector<TorrentID> m_registeredTorrents;
|
QVector<TorrentID> m_registeredTorrents;
|
||||||
QThread *m_ioThread = nullptr;
|
Utils::Thread::UniquePtr m_ioThread;
|
||||||
|
|
||||||
class Worker;
|
class Worker;
|
||||||
Worker *m_asyncWorker = nullptr;
|
Worker *m_asyncWorker = nullptr;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Bittorrent Client using Qt and libtorrent.
|
* Bittorrent Client using Qt and libtorrent.
|
||||||
* Copyright (C) 2021 Vladimir Golovnev <glassez@yandex.ru>
|
* Copyright (C) 2021-2022 Vladimir Golovnev <glassez@yandex.ru>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -256,7 +256,7 @@ namespace BitTorrent
|
|||||||
|
|
||||||
BitTorrent::DBResumeDataStorage::DBResumeDataStorage(const Path &dbPath, QObject *parent)
|
BitTorrent::DBResumeDataStorage::DBResumeDataStorage(const Path &dbPath, QObject *parent)
|
||||||
: ResumeDataStorage(dbPath, parent)
|
: ResumeDataStorage(dbPath, parent)
|
||||||
, m_ioThread {new QThread(this)}
|
, m_ioThread {new QThread}
|
||||||
{
|
{
|
||||||
const bool needCreateDB = !dbPath.exists();
|
const bool needCreateDB = !dbPath.exists();
|
||||||
|
|
||||||
@@ -277,8 +277,8 @@ BitTorrent::DBResumeDataStorage::DBResumeDataStorage(const Path &dbPath, QObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_asyncWorker = new Worker(dbPath, u"ResumeDataStorageWorker"_qs, m_dbLock);
|
m_asyncWorker = new Worker(dbPath, u"ResumeDataStorageWorker"_qs, m_dbLock);
|
||||||
m_asyncWorker->moveToThread(m_ioThread);
|
m_asyncWorker->moveToThread(m_ioThread.get());
|
||||||
connect(m_ioThread, &QThread::finished, m_asyncWorker, &QObject::deleteLater);
|
connect(m_ioThread.get(), &QThread::finished, m_asyncWorker, &QObject::deleteLater);
|
||||||
m_ioThread->start();
|
m_ioThread->start();
|
||||||
|
|
||||||
RuntimeError *errPtr = nullptr;
|
RuntimeError *errPtr = nullptr;
|
||||||
@@ -302,9 +302,6 @@ BitTorrent::DBResumeDataStorage::~DBResumeDataStorage()
|
|||||||
{
|
{
|
||||||
QMetaObject::invokeMethod(m_asyncWorker, &Worker::closeDatabase);
|
QMetaObject::invokeMethod(m_asyncWorker, &Worker::closeDatabase);
|
||||||
QSqlDatabase::removeDatabase(DB_CONNECTION_NAME);
|
QSqlDatabase::removeDatabase(DB_CONNECTION_NAME);
|
||||||
|
|
||||||
m_ioThread->quit();
|
|
||||||
m_ioThread->wait();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<BitTorrent::TorrentID> BitTorrent::DBResumeDataStorage::registeredTorrents() const
|
QVector<BitTorrent::TorrentID> BitTorrent::DBResumeDataStorage::registeredTorrents() const
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Bittorrent Client using Qt and libtorrent.
|
* Bittorrent Client using Qt and libtorrent.
|
||||||
* Copyright (C) 2021 Vladimir Golovnev <glassez@yandex.ru>
|
* Copyright (C) 2021-2022 Vladimir Golovnev <glassez@yandex.ru>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -31,6 +31,7 @@
|
|||||||
#include <QReadWriteLock>
|
#include <QReadWriteLock>
|
||||||
|
|
||||||
#include "base/pathfwd.h"
|
#include "base/pathfwd.h"
|
||||||
|
#include "base/utils/thread.h"
|
||||||
#include "resumedatastorage.h"
|
#include "resumedatastorage.h"
|
||||||
|
|
||||||
class QThread;
|
class QThread;
|
||||||
@@ -59,7 +60,7 @@ namespace BitTorrent
|
|||||||
void createDB() const;
|
void createDB() const;
|
||||||
void updateDB(int fromVersion) const;
|
void updateDB(int fromVersion) const;
|
||||||
|
|
||||||
QThread *m_ioThread = nullptr;
|
Utils::Thread::UniquePtr m_ioThread;
|
||||||
|
|
||||||
class Worker;
|
class Worker;
|
||||||
Worker *m_asyncWorker = nullptr;
|
Worker *m_asyncWorker = nullptr;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
#include <QMutexLocker>
|
#include <QMutexLocker>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
#include <QVector>
|
||||||
|
|
||||||
const int TORRENTIDLIST_TYPEID = qRegisterMetaType<QVector<BitTorrent::TorrentID>>();
|
const int TORRENTIDLIST_TYPEID = qRegisterMetaType<QVector<BitTorrent::TorrentID>>();
|
||||||
|
|
||||||
@@ -59,11 +60,11 @@ void BitTorrent::ResumeDataStorage::loadAll() const
|
|||||||
loadingThread->start();
|
loadingThread->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<BitTorrent::LoadedResumeData> BitTorrent::ResumeDataStorage::fetchLoadedResumeData() const
|
QList<BitTorrent::LoadedResumeData> BitTorrent::ResumeDataStorage::fetchLoadedResumeData() const
|
||||||
{
|
{
|
||||||
const QMutexLocker locker {&m_loadedResumeDataMutex};
|
const QMutexLocker locker {&m_loadedResumeDataMutex};
|
||||||
|
|
||||||
const QVector<BitTorrent::LoadedResumeData> loadedResumeData = m_loadedResumeData;
|
const QList<BitTorrent::LoadedResumeData> loadedResumeData = m_loadedResumeData;
|
||||||
m_loadedResumeData.clear();
|
m_loadedResumeData.clear();
|
||||||
|
|
||||||
return loadedResumeData;
|
return loadedResumeData;
|
||||||
|
|||||||
@@ -29,9 +29,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QtContainerFwd>
|
#include <QtContainerFwd>
|
||||||
|
#include <QList>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QVector>
|
|
||||||
|
|
||||||
#include "base/3rdparty/expected.hpp"
|
#include "base/3rdparty/expected.hpp"
|
||||||
#include "base/path.h"
|
#include "base/path.h"
|
||||||
@@ -65,7 +65,7 @@ namespace BitTorrent
|
|||||||
virtual void storeQueue(const QVector<TorrentID> &queue) const = 0;
|
virtual void storeQueue(const QVector<TorrentID> &queue) const = 0;
|
||||||
|
|
||||||
void loadAll() const;
|
void loadAll() const;
|
||||||
QVector<LoadedResumeData> fetchLoadedResumeData() const;
|
QList<LoadedResumeData> fetchLoadedResumeData() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void loadStarted(const QVector<BitTorrent::TorrentID> &torrents);
|
void loadStarted(const QVector<BitTorrent::TorrentID> &torrents);
|
||||||
@@ -78,7 +78,7 @@ namespace BitTorrent
|
|||||||
virtual void doLoadAll() const = 0;
|
virtual void doLoadAll() const = 0;
|
||||||
|
|
||||||
const Path m_path;
|
const Path m_path;
|
||||||
mutable QVector<LoadedResumeData> m_loadedResumeData;
|
mutable QList<LoadedResumeData> m_loadedResumeData;
|
||||||
mutable QMutex m_loadedResumeDataMutex;
|
mutable QMutex m_loadedResumeDataMutex;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user