adevjoe / qbittorrent-notify

qBittorrent notify when torrents complete

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sends last 5 messages again and again

olvier opened this issue · comments

As mentioned in topic, it sends the last 5 notifications again and again.

On first start, it floods the channel/group with ALL ended torrents.
In my case Some.Linux.Torrent.Bigger.1000

Made many stops because of "Too Many Requests: retry after ...",
but finishes with endless loop like this:

# created new group and new container ;)
2021/03/27 18:22:16 Authorized on account thisismyindividual_bot,
2021/03/27 18:22:16 login success,
2021/03/27 18:23:05 notify Some.Linux.Torrent.1 err, Too Many Requests: retry after 12,
2021/03/27 18:23:05 notify Some.Linux.Torrent.2 err, Too Many Requests: retry after 12,
2021/03/27 18:23:06 notify Some.Linux.Torrent.1 err, Too Many Requests: retry after 12,
2021/03/27 18:23:06 notify Some.Linux.Torrent.3 err, Too Many Requests: retry after 11,
2021/03/27 18:23:06 notify Some.Linux.Torrent.3 err, Too Many Requests: retry after 11,
2021/03/27 18:24:05 notify Some.Linux.Torrent.1 err, Too Many Requests: retry after 12,
2021/03/27 18:24:06 notify Some.Linux.Torrent.2 err, Too Many Requests: retry after 12,
2021/03/27 18:24:06 notify Some.Linux.Torrent.1 err, Too Many Requests: retry after 11,
2021/03/27 18:24:06 notify Some.Linux.Torrent.3 err, Too Many Requests: retry after 11,
2021/03/27 18:24:06 notify Some.Linux.Torrent.3 err, Too Many Requests: retry after 11,

I'm on qbittorrent 4.3.4.1

But I have to correct myself... Meanwhile there was finished Some.Linux.Torrent.4,
but it still sends above mentioned 1-3.

Any idea why?

PS: getting groupID is so easy with: IDBot

commented

How many ended torrents do you have? It could be send to telegram too frequently. This program check torrents and send messages per 10 seconds. I'll fix it about this.

The problem is not, that there are too many finished torrents. Because the programm handled them all (>1000). And the problem doesn't seem to be the restrictions from telegram itself, because your program seems to wait for the countdown and then sends again.

The problem seems to be, that your program detects those 5 torrents again and again as finished. And this results in those too highly frequented messages to telegram. But the restriction itself isn't the problem.

I've tested some other scripts, and those do not detect these 5 torrents as finished in a loop. So i guess it's a 'wrong interpretation' of this program, and not a wrong reported information by qbittorrent.

commented

Does these 5 torrents have tag Notified in qbittorrent?

Where do I check that?

commented

You can find on qBittorrent Web UI. like this

In english, the column name is Tags. When Tags have Notified tag, that means this torrent be notified.

Ah, nice to know. I've recognized, that these 3 torrents are those, with an own tag.
3, because 3 unique with some cross-seeding.

image

It seems, that your program has some problems, when user has defined own tags.

commented

Maybe this is the reason. Thanks for your feedback. I'll test about that.

commented

Fixed in adevjoe/qbittorrent-notify:v0.1.1.

Can confirm, works now  👍🏼