You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just discovered your extra ordinary and very useful tools.
But I've run into a problem, let me explain.
I have more than 500 torrents in my qbit, and when I add a torrent your before-after verification method retrieves the entire list of torrents and compares it... with the entire list of torrents after the upload.
Except that I wasn't getting the torrent hash or even the info that followed because JQ was actually returning an error but you weren't showing it, so I reproduced your code by hand and indeed jq has arguments that are too long. It seems that having a lot of torrents is too much for him and therefore no result.
So I put in place, not having read all your code and everything you did.
I first tried to limit the number of results directly via the API call with "limit=10" but it doesn't seem to return the last element sorted by date, which is a problem....
So I abandoned the idea of processing directly from the api but after your call by adding "| jq .[-10:]" which filters the list of torrents to the last 10 elements and then I put this on the $oldinfo, $newinfo and recheck $newinfo.
I haven't done this anywhere else, using nothing else, but I think it might be useful to reduce the number to maybe 50 items, which seems more reasonable to check that no more than 1 torrent has been uploaded, or none at all.
Line 562 : local oldinfo=$(__META_qbrequest 'torrents/info?sort=added_on' | jq .[-10:])
Line 575 : local newinfo=$(__META_qbrequest 'torrents/info?sort=added_on' 2>/dev/null | jq .[-10:])
Line 580 : newinfo=$(__META_qbrequest 'torrents/info?sort=added_on' 2>/dev/null | jq .[-10:])
By the way, I didn't understand why the variable wasn't local in the case of recheck if $diff is empty.
But here's my modification
Good day/evening
The text was updated successfully, but these errors were encountered:
Hello,
I've just discovered your extra ordinary and very useful tools.
But I've run into a problem, let me explain.
I have more than 500 torrents in my qbit, and when I add a torrent your before-after verification method retrieves the entire list of torrents and compares it... with the entire list of torrents after the upload.
Except that I wasn't getting the torrent hash or even the info that followed because JQ was actually returning an error but you weren't showing it, so I reproduced your code by hand and indeed jq has arguments that are too long. It seems that having a lot of torrents is too much for him and therefore no result.
So I put in place, not having read all your code and everything you did.
I first tried to limit the number of results directly via the API call with "limit=10" but it doesn't seem to return the last element sorted by date, which is a problem....
So I abandoned the idea of processing directly from the api but after your call by adding "| jq .[-10:]" which filters the list of torrents to the last 10 elements and then I put this on the $oldinfo, $newinfo and recheck $newinfo.
I haven't done this anywhere else, using nothing else, but I think it might be useful to reduce the number to maybe 50 items, which seems more reasonable to check that no more than 1 torrent has been uploaded, or none at all.
By the way, I didn't understand why the variable wasn't local in the case of recheck if $diff is empty.
But here's my modification
Good day/evening
The text was updated successfully, but these errors were encountered: