Commit a6b307d0 authored by Felix Paul Kühne's avatar Felix Paul Kühne

phone library view: show album name and artist for audio-only media if available

parent f8a81e7a
......@@ -18,6 +18,8 @@
@property (nonatomic, strong) IBOutlet UIImageView *thumbnailView;
@property (nonatomic, strong) IBOutlet VLCLinearProgressIndicator *progressIndicator;
@property (nonatomic, strong) IBOutlet UIImageView *mediaIsUnreadView;
@property (nonatomic, strong) IBOutlet UILabel *artistNameLabel;
@property (nonatomic, strong) IBOutlet UILabel *albumNameLabel;
@property (nonatomic, retain) MLFile *mediaObject;
......
......@@ -66,7 +66,15 @@
{
MLFile *mediaObject = self.mediaObject;
self.titleLabel.text = mediaObject.title;
self.albumNameLabel.text = self.artistNameLabel.text = @"";
if (mediaObject.isAlbumTrack) {
self.artistNameLabel.text = mediaObject.albumTrack.artist;
self.albumNameLabel.text = mediaObject.albumTrack.album.name;
self.titleLabel.text = (mediaObject.albumTrack.title.length > 1) ? mediaObject.albumTrack.title : mediaObject.title;
} else
self.titleLabel.text = mediaObject.title;
if (self.isEditing)
self.subtitleLabel.text = [NSString stringWithFormat:@"%@ — %i MB", [VLCTime timeWithNumber:[mediaObject duration]], (int)([mediaObject fileSizeInBytes] / 1e6)];
else {
......
......@@ -47,10 +47,77 @@
<string key="NSFrame">{{5, 5}, {124, 70}}</string>
<reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="426150815"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
</object>
<object class="IBUILabel" id="426150815">
<reference key="NSNextResponder" ref="162418872"/>
<int key="NSvFlags">290</int>
<string key="NSFrame">{{6, 7}, {122, 42}}</string>
<reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="775158982"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Artist Name</string>
<object class="NSColor" key="IBUITextColor" id="654385816">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<reference key="IBUIHighlightedColor" ref="654385816"/>
<float key="IBUIMinimumFontSize">9</float>
<bool key="IBUIAdjustsLetterSpacingToFitWidth">YES</bool>
<int key="IBUITextAlignment">1</int>
<int key="IBUILineBreakMode">0</int>
<object class="IBUIFontDescription" key="IBUIFontDescription" id="774460032">
<int key="type">1</int>
<double key="pointSize">17</double>
</object>
<object class="NSFont" key="IBUIFont" id="36986489">
<string key="NSName">Helvetica</string>
<double key="NSSize">17</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUILabel" id="807133893">
<reference key="NSNextResponder" ref="162418872"/>
<int key="NSvFlags">290</int>
<string key="NSFrame">{{6, 44}, {122, 15}}</string>
<reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="207506414"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<int key="IBUIContentMode">7</int>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string key="IBUIText">Album Name</string>
<object class="NSColor" key="IBUITextColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC43MgA</bytes>
</object>
<reference key="IBUIHighlightedColor" ref="654385816"/>
<int key="IBUIBaselineAdjustment">0</int>
<float key="IBUIMinimumFontSize">10</float>
<bool key="IBUIAdjustsLetterSpacingToFitWidth">YES</bool>
<int key="IBUITextAlignment">1</int>
<int key="IBUILineBreakMode">0</int>
<object class="IBUIFontDescription" key="IBUIFontDescription" id="175567599">
<int key="type">1</int>
<double key="pointSize">12</double>
</object>
<object class="NSFont" key="IBUIFont" id="721212228">
<string key="NSName">Helvetica</string>
<double key="NSSize">12</double>
<int key="NSfFlags">16</int>
</object>
</object>
<object class="IBUIImageView" id="172563179">
<reference key="NSNextResponder" ref="162418872"/>
......@@ -73,7 +140,7 @@
<string key="NSFrame">{{137, 5}, {178, 42}}</string>
<reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="625431089"/>
<reference key="NSNextKeyView" ref="636538169"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
......@@ -81,24 +148,14 @@
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string type="base64-UTF8" key="IBUIText">VGl0bGUgMQpUaXRsZSAyA</string>
<object class="NSColor" key="IBUITextColor" id="654385816">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<reference key="IBUITextColor" ref="654385816"/>
<reference key="IBUIHighlightedColor" ref="654385816"/>
<float key="IBUIMinimumFontSize">9</float>
<bool key="IBUIAdjustsLetterSpacingToFitWidth">YES</bool>
<int key="IBUINumberOfLines">2</int>
<int key="IBUILineBreakMode">0</int>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">17</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">17</double>
<int key="NSfFlags">16</int>
</object>
<reference key="IBUIFontDescription" ref="774460032"/>
<reference key="IBUIFont" ref="36986489"/>
<double key="preferredMaxLayoutWidth">178</double>
</object>
<object class="IBUILabel" id="625431089">
......@@ -107,7 +164,6 @@
<string key="NSFrame">{{137, 55}, {178, 15}}</string>
<reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="636538169"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
......@@ -122,15 +178,8 @@
<reference key="IBUIHighlightedColor" ref="654385816"/>
<int key="IBUIBaselineAdjustment">0</int>
<int key="IBUILineBreakMode">0</int>
<object class="IBUIFontDescription" key="IBUIFontDescription">
<int key="type">1</int>
<double key="pointSize">12</double>
</object>
<object class="NSFont" key="IBUIFont">
<string key="NSName">Helvetica</string>
<double key="NSSize">12</double>
<int key="NSfFlags">16</int>
</object>
<reference key="IBUIFontDescription" ref="175567599"/>
<reference key="IBUIFont" ref="721212228"/>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool>
</object>
<object class="IBUIImageView" id="775158982">
......@@ -139,7 +188,7 @@
<string key="NSFrame">{{99, 5}, {31, 31}}</string>
<reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="207506414"/>
<reference key="NSNextKeyView" ref="807133893"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
......@@ -154,6 +203,7 @@
<string key="NSFrame">{{6, 64}, {122, 10}}</string>
<reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="625431089"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor" id="698237866">
<int key="NSColorSpace">3</int>
......@@ -233,6 +283,22 @@
</object>
<int key="connectionID">28</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">albumNameLabel</string>
<reference key="source" ref="962619467"/>
<reference key="destination" ref="807133893"/>
</object>
<int key="connectionID">31</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">artistNameLabel</string>
<reference key="source" ref="962619467"/>
<reference key="destination" ref="426150815"/>
</object>
<int key="connectionID">32</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
......@@ -263,6 +329,8 @@
<reference ref="775158982"/>
<reference ref="172563179"/>
<reference ref="636538169"/>
<reference ref="807133893"/>
<reference ref="426150815"/>
</array>
<reference key="parent" ref="0"/>
</object>
......@@ -296,6 +364,16 @@
<reference key="object" ref="636538169"/>
<reference key="parent" ref="962619467"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">29</int>
<reference key="object" ref="426150815"/>
<reference key="parent" ref="962619467"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">30</int>
<reference key="object" ref="807133893"/>
<reference key="parent" ref="962619467"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
......@@ -306,8 +384,10 @@
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="27.CustomClassName">VLCLinearProgressIndicator</string>
<string key="27.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="29.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="3.CustomClassName">VLCPlaylistTableViewCell</string>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="30.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
......@@ -316,7 +396,7 @@
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">28</int>
<int key="maxID">32</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
......@@ -332,6 +412,8 @@
<string key="className">VLCPlaylistTableViewCell</string>
<string key="superclassName">UITableViewCell</string>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="albumNameLabel">UILabel</string>
<string key="artistNameLabel">UILabel</string>
<string key="mediaIsUnreadView">UIImageView</string>
<string key="progressIndicator">VLCLinearProgressIndicator</string>
<string key="subtitleLabel">UILabel</string>
......@@ -339,6 +421,14 @@
<string key="titleLabel">UILabel</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
<object class="IBToOneOutletInfo" key="albumNameLabel">
<string key="name">albumNameLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="artistNameLabel">
<string key="name">artistNameLabel</string>
<string key="candidateClassName">UILabel</string>
</object>
<object class="IBToOneOutletInfo" key="mediaIsUnreadView">
<string key="name">mediaIsUnreadView</string>
<string key="candidateClassName">UIImageView</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment