|
|
@ -13,7 +13,8 @@ use mediarepo_core::utils::parse_namespace_and_tag;
|
|
|
|
use mediarepo_database::queries::tags::get_hashes_with_namespaced_tags;
|
|
|
|
use mediarepo_database::queries::tags::get_hashes_with_namespaced_tags;
|
|
|
|
use mediarepo_model::file::File;
|
|
|
|
use mediarepo_model::file::File;
|
|
|
|
use std::cmp::Ordering;
|
|
|
|
use std::cmp::Ordering;
|
|
|
|
use std::collections::HashMap;
|
|
|
|
use std::collections::{HashMap, HashSet};
|
|
|
|
|
|
|
|
use std::iter::FromIterator;
|
|
|
|
use tokio::io::AsyncReadExt;
|
|
|
|
use tokio::io::AsyncReadExt;
|
|
|
|
|
|
|
|
|
|
|
|
pub struct FilesNamespace;
|
|
|
|
pub struct FilesNamespace;
|
|
|
@ -111,6 +112,7 @@ impl FilesNamespace {
|
|
|
|
.await?;
|
|
|
|
.await?;
|
|
|
|
file.set_name(metadata.name).await?;
|
|
|
|
file.set_name(metadata.name).await?;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let tags: HashSet<String> = HashSet::from_iter(tags.into_iter());
|
|
|
|
let tags = repo
|
|
|
|
let tags = repo
|
|
|
|
.add_all_tags(tags.into_iter().map(parse_namespace_and_tag).collect())
|
|
|
|
.add_all_tags(tags.into_iter().map(parse_namespace_and_tag).collect())
|
|
|
|
.await?;
|
|
|
|
.await?;
|
|
|
|