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