Fix #69 (nice)

This commit is contained in:
Grishka 2023-01-22 02:04:12 +03:00
parent ddfeaabd44
commit 7bb280e8b8
1 changed files with 4 additions and 4 deletions

View File

@ -45,26 +45,26 @@ public class Attachment extends BaseModel{
public int getWidth(){ public int getWidth(){
if(meta==null) if(meta==null)
return 0; return 1920;
if(meta.width>0) if(meta.width>0)
return meta.width; return meta.width;
if(meta.original!=null && meta.original.width>0) if(meta.original!=null && meta.original.width>0)
return meta.original.width; return meta.original.width;
if(meta.small!=null && meta.small.width>0) if(meta.small!=null && meta.small.width>0)
return meta.small.width; return meta.small.width;
return 0; return 1920;
} }
public int getHeight(){ public int getHeight(){
if(meta==null) if(meta==null)
return 0; return 1080;
if(meta.height>0) if(meta.height>0)
return meta.height; return meta.height;
if(meta.original!=null && meta.original.height>0) if(meta.original!=null && meta.original.height>0)
return meta.original.height; return meta.original.height;
if(meta.small!=null && meta.small.height>0) if(meta.small!=null && meta.small.height>0)
return meta.small.height; return meta.small.height;
return 0; return 1080;
} }
public double getDuration(){ public double getDuration(){