Don't override picture orientation.
This commit is contained in:
parent
914d68acf0
commit
408a7be248
@ -61,7 +61,6 @@ impl Photo {
|
|||||||
newwidth: i32,
|
newwidth: i32,
|
||||||
newheight: i32,
|
newheight: i32,
|
||||||
exifdate: Option<NaiveDateTime>,
|
exifdate: Option<NaiveDateTime>,
|
||||||
exifrotation: i16,
|
|
||||||
camera: &Option<Camera>,
|
camera: &Option<Camera>,
|
||||||
) -> Result<Option<Modification<Photo>>, DieselError> {
|
) -> Result<Option<Modification<Photo>>, DieselError> {
|
||||||
use diesel;
|
use diesel;
|
||||||
@ -86,12 +85,6 @@ impl Photo {
|
|||||||
.set(date.eq(exifdate))
|
.set(date.eq(exifdate))
|
||||||
.get_result::<Photo>(db)?;
|
.get_result::<Photo>(db)?;
|
||||||
}
|
}
|
||||||
if exifrotation != pic.rotation {
|
|
||||||
change = true;
|
|
||||||
pic = diesel::update(photos.find(pic.id))
|
|
||||||
.set(rotation.eq(exifrotation))
|
|
||||||
.get_result::<Photo>(db)?;
|
|
||||||
}
|
|
||||||
if let Some(ref camera) = *camera {
|
if let Some(ref camera) = *camera {
|
||||||
if pic.camera_id != Some(camera.id) {
|
if pic.camera_id != Some(camera.id) {
|
||||||
change = true;
|
change = true;
|
||||||
@ -128,7 +121,6 @@ impl Photo {
|
|||||||
newwidth,
|
newwidth,
|
||||||
newheight,
|
newheight,
|
||||||
exifdate,
|
exifdate,
|
||||||
exifrotation,
|
|
||||||
&camera,
|
&camera,
|
||||||
)? {
|
)? {
|
||||||
Ok(result)
|
Ok(result)
|
||||||
|
Loading…
Reference in New Issue
Block a user