Help with adding a file filter for loaded torrents
Posted: Sat Oct 10, 2015 4:00 pm
Hi. I submitted a suggesting ages ago to add a filter to loaded torrents, that would allow certain fails to be deselected automatically. I finally found some time to work on it. To make my life easier, I'd appreciate some hints about how to implement it.
Where would be the best place to insert the filtering step? I'm guessing in TorrentInfo::loadFromFile(), but would there be any side effects to doing that? I'm always careful when modifying heavily used functions. Perhaps I should create a new function with filtering, and call it just from FileSystemWatcher::addTorrentsFromDir().
For the filtering it looks like the GUI uses QT, so I probably can't use that code. I saw some talk of adding more advanced filters. Did that get anywhere? Is there a preferred library for this? Personally I would be happy with a simple substring match, with full Unicode support of course.
Thanks for any assistance. I'm mostly an embedded developer so excuse my lack of knowledge.
Where would be the best place to insert the filtering step? I'm guessing in TorrentInfo::loadFromFile(), but would there be any side effects to doing that? I'm always careful when modifying heavily used functions. Perhaps I should create a new function with filtering, and call it just from FileSystemWatcher::addTorrentsFromDir().
For the filtering it looks like the GUI uses QT, so I probably can't use that code. I saw some talk of adding more advanced filters. Did that get anywhere? Is there a preferred library for this? Personally I would be happy with a simple substring match, with full Unicode support of course.
Thanks for any assistance. I'm mostly an embedded developer so excuse my lack of knowledge.