Feramance / qBitrr

A simple Python script to talk to qBittorrent and Arr's
MIT License
82 stars 2 forks source link

Is it possible to make the media quality configuration support Chinese? #26

Closed kristianvmd closed 11 months ago

kristianvmd commented 12 months ago

Chinese characters, parentheses, and spaces in media quality profile names seem to cause errors

tomlkit.exceptions.ParseError: TOML parse error at line 62 col 0

Feramance commented 12 months ago

Could you kindly send your config via pastebin or similar?

kristianvmd commented 12 months ago

I've solved it, just need to add " before and after the quality configuration name in Chinese, thanks for your reply!

But there is another problem, I tried to limit the types of files that sonarr can download by configuring FileExtensionAllowlist

I set it up like this- FileExtensionAllowlist = [".mp4", ".mkv", ".sub", ".ass", ".srt", ". !qB", ".parts"]

But it doesn't seem to limit the types of files that can be downloaded, like this link:https://www.tleechreload.org/torrent/241055854

The filenames contained within are: ghosts.of.beirut.s01e02.hdr.2160p.web.h265-ggwp.r00 ghosts.of.beirut.s01e02.hdr.2160p.web.h265-ggwp.r01 ghosts.of.beirut.s01e02.hdr.2160p.web.h265-ggwp.r02

But it seems sonarr can still download these

Feramance commented 12 months ago

Will be adding handling the FileExtensionAllowlist in regex format, that way you can add ".r[0-9]{2}" to handle those file extensions

kristianvmd commented 12 months ago

Sorry I don't quite understand, but isn't FileExtensionAllowlist already restricted to download only [".mp4", ".mkv", ".sub", ".ass", ".srt", ". !qB", ".parts"], why add ".r[0-9]{2}", according to my understanding, adding ".r[0-9]{2}" will not allow them to download?

Feramance commented 12 months ago

Your issue is that qBitrr is you want to allow the files you listed to download but it's blocking them? Or you don't want them and it isn't blocking them?

kristianvmd commented 12 months ago

I don't want them and it isn't blocking them

Feramance commented 12 months ago

New patch available that should fix it v3.7.8, please confirm

Feramance commented 12 months ago

Keep in mind the torrent will still be picked up as the script can only read the files the torrent is attempting to download, it then disallows qbittorrent from downloading them and if those are the only files in the torrent then it-deletes the torrent as a whole thereafter

kristianvmd commented 12 months ago

OK, by the way, how soon will the docker version be updated, I'll test it out

Feramance commented 12 months ago

The docker version is automatically updated with the release

kristianvmd commented 12 months ago

Sorry another question, the time zone in the system I'm using is not in -v /etc/localtime, if I just add the variable -e TZ=Asia/Shanghai \ \ Is there a problem?

Feramance commented 12 months ago

So time zone is no problem to add. Did you provide the ffprobe binaries yourself to the correct folder? I suggest you use Sonarr rather than "test", or at the least test. And kindly set your log level to trace, let it run for an hour and send over the log that is generated in the log folder

Feramance commented 12 months ago

You also have Autodelete set to false, try setting it to true

kristianvmd commented 11 months ago

sonarr.log.old.zip

sonarr.zip

OK, the reason seems to be in the Chinese name of the sonarr configuration, if I change the name to sonarr123 it works correctly, but if I change the name to "4K小于30G" it doesn't delete and blacken the seeds correctly.

I think everyone's config file name is not the same, can we make qbitrr support sonarr's Chinese config name?

Feramance commented 11 months ago

I will look into that

Feramance commented 11 months ago

Can you send me your config with the Chinese characters?

Feramance commented 11 months ago

Can you kindly test using a name like Sonarr-4K小于30G?

kristianvmd commented 11 months ago

Desktop.zip Sorry I'm just seeing this now, it still doesn't seem to be working. Here's the log.

Feramance commented 11 months ago

Upon further investigation, it seems like this is a limitation of the tomlkit from python and nothing much I can really do about that