prevent empty tags/formats
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user