OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * Controller of metadata box. | 6 * Controller of metadata box. |
7 * | 7 * |
8 * @param{!MetadataModel} metadataModel | 8 * @param{!MetadataModel} metadataModel |
9 * @param{!FilesMetadataBox} metadataBox | 9 * @param{!FilesMetadataBox} metadataBox |
10 * @param{!FilesQuickView} quickView | 10 * @param{!FilesQuickView} quickView |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 [ | 140 [ |
141 'ifd', | 141 'ifd', |
142 'imageHeight', | 142 'imageHeight', |
143 'imageWidth', | 143 'imageWidth', |
144 'mediaAlbum', | 144 'mediaAlbum', |
145 'mediaArtist', | 145 'mediaArtist', |
146 'mediaDuration', | 146 'mediaDuration', |
147 'mediaGenre', | 147 'mediaGenre', |
148 'mediaTitle', | 148 'mediaTitle', |
149 'mediaTrack', | 149 'mediaTrack', |
| 150 'mediaYearRecorded', |
150 ]) | 151 ]) |
151 .then(function(items) { | 152 .then(function(items) { |
152 var item = items[0]; | 153 var item = items[0]; |
153 this.metadataBox_.ifd = item.ifd || null; | 154 this.metadataBox_.ifd = item.ifd || null; |
154 this.metadataBox_.imageHeight = item.imageHeight || 0; | 155 this.metadataBox_.imageHeight = item.imageHeight || 0; |
155 this.metadataBox_.imageWidth = item.imageWidth || 0; | 156 this.metadataBox_.imageWidth = item.imageWidth || 0; |
156 this.metadataBox_.mediaAlbum = item.mediaAlbum || ''; | 157 this.metadataBox_.mediaAlbum = item.mediaAlbum || ''; |
157 this.metadataBox_.mediaArtist = item.mediaArtist || ''; | 158 this.metadataBox_.mediaArtist = item.mediaArtist || ''; |
158 this.metadataBox_.mediaDuration = item.mediaDuration || 0; | 159 this.metadataBox_.mediaDuration = item.mediaDuration || 0; |
159 this.metadataBox_.mediaGenre = item.mediaGenre || ''; | 160 this.metadataBox_.mediaGenre = item.mediaGenre || ''; |
160 this.metadataBox_.mediaTitle = item.mediaTitle || ''; | 161 this.metadataBox_.mediaTitle = item.mediaTitle || ''; |
161 this.metadataBox_.mediaTrack = item.mediaTrack || 0; | 162 this.metadataBox_.mediaTrack = item.mediaTrack || ''; |
| 163 this.metadataBox_.mediaYearRecorded = item.mediaYearRecorded || ''; |
162 }.bind(this)); | 164 }.bind(this)); |
163 } | 165 } |
164 } | 166 } |
165 }; | 167 }; |
166 | 168 |
167 /** | 169 /** |
168 * Set a current directory's size in metadata box. | 170 * Set a current directory's size in metadata box. |
169 * | 171 * |
170 * @param {!DirectoryEntry} entry | 172 * @param {!DirectoryEntry} entry |
171 * | 173 * |
(...skipping 12 matching lines...) Expand all Loading... |
184 if(chrome.runtime.lastError) { | 186 if(chrome.runtime.lastError) { |
185 this.metadataBox_.isSizeLoading = false; | 187 this.metadataBox_.isSizeLoading = false; |
186 return; | 188 return; |
187 } | 189 } |
188 | 190 |
189 this.metadataBox_.isSizeLoading = false; | 191 this.metadataBox_.isSizeLoading = false; |
190 this.metadataBox_.size = | 192 this.metadataBox_.size = |
191 this.fileMetadataFormatter_.formatSize(size, true); | 193 this.fileMetadataFormatter_.formatSize(size, true); |
192 }.bind(this)); | 194 }.bind(this)); |
193 }; | 195 }; |
OLD | NEW |