ch3p4ll3 / QBittorrentBot

This bot can control qbittorrent easily from Telegram! You can add magnet or torrent files, have a list of active downloads, delete, pause and restart downloads.
https://ch3p4ll3.github.io/QBittorrentBot/
GNU General Public License v3.0
70 stars 28 forks source link

bug #32

Closed joey00797 closed 9 months ago

joey00797 commented 10 months ago

you have a languages ​​button, is it in the plans or is there something wrong with it because it doesn’t work. and what does the reset settings button do? I don't think she does anything...

ch3p4ll3 commented 10 months ago

Hi, the language button it's still WIP

ch3p4ll3 commented 10 months ago

Could you post here also the comment you posted here? Ty

joey00797 commented 10 months ago

yeap I can help with Russian localization. I have already made it for myself for experimental purposes, but I would like it to work as intended by the author)

ch3p4ll3 commented 10 months ago

I can help with Russian localization.

To help add languages ​​you can do it from the following link.

joey00797 commented 10 months ago

yes, I have already registered. but as I understand it, you have to add me.

ch3p4ll3 commented 10 months ago

Woopsy, didn't know, I added you

joey00797 commented 10 months ago

yeah now I can work on it)

joey00797 commented 10 months ago

done my friend

There are still specific lines that I would like to check directly in the bot. adjustments may need to be made)

ch3p4ll3 commented 10 months ago

Oki doki, thank you. tomorrow I'll test the bot. If it's all right I'll push the changes in master

joey00797 commented 10 months ago

and I also added Ukrainian locale

well, we'll wait)

ch3p4ll3 commented 10 months ago

Hi, could you checkout the branch "v2-add-localization" and try the bot with the translations? Put "locale": "ru_UA" or "locale": "uk_UA", as locale in config.json file in the user section

joey00797 commented 10 months ago

Hi, friend Do I understand correctly, I need to download v2-add-localization and configure it the same way as the master and everything should work?

if yes, then there are problems)

укк

ch3p4ll3 commented 10 months ago

what version of python do you have? StrEnum only works with python >=3.11. Btw, I suggest you to build the docker image and run it. docker build -t qbittorrentbot:latest . && docker run -d -v /home/user/docker/QBittorrentBot:/app/config:rw --name qbittorrentbot qbittorrentbot:latest

joey00797 commented 10 months ago

3.10, judging from the log. I'll try to update, if it doesn't work, I'll switch to docker

joey00797 commented 10 months ago

Hi, friend Finally I launched the bot. On my main machine there was no way to update Python, and with it the docker dependencies. As a result, I now have a clean new system) Now about the bot itself, the button with the locales has disspasered from the menu, I think you moved it. You can also change it from the user settings by entering it manually (it would be nice to see a hint about available locales, for example ru\en\it). Also, for some reason I was unable to get the RU locale through the configuration file. and please add http and locale settings to the config.temp

ch3p4ll3 commented 10 months ago

hi, at the moment I can't test the bot, next week I will be able to develop it better. I was already planning to add language choice buttons in user settings. Why you couldn't use the RU locale?

ch3p4ll3 commented 10 months ago

@all-contributors please add @joey00797 for translation

allcontributors[bot] commented 10 months ago

@ch3p4ll3

I've put up a pull request to add @joey00797! :tada:

joey00797 commented 10 months ago

Why you couldn't use the RU locale?

it can be used, but it is not selected through the config file. only through the settings in the bot itself

ch3p4ll3 commented 10 months ago

What do you mean with " it is not selected through the config file"? The bot does not get the locale from config file but only from user settings? What did you wrote on the config file? ru_UA?

joey00797 commented 10 months ago

The bot does not get the locale from config file but only from user settings?

Yes, that is right.

What did you wrote on the config file?

        "user_id": ****,
        "notify": false,
        "locale": "ru_UA",
        "role": "administrator"
ch3p4ll3 commented 10 months ago

very strange behaviour, could you please try the latest update from v2-add-localization?

joey00797 commented 10 months ago

The latest release won't start. The container is being built, but Docker starts with an error. But. I tried changing the language in the config to Italian in the last release, and it worked. strange isn't it? then I rebuilt the container with the ru config again and it was applied. really strange behavior, although yesterday, no matter what I tried, nothing worked.

ch3p4ll3 commented 10 months ago

well, that's really strange. Do you have something interesting in the logs?

joey00797 commented 10 months ago

yes, the log breaks on loading the plugin. last line in the log 2024-01-11 15:04:22,977 - pyrogram.client - INFO - [qbittorrent_bot] [LOAD] CallbackQueryHandler("reload_settings_callback") in group 0 from "src.bot.plugins.callbacks.settings.reload_settings_callbacks"

ch3p4ll3 commented 10 months ago

that log doesn't say anything interesting. Are there no debug/warning/error/fatal logs?

joey00797 commented 10 months ago

Nope everything is in "info"

ch3p4ll3 commented 10 months ago

could u send the full log file on pastebin?

joey00797 commented 10 months ago

https://pastebin.com/HWwwPkuL

ch3p4ll3 commented 10 months ago

I don't see anything strange there

joey00797 commented 10 months ago

and I don't see. but the container does not start Снимок экрана от 2024-01-11 19-36-34

ch3p4ll3 commented 10 months ago

@joey00797 Well I'm an idiot lmao. I forgot to update the requirements file

joey00797 commented 10 months ago

Now the container is assembled and the bot is launched. but...selecting the locale from the user settings does not work. you press the button to change locale and nothing happens... the bot loads for a while but does not give anything back.э

https://pastebin.com/7Q2ctbtF

ch3p4ll3 commented 10 months ago

@joey00797 Hi, I added some translations that need to be filled on the site. That's what is causing the problem

joey00797 commented 10 months ago

yeap i aded

ch3p4ll3 commented 10 months ago

Ty, you can pull the branch

joey00797 commented 10 months ago

yaep its worked)

Have you thought about adding a torrent search engine for your bot?)

I can send you our local bot (it’s in Russian) it generates magnet links, which I add to your bot)

I thought that having such functionality in one place would be wonderful)

ch3p4ll3 commented 10 months ago

its worked)

Noice!

I can send you our local bot (it’s in Russian)

mm interesting, I'll think about it. In the meanwhile could you send me the bot? Ty

joey00797 commented 10 months ago

send me the bot?

@torrents_index_bot

ch3p4ll3 commented 10 months ago

ty, I think it'll be simpler for me using the builtin search engine of qbittorrent

joey00797 commented 10 months ago

By the way, you're probably right. + it has the ability to use your own search resources. yes, that's probably even better and I'm ready to test if necessary)

upd 1,I think we need to add a description of how to change the locale in README.md 2,When entering the bot for a new user, there is no message about this, although it is in the config. the bot just doesn't work for this user) but if you add it to the config, it works without problems. Also, can there be only one administrator role?

ch3p4ll3 commented 10 months ago

1,I think we need to add a description of how to change the locale in README.md

Hi, when I'm free I'm planning to add some documentation about this

When entering the bot for a new user, there is no message about this, although it is in the config. the bot just doesn't work for this user) but if you add it to the config, it works without problems.

At the moment you can't add users from the bot itself.

Also, can there be only one administrator role?

Nope, there may be multiple users with the same role

joey00797 commented 10 months ago

At the moment you can't add users from the bot itself.

hi no, you misunderstood a little) I mean that if someone comes into my bot who is not in the config, then the bot is simply silent. although in the translation I saw the phrase “you are not authorized in this bot”

Nope, there may be multiple users with the same role

interesting, I probably made a mistake with the settings somewhere. I will try again)

ch3p4ll3 commented 10 months ago

hi no, you misunderstood a little) I mean that if someone comes into my bot who is not in the config, then the bot is simply silent. although in the translation I saw the phrase “you are not authorized in this bot”

Yep, I just fixed it

joey00797 commented 10 months ago

sorry, I was not at the PC

I tried it, everything works) you're a big lad) What are your plans for the future?)) Have you thought about making a hint for menu commands? I mean when you press "/" and it was /start, or what other commands are available.

ch3p4ll3 commented 10 months ago

@joey00797 Hi, idk, it'll be wonderful adding some other clients like uTorrent/transmission/etc. the hint for the menu commands have nothing to do with the bot. You must create them in botfather.

For now, when I have some free time I'll start writing more docs, maybe I'll add also something about the command hints

joey00797 commented 10 months ago

oh, I just didn’t know that they were made in the botfather) thanks, I’ll look into it)

I've got one more question, Have you thought about making a separate repository for this version of the bot? so they can do "git clone "locale"" and download the latest version...or add.edit to master I have already made a script for automation, but I always download it manually...

ch3p4ll3 commented 10 months ago

Sorry, I didn't get it. What do you mean? Why should I make another repo for this bot?

joey00797 commented 10 months ago

look, I'll try to explain) you have two branches 1 master, we can clone (as in your instructions) and 2 v2local, in which you and I are now working and testing it. maybe I just didn’t find how to download it through the terminal...

ch3p4ll3 commented 10 months ago

@joey00797 Ahhh now I get it lmao. Soo, clone the repo with git clone <repo url> then use git checkout v2-add-localization to switch to che v2local branch.

Anyway when I'll finish the docs+other minor features I'll merge the branch into master