prevent empty tags/formats

This commit is contained in:
Simon
2025-12-01 16:07:45 +00:00
parent 07b812be64
commit e22a3f2d6d

View File

@@ -129,6 +129,9 @@ impl VideoItem {
}
}
pub fn tags(mut self, tags: Vec<String>) -> Self {
if tags.is_empty(){
return self;
}
self.tags = Some(tags);
self
}
@@ -157,6 +160,9 @@ impl VideoItem {
self
}
pub fn formats(mut self, formats: Vec<VideoFormat>) -> Self {
if formats.is_empty(){
return self;
}
self.formats = Some(formats);
self
}