Skip to content

Commit

Permalink
refactor: check picture type by media field
Browse files Browse the repository at this point in the history
  • Loading branch information
Ascenio committed May 8, 2024
1 parent e414381 commit 791698c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PictureModel extends PictureEntity {
title: json['title'],
explanation: json['explanation'],
date: DateTime.parse(json['date']),
isVideo: url.host == 'www.youtube.com' || url.host == 'youtube.com',
isVideo: json['media_type'] == 'video',
);
}
}

0 comments on commit 791698c

Please sign in to comment.