Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(526)

Unified Diff: ui/file_manager/file_manager/foreground/js/metadata_box_controller.js

Issue 2514323002: Show media album title in Quick View metadata box. (Closed)
Patch Set: Format. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/metadata/metadata_item.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/metadata_box_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/metadata_box_controller.js b/ui/file_manager/file_manager/foreground/js/metadata_box_controller.js
index 6d0b286dc4e652f2a734f3e9248d3b017b438932..a7aa68554b41f249f1c202a88c6b5c97e881842a 100644
--- a/ui/file_manager/file_manager/foreground/js/metadata_box_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/metadata_box_controller.js
@@ -125,8 +125,6 @@ MetadataBoxController.prototype.onGeneralMetadataLoaded_ = function(
}.bind(this));
}
- var type = FileType.getType(entry).type;
- this.metadataBox_.type = type;
if (['image', 'video', 'audio'].includes(type)) {
if (item.externalFileUrl) {
this.metadataModel_.get([entry], ['imageHeight', 'imageWidth'])
@@ -139,13 +137,20 @@ MetadataBoxController.prototype.onGeneralMetadataLoaded_ = function(
this.metadataModel_
.get(
[entry],
- ['imageHeight', 'imageWidth', 'mediaArtist', 'mediaTitle'])
+ [
+ 'imageHeight',
+ 'imageWidth',
+ 'mediaAlbum',
+ 'mediaArtist',
+ 'mediaTitle'
+ ])
.then(function(items) {
var item = items[0];
- this.metadataBox_.imageHeight = item.imageHeight;
- this.metadataBox_.imageWidth = item.imageWidth;
- this.metadataBox_.mediaArtist = item.mediaArtist;
- this.metadataBox_.mediaTitle = item.mediaTitle;
+ this.metadataBox_.imageHeight = item.imageHeight || 0;
+ this.metadataBox_.imageWidth = item.imageWidth || 0;
+ this.metadataBox_.mediaAlbum = item.mediaAlbum || '';
+ this.metadataBox_.mediaArtist = item.mediaArtist || '';
+ this.metadataBox_.mediaTitle = item.mediaTitle || '';
}.bind(this));
}
}
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/metadata/metadata_item.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698