feat: add the concept of tags
Tags are attached to all magnet links provided by a given source, and passed to actions. This allows for e.g. better categorization in Bitmagnet.
This commit is contained in:
parent
f19e02988f
commit
c3764c125a
13 changed files with 240 additions and 11 deletions
|
|
@ -36,10 +36,11 @@ impl TransmissionClient {
|
|||
}
|
||||
|
||||
/// Submit a magnet link to Transmission
|
||||
pub async fn submit_magnet(&mut self, magnet: &str) -> Result<()> {
|
||||
pub async fn submit_magnet(&mut self, magnet: &str, tags: Vec<&str>) -> Result<()> {
|
||||
let args = TorrentAddArgs {
|
||||
filename: Some(magnet.to_string()),
|
||||
download_dir: Some(self.download_dir.clone()),
|
||||
labels: Some(tags.iter().map(|t| t.to_string()).collect()),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue