builds correctly now
This commit is contained in:
parent
bf9f65fade
commit
0ebdaf2921
2 changed files with 48 additions and 48 deletions
|
@ -332,7 +332,7 @@ impl slide_model::SlideModel {
|
|||
let path =
|
||||
PathBuf::from(slide.video_background.to_string());
|
||||
let screenshot = ffmpeg::bg_path_from_video(&path);
|
||||
let mut screenshot_string = screenshot.into_os_string().into_string().unwrap_or_default();
|
||||
let mut screenshot_string = screenshot.clone().into_os_string().into_string().unwrap_or_default();
|
||||
screenshot_string.insert_str(0, "file://");
|
||||
slide.video_thumbnail = screenshot_string;
|
||||
std::thread::spawn(move || {
|
||||
|
@ -575,9 +575,9 @@ impl slide_model::SlideModel {
|
|||
|
||||
match ty {
|
||||
Some(ty) if ty == QString::from("image") => {
|
||||
slide.ty = ty;
|
||||
slide.image_background = background;
|
||||
slide.video_background = QString::from("");
|
||||
slide.ty = ty.to_string();
|
||||
slide.image_background = background.to_string();
|
||||
slide.video_background = String::from("");
|
||||
slide.slide_index = 0;
|
||||
self.as_mut().insert_slide(&slide, slide_index);
|
||||
debug!("Image added to slide model!");
|
||||
|
@ -589,26 +589,26 @@ impl slide_model::SlideModel {
|
|||
"rust: add song of {:?} length at index {:?}",
|
||||
&count, &slide_index
|
||||
);
|
||||
slide.ty = ty.clone();
|
||||
slide.ty = ty.clone().to_string();
|
||||
// debug!("{:?}", text_vec[i].clone());
|
||||
slide.text = text.clone();
|
||||
slide.text = text.clone().to_string();
|
||||
slide.slide_count = count as i32;
|
||||
slide.slide_index = i as i32;
|
||||
if background_type == QString::from("image") {
|
||||
slide.image_background = background.clone();
|
||||
slide.video_background = QString::from("");
|
||||
slide.image_background = background.clone().to_string();
|
||||
slide.video_background = String::from("");
|
||||
} else {
|
||||
slide.video_background = background.clone();
|
||||
slide.image_background = QString::from("");
|
||||
slide.video_background = background.clone().to_string();
|
||||
slide.image_background = String::from("");
|
||||
}
|
||||
self.as_mut()
|
||||
.insert_slide(&slide, slide_index + i as i32);
|
||||
}
|
||||
}
|
||||
Some(ty) if ty == QString::from("video") => {
|
||||
slide.ty = ty;
|
||||
slide.image_background = QString::from("");
|
||||
slide.video_background = background;
|
||||
slide.ty = ty.to_string();
|
||||
slide.image_background = String::from("");
|
||||
slide.video_background = background.to_string();
|
||||
slide.slide_index = 0;
|
||||
self.as_mut().insert_slide(&slide, slide_index);
|
||||
}
|
||||
|
@ -618,17 +618,17 @@ impl slide_model::SlideModel {
|
|||
&QString::from(".html"),
|
||||
CaseSensitivity::CaseInsensitive,
|
||||
) {
|
||||
slide.ty = ty.clone();
|
||||
slide.ty = ty.clone().to_string();
|
||||
slide.html = true;
|
||||
slide.image_background = background.clone();
|
||||
slide.video_background = QString::from("");
|
||||
slide.image_background = background.clone().to_string();
|
||||
slide.video_background = String::from("");
|
||||
slide.slide_index = 0;
|
||||
self.as_mut().insert_slide(&slide, slide_index);
|
||||
} else {
|
||||
for i in 0..slide.slide_count {
|
||||
slide.ty = ty.clone();
|
||||
slide.image_background = background.clone();
|
||||
slide.video_background = QString::from("");
|
||||
slide.ty = ty.clone().to_string();
|
||||
slide.image_background = background.clone().to_string();
|
||||
slide.video_background = String::from("");
|
||||
slide.slide_index = i;
|
||||
self.as_mut()
|
||||
.insert_slide(&slide, slide_index + i);
|
||||
|
@ -705,32 +705,32 @@ impl slide_model::SlideModel {
|
|||
.get(&QString::from("type"))
|
||||
.unwrap_or(QVariant::from(&QString::from("")))
|
||||
.value()
|
||||
.unwrap_or(QString::from(""));
|
||||
.unwrap_or(QString::from("")).to_string();
|
||||
slide.text = service_item
|
||||
.get(&QString::from("text"))
|
||||
.unwrap_or(QVariant::from(&QString::from("")))
|
||||
.value()
|
||||
.unwrap_or(QString::from(""));
|
||||
.unwrap_or(QString::from("")).to_string();
|
||||
slide.image_background = service_item
|
||||
.get(&QString::from("imageBackground"))
|
||||
.unwrap_or(QVariant::from(&QString::from("")))
|
||||
.value()
|
||||
.unwrap_or(QString::from(""));
|
||||
.unwrap_or(QString::from("")).to_string();
|
||||
slide.video_background = service_item
|
||||
.get(&QString::from("videoBackground"))
|
||||
.unwrap_or(QVariant::from(&QString::from("")))
|
||||
.value()
|
||||
.unwrap_or(QString::from(""));
|
||||
.unwrap_or(QString::from("")).to_string();
|
||||
slide.audio = service_item
|
||||
.get(&QString::from("audio"))
|
||||
.unwrap_or(QVariant::from(&QString::from("")))
|
||||
.value()
|
||||
.unwrap_or(QString::from(""));
|
||||
.unwrap_or(QString::from("")).to_string();
|
||||
slide.font = service_item
|
||||
.get(&QString::from("font"))
|
||||
.unwrap_or(QVariant::from(&QString::from("")))
|
||||
.value()
|
||||
.unwrap_or(QString::from(""));
|
||||
.unwrap_or(QString::from("")).to_string();
|
||||
slide.font_size = service_item
|
||||
.get(&QString::from("fontSize"))
|
||||
.unwrap_or(QVariant::from(&50))
|
||||
|
@ -740,12 +740,12 @@ impl slide_model::SlideModel {
|
|||
.get(&QString::from("vtextAlignment"))
|
||||
.unwrap_or(QVariant::from(&QString::from("center")))
|
||||
.value()
|
||||
.unwrap_or(QString::from("center"));
|
||||
.unwrap_or(QString::from("center")).to_string();
|
||||
slide.vtext_alignment = service_item
|
||||
.get(&QString::from("vtextAlignment"))
|
||||
.unwrap_or(QVariant::from(&QString::from("center")))
|
||||
.value()
|
||||
.unwrap_or(QString::from("center"));
|
||||
.unwrap_or(QString::from("center")).to_string();
|
||||
slide.service_item_id = index;
|
||||
slide.slide_index = service_item
|
||||
.get(&QString::from("slideNumber"))
|
||||
|
@ -772,37 +772,37 @@ impl slide_model::SlideModel {
|
|||
.unwrap_or(QVariant::from(&false))
|
||||
.value()
|
||||
.unwrap_or(false);
|
||||
slide.video_thumbnail = QString::from("");
|
||||
slide.video_thumbnail = String::from("");
|
||||
|
||||
match ty {
|
||||
Some(ty) if ty == QString::from("image") => {
|
||||
slide.ty = ty;
|
||||
slide.image_background = background;
|
||||
slide.video_background = QString::from("");
|
||||
slide.ty = ty.to_string();
|
||||
slide.image_background = background.to_string();
|
||||
slide.video_background = String::from("");
|
||||
slide.slide_index = 0;
|
||||
self.as_mut().add_slide(&slide);
|
||||
}
|
||||
Some(ty) if ty == QString::from("song") => {
|
||||
for (i, text) in text_vec.iter().enumerate() {
|
||||
slide.ty = ty.clone();
|
||||
slide.ty = ty.clone().to_string();
|
||||
// debug!("{:?}", text_vec[i].clone());
|
||||
slide.text = text.clone();
|
||||
slide.text = text.clone().to_string();
|
||||
slide.slide_count = text_vec.len() as i32;
|
||||
slide.slide_index = i as i32;
|
||||
if background_type == QString::from("image") {
|
||||
slide.image_background = background.clone();
|
||||
slide.video_background = QString::from("");
|
||||
slide.image_background = background.clone().to_string();
|
||||
slide.video_background = String::from("");
|
||||
} else {
|
||||
slide.video_background = background.clone();
|
||||
slide.image_background = QString::from("");
|
||||
slide.video_background = background.clone().to_string();
|
||||
slide.image_background = String::from("");
|
||||
}
|
||||
self.as_mut().add_slide(&slide);
|
||||
}
|
||||
}
|
||||
Some(ty) if ty == QString::from("video") => {
|
||||
slide.ty = ty;
|
||||
slide.image_background = QString::from("");
|
||||
slide.video_background = background;
|
||||
slide.ty = ty.to_string();
|
||||
slide.image_background = String::from("");
|
||||
slide.video_background = background.to_string();
|
||||
slide.slide_index = 0;
|
||||
self.as_mut().add_slide(&slide);
|
||||
}
|
||||
|
@ -812,17 +812,17 @@ impl slide_model::SlideModel {
|
|||
&QString::from(".html"),
|
||||
CaseSensitivity::CaseInsensitive,
|
||||
) {
|
||||
slide.ty = ty.clone();
|
||||
slide.ty = ty.clone().to_string();
|
||||
slide.html = true;
|
||||
slide.image_background = background.clone();
|
||||
slide.video_background = QString::from("");
|
||||
slide.image_background = background.clone().to_string();
|
||||
slide.video_background = String::from("");
|
||||
slide.slide_index = 0;
|
||||
self.as_mut().add_slide(&slide);
|
||||
} else {
|
||||
for i in 0..slide.slide_count {
|
||||
slide.ty = ty.clone();
|
||||
slide.image_background = background.clone();
|
||||
slide.video_background = QString::from("");
|
||||
slide.ty = ty.clone().to_string();
|
||||
slide.image_background = background.clone().to_string();
|
||||
slide.video_background = String::from("");
|
||||
slide.slide_index = i;
|
||||
self.as_mut().add_slide(&slide);
|
||||
}
|
||||
|
@ -1213,7 +1213,7 @@ impl slide_model::SlideModel {
|
|||
if let Some(slide) =
|
||||
self.as_mut().rust_mut().slides.get_mut(index as usize)
|
||||
{
|
||||
slide.obs_scene = obs_scene;
|
||||
slide.obs_scene = obs_scene.to_string();
|
||||
self.as_mut().data_changed(tl, br, &vector_roles);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue