bitmagnet/webui
mgdigital d443c5d8d9
Refactor torrent processing (#106)
A rework of the torrent creation workflow: previously a `Torrent` record was always created with a corresponding `TorrentContent` record, which would usually be empty; following this a `classify_torrent` queue job would attempt classification then update the `TorrentContent` record. 

Following this update, `Torrent` records will always be created in isolation, and a `process_torrent` job will then run in the queue. This will not only classify the torrent, but also perform any other tasks like search reindexing. For torrents that have already been matched to a piece of content, rematching will not occur (unless specified in the CLI command, see below), which saves a significant amount of work.

A new entity type, `TorrentHint` has been created for providing hints to the classifier (currently used only by the import tool). Previously any hints for the classifier were added directly to the `TorrentContent` record, which was a conflation of 2 different things (the classification result, and hints for the classifier), which is problematic when it comes to reclassification.

Additionally, a new CLI command, `reprocess` has been added, which will reprocess all torrents, classify them, and update the search index. For already matched torrents, rematching will only occur when passing the `--rematch` flag.

A few reasons for this change:

- It will prevent unclassified (but classifiable) torrents showing at the top of the list in the WebUI, which is confusing
- The new search index will require reindexing of all torrents, and the CLI command provides a simple way to do this
- In future, we'll want to hang further steps off the `process_torrent` job, such as rules-based deletion, and this provides the groundwork for that
2024-01-22 19:23:00 +00:00
..
.vscode Initial commit (#1) 2023-10-04 21:04:26 +01:00
dist/bitmagnet Refactor torrent processing (#106) 2024-01-22 19:23:00 +00:00
src Refactor torrent processing (#106) 2024-01-22 19:23:00 +00:00
.eslintrc.yaml Initial commit (#1) 2023-10-04 21:04:26 +01:00
.prettierignore Reduce aggregations in web UI (#87) 2023-12-21 16:08:38 +00:00
angular.json Initial commit (#1) 2023-10-04 21:04:26 +01:00
embed.go Initial commit (#1) 2023-10-04 21:04:26 +01:00
package-lock.json Bump follow-redirects from 1.15.2 to 1.15.4 in /webui (#102) 2024-01-09 12:24:38 +00:00
package.json Reduce aggregations in web UI (#87) 2023-12-21 16:08:38 +00:00
README.md Initial commit (#1) 2023-10-04 21:04:26 +01:00
tsconfig.app.json Initial commit (#1) 2023-10-04 21:04:26 +01:00
tsconfig.json Refactor torrent processing (#106) 2024-01-22 19:23:00 +00:00
tsconfig.spec.json Initial commit (#1) 2023-10-04 21:04:26 +01:00

Bitmagnet

This project was generated with Angular CLI version 16.0.4.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.