Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug #32

Closed
joey00797 opened this issue Jan 8, 2024 · 53 comments
Closed

bug #32

joey00797 opened this issue Jan 8, 2024 · 53 comments
Labels
enhancement New feature or request

Comments

@joey00797
Copy link

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
Copy link
Owner

ch3p4ll3 commented Jan 8, 2024

Hi, the language button it's still WIP

@ch3p4ll3
Copy link
Owner

ch3p4ll3 commented Jan 8, 2024

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

@joey00797
Copy link
Author

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
Copy link
Owner

ch3p4ll3 commented Jan 8, 2024

I can help with Russian localization.

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

@joey00797
Copy link
Author

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

@ch3p4ll3
Copy link
Owner

ch3p4ll3 commented Jan 8, 2024

Woopsy, didn't know, I added you

@joey00797
Copy link
Author

yeah
now I can work on it)

@joey00797
Copy link
Author

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
Copy link
Owner

ch3p4ll3 commented Jan 8, 2024

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

@joey00797
Copy link
Author

and I also added Ukrainian locale

well, we'll wait)

@ch3p4ll3
Copy link
Owner

ch3p4ll3 commented Jan 9, 2024

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
Copy link
Author

joey00797 commented Jan 9, 2024

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
Copy link
Owner

ch3p4ll3 commented Jan 9, 2024

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
Copy link
Author

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

@joey00797
Copy link
Author

joey00797 commented Jan 11, 2024

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
Copy link
Owner

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?

Repository owner deleted a comment from allcontributors bot Jan 11, 2024
@ch3p4ll3
Copy link
Owner

@all-contributors please add @joey00797 for translation

Copy link
Contributor

@ch3p4ll3

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

@joey00797
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

@joey00797
Copy link
Author

joey00797 commented Jan 11, 2024

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
Copy link
Owner

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

@joey00797
Copy link
Author

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
Copy link
Owner

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

@joey00797
Copy link
Author

Nope
everything is in "info"

@ch3p4ll3
Copy link
Owner

could u send the full log file on pastebin?

@joey00797
Copy link
Author

@ch3p4ll3
Copy link
Owner

I don't see anything strange there

@joey00797
Copy link
Author

joey00797 commented Jan 11, 2024

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

@ch3p4ll3
Copy link
Owner

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

@joey00797
Copy link
Author

joey00797 commented Jan 12, 2024

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
Copy link
Owner

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

@joey00797
Copy link
Author

yeap
i aded

@ch3p4ll3
Copy link
Owner

Ty, you can pull the branch

@joey00797
Copy link
Author

joey00797 commented Jan 12, 2024

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
Copy link
Owner

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
Copy link
Author

send me the bot?

@torrents_index_bot

@ch3p4ll3
Copy link
Owner

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

@ch3p4ll3 ch3p4ll3 added the enhancement New feature or request label Jan 12, 2024
@joey00797
Copy link
Author

joey00797 commented Jan 12, 2024

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
Copy link
Owner

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
Copy link
Author

joey00797 commented Jan 13, 2024

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

@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
Copy link
Author

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
Copy link
Owner

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

@joey00797
Copy link
Author

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
Copy link
Owner

ch3p4ll3 commented Jan 15, 2024

@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

@joey00797
Copy link
Author

joey00797 commented Jan 15, 2024

That's it, I figured it out, thanks)

@ch3p4ll3
Copy link
Owner

@joey00797 Of course. First of all make sure you have git installed in your system, if you don't have it check on google how to install it in your system.

Then simply open a terminal in your fav location and use the command "git clone https://github.com/ch3p4ll3/QBittorrentBot.git" to clone the repository. This will create a folder called QBittorrentBot with inside all the files of the master branch.

If you want to have the files of another branch, such as v2-add-localization, you'll need to use the command "git checkout ". In this examples: git checkout v2-add-localization. Doing this all files will be updated with the version inside the branch you checkout.

Whenever a new commit is pushed to the repo, you can use the command "git pull" to retrieve the latest update, without having to download the zip all the times.

Hope this helped :)

@joey00797
Copy link
Author

joey00797 commented Jan 15, 2024

thank you very much) now I understand everything=)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants