QBitTorrent: Difference between revisions

From Bitpost wiki
Line 34: Line 34:
The app is supposed to store settings in ~/.config.  But it has permissions problems when running as non-root.  Once you run as root, the stupid thing stores all its settings under the root [/] folder (NOT the ~root folder!).  Idiots.
The app is supposed to store settings in ~/.config.  But it has permissions problems when running as non-root.  Once you run as root, the stupid thing stores all its settings under the root [/] folder (NOT the ~root folder!).  Idiots.


I set up all these so they are stowed.  Yes, even the god damned .local folder, which has all kind of shit, because i need the currently active torrents it tracks.  Moh rons.  On occasion, I suppose i should go to bandit and push all this shit...  NOTE that I had to specifically exclude the logs - git won't commit them bc they are left open by qbt... oh you fabulous Qt bastards...
WARNING: when qbt saves qBittorrent.conf, it destroys the symlink, writing a hard file over it.  This really sucks, because everything else respects the symlinking, like qBittorrent-data.conf, watched_folders.json.  REALLY sad and inconsistent and just typical Qt fussiness and inconsistency and "i did it this way because i liked it at the moment and so what if it is deep and convoluted it works for me"...
 
Another sad story... when qbt saves its config, it destroys the symlink, writing a hard file over it.  This really sucks, because everything else respects the symlinking, like qBittorrent-data.conf, watched_folders.json.  REALLY sad and inconsistent and just typical Qt fussiness and inconsistency and "i did it this way because i liked it at the moment and so what if it is deep and convoluted it works for me"...


So the bottom line is...
So the bottom line is...
Line 48: Line 46:
  /.config/qBittorrent/rss/feeds.json            not used by me (see RSS tag in webUI)
  /.config/qBittorrent/rss/feeds.json            not used by me (see RSS tag in webUI)
  /.config/qBittorrent/rss/storage.lock          not used by me
  /.config/qBittorrent/rss/storage.lock          not used by me
  /.local/share/qBittorrent/BT_backup            cache of torrent files
  /.local/share/qBittorrent/BT_backup            cache of torrent files; CRITICAL DATA
  /.local/share/qBittorrent/GeoDB                ?
  /.local/share/qBittorrent/GeoDB                ?
  /.local/share/qBittorrent/nova3                ?
  /.local/share/qBittorrent/nova3                ?
  /.local/share/qBittorrent/rss/articles        ?
  /.local/share/qBittorrent/rss/articles        ?
  /.local/share/qBittorrent/logs/qbittorrent.log the log, not very verbose
  /.local/share/qBittorrent/logs/qbittorrent.log the log, not very verbose; locked by qB (don't symlink)
  /spiceflow/safe/data/private/qB/move.log      I created this and append each torrent move to it
  /spiceflow/safe/data/private/qB/move.log      I created this and append each torrent move to it
  /spiceflow/safe/data/private/qB/MDM_backup    I created this and set qB to copy finished torrentfiles here
  /spiceflow/safe/data/private/qB/MDM_backup    I created this and set qB to copy finished torrentfiles here

Revision as of 18:27, 3 November 2022

qBitTorrent is a complete system for mananging torrents. It has server, web, and client components.

I run qBitTorrent-nox, which includes server and web components. I don't need the client app (err, why not though if it doesn't hurt?)

Usage

LAN site

To watch a new tv show:

ssh bandit
cdtv
mkdir "My Show"
# add watched folder to qB web ui
# subscribe to rss

Configuration

Many important settings are available to be set in the qB web ui. Hit the gear icon in the toolbar.

Configure emails to be sent on download

Within qB web ui:

[x] email notification upon dl completion
From: smtp.bitpost@gmail.com
To: m@bitpost.com
SMTP server: smtp.gmail.com
[x] SSL [x] authentication
    u/p (see private)

Within gmail:

  • set up a (from: smtp.bitpost.com, subject: qBittorrent) filter to move/apply label Feed/devops/downloaded
  • set up a gmail phone app notification
app > Settings > thedigitalmachine@gmail.com > Manage labels > Feed/devops/downloaded > All

Config files and folders

The app is supposed to store settings in ~/.config. But it has permissions problems when running as non-root. Once you run as root, the stupid thing stores all its settings under the root [/] folder (NOT the ~root folder!). Idiots.

WARNING: when qbt saves qBittorrent.conf, it destroys the symlink, writing a hard file over it. This really sucks, because everything else respects the symlinking, like qBittorrent-data.conf, watched_folders.json. REALLY sad and inconsistent and just typical Qt fussiness and inconsistency and "i did it this way because i liked it at the moment and so what if it is deep and convoluted it works for me"...

So the bottom line is...

/.local     keep local, remember to cp this out if you need to recreate qbt environment or LOSE ALL SEEDS
/.config    saved in config repo but when qBittorrent.conf loses symlink, we need to copy it (see mh)

Details:

/.config/qBittorrent/qBittorrent.conf          saved; preferences and settings; qb clobbers symlink on save(!)
/.config/qBittorrent/watched_folders.json      saved; all our watched folders, one for movies, one for EVERY TV SHOW
/.config/qBittorrent/qBittorrent-data.conf     saved; apparently just some stats
/.config/qBittorrent/rss/feeds.json            not used by me (see RSS tag in webUI)
/.config/qBittorrent/rss/storage.lock          not used by me
/.local/share/qBittorrent/BT_backup            cache of torrent files; CRITICAL DATA
/.local/share/qBittorrent/GeoDB                ?
/.local/share/qBittorrent/nova3                ?
/.local/share/qBittorrent/rss/articles         ?
/.local/share/qBittorrent/logs/qbittorrent.log the log, not very verbose; locked by qB (don't symlink)
/spiceflow/safe/data/private/qB/move.log       I created this and append each torrent move to it
/spiceflow/safe/data/private/qB/MDM_backup     I created this and set qB to copy finished torrentfiles here

Installation

Install qbittorrent.

sudo add-apt-repository -y ppa:qbittorrent-team/qbittorrent-stable
sudo apt update
sudo apt install -y qbittorrent-nox
# next we run it directly to accept license and set things up
# you can go to localhost:8080 while it is runnning, but might as well CrtlC and move on
qbittorrent-nox
Ctrl-C

Set up a service.

# set up a service, see bandit ~/config/etc/systemd... for details
# note that I set up a qbittorrent user to run the service under... 
# but that just caused a lot of permissions problems so i am not using it
sudo systemctl enable qbittorrent-nox.service

Set up cron to read rss feed regularly.

# MDM Grab torrents from RSS very often
*/5 * * * * /home/m/scripts/ubuntu/bandit/cron_getrss.sh >/dev/null

# MDM Move torrents into place every minute.
0-59 * * * * /home/m/scripts/ubuntu/bandit/cron_movetorrents.sh >/dev/null

I pushed the crontab to the config repo and stowed it.

🤠 m@bandit  [~] sudo ls -lad /var/spool/cron/crontabs/m
lrwxrwxrwx 1 root root 77 Nov  2 23:03 /var/spool/cron/crontabs/m -> ../../../../home/m/development/config/ubuntu/bandit/var/spool/cron/crontabs/m


Ensure bandit VM starts at boot; any order is fine.