prevent empty tags/formats
This commit is contained in:
@@ -129,6 +129,9 @@ impl VideoItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn tags(mut self, tags: Vec<String>) -> Self {
|
pub fn tags(mut self, tags: Vec<String>) -> Self {
|
||||||
|
if tags.is_empty(){
|
||||||
|
return self;
|
||||||
|
}
|
||||||
self.tags = Some(tags);
|
self.tags = Some(tags);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
@@ -157,6 +160,9 @@ impl VideoItem {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
pub fn formats(mut self, formats: Vec<VideoFormat>) -> Self {
|
pub fn formats(mut self, formats: Vec<VideoFormat>) -> Self {
|
||||||
|
if formats.is_empty(){
|
||||||
|
return self;
|
||||||
|
}
|
||||||
self.formats = Some(formats);
|
self.formats = Some(formats);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user