Open AbdulMalikDev opened 3 years ago
The project has been updated extensively in the last 2 years (check wiki for more info). The default branch is now the "main" branch.
If anyone wants to work on this feature you can simply apply this concept on the new "main" branch.
Current State
In the current state of the application, when the RSS Filter is either enabled or disabled, a message prompting the user to use the ruTorrent web interface to make the changes pops up as shown below.
Furthermore, the option of adding, deleting or editing (existing) RSS Filters is not present.
Proposed Changes
Implementation
Enabling and Disabling RSS Filters
I will be using the RSS Plugin of the ruTorrent Web Interface to implement this feature. Implementing this feature would require changing the enabled integer in the RSS Filter object and making a POST request to the RSS plugin with the JSON form of the RSS Filter object (more on this below).
Add, Edit, Delete RSS Filters
Again the RSS Plugin will be used. A small catch here is, anytime any change is made to any of the filters, ALL (existing) filters have to be sent via the POST network call to the Plugin. If we attempt to send only the filter that has been changed, all other filters are deleted.
Now the issue with this approach is, a JSON object cannot contain two same keys for obvious reasons and the plugin was not accepting different JSON objects for different filters.
So we will use
Content-Type: application/x-www-form-urlencoded
to send the data after encoding all the existing RSS Filters in the application.The one function that will implement both network implementations is given below.
The video of the complete working of the proposed feature will be added in the feature PR.
PR #134