bug: fixing all video updating of properties
This commit is contained in:
parent
6765a66e28
commit
b4648edde2
1 changed files with 17 additions and 7 deletions
|
@ -270,12 +270,15 @@ mod video_model {
|
||||||
.execute(db);
|
.execute(db);
|
||||||
match result {
|
match result {
|
||||||
Ok(_i) => {
|
Ok(_i) => {
|
||||||
for video in self.as_mut().videos_mut().iter_mut() {
|
for video in self
|
||||||
if video.id == index {
|
.as_mut()
|
||||||
|
.videos_mut()
|
||||||
|
.iter_mut()
|
||||||
|
.filter(|x| x.id == index)
|
||||||
|
{
|
||||||
video.looping = loop_value.clone();
|
video.looping = loop_value.clone();
|
||||||
println!("rust-video: {:?}", video.title);
|
println!("rust-video: {:?}", video.title);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
self.as_mut()
|
self.as_mut()
|
||||||
.emit_data_changed(model_index, model_index, &vector_roles);
|
.emit_data_changed(model_index, model_index, &vector_roles);
|
||||||
println!("rust-looping: {:?}", loop_value);
|
println!("rust-looping: {:?}", loop_value);
|
||||||
|
@ -395,8 +398,15 @@ mod video_model {
|
||||||
.execute(db);
|
.execute(db);
|
||||||
match result {
|
match result {
|
||||||
Ok(_i) => {
|
Ok(_i) => {
|
||||||
let video = self.as_mut().videos_mut().get_mut(index as usize).unwrap();
|
for video in self
|
||||||
|
.as_mut()
|
||||||
|
.videos_mut()
|
||||||
|
.iter_mut()
|
||||||
|
.filter(|x| x.id == index)
|
||||||
|
{
|
||||||
video.path = updated_path.clone();
|
video.path = updated_path.clone();
|
||||||
|
println!("rust-title: {:?}", video.title);
|
||||||
|
}
|
||||||
self.as_mut()
|
self.as_mut()
|
||||||
.emit_data_changed(model_index, model_index, &vector_roles);
|
.emit_data_changed(model_index, model_index, &vector_roles);
|
||||||
println!("rust-path: {:?}", updated_path);
|
println!("rust-path: {:?}", updated_path);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue