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 @@ ...@@ -18,6 +18,8 @@
@property (nonatomic, strong) IBOutlet UIImageView *thumbnailView; @property (nonatomic, strong) IBOutlet UIImageView *thumbnailView;
@property (nonatomic, strong) IBOutlet VLCLinearProgressIndicator *progressIndicator; @property (nonatomic, strong) IBOutlet VLCLinearProgressIndicator *progressIndicator;
@property (nonatomic, strong) IBOutlet UIImageView *mediaIsUnreadView; @property (nonatomic, strong) IBOutlet UIImageView *mediaIsUnreadView;
@property (nonatomic, strong) IBOutlet UILabel *artistNameLabel;
@property (nonatomic, strong) IBOutlet UILabel *albumNameLabel;
@property (nonatomic, retain) MLFile *mediaObject; @property (nonatomic, retain) MLFile *mediaObject;
......
...@@ -66,7 +66,15 @@ ...@@ -66,7 +66,15 @@
{ {
MLFile *mediaObject = self.mediaObject; 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) if (self.isEditing)
self.subtitleLabel.text = [NSString stringWithFormat:@"%@ — %i MB", [VLCTime timeWithNumber:[mediaObject duration]], (int)([mediaObject fileSizeInBytes] / 1e6)]; self.subtitleLabel.text = [NSString stringWithFormat:@"%@ — %i MB", [VLCTime timeWithNumber:[mediaObject duration]], (int)([mediaObject fileSizeInBytes] / 1e6)];
else { else {
......
...@@ -47,10 +47,77 @@ ...@@ -47,10 +47,77 @@
<string key="NSFrame">{{5, 5}, {124, 70}}</string> <string key="NSFrame">{{5, 5}, {124, 70}}</string>
<reference key="NSSuperview" ref="162418872"/> <reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/> <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"/> <reference key="NSNextKeyView" ref="775158982"/>
<string key="NSReuseIdentifierKey">_NS:9</string> <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> <bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> <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>
<object class="IBUIImageView" id="172563179"> <object class="IBUIImageView" id="172563179">
<reference key="NSNextResponder" ref="162418872"/> <reference key="NSNextResponder" ref="162418872"/>
...@@ -73,7 +140,7 @@ ...@@ -73,7 +140,7 @@
<string key="NSFrame">{{137, 5}, {178, 42}}</string> <string key="NSFrame">{{137, 5}, {178, 42}}</string>
<reference key="NSSuperview" ref="162418872"/> <reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/> <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="625431089"/> <reference key="NSNextKeyView" ref="636538169"/>
<string key="NSReuseIdentifierKey">_NS:9</string> <string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool> <bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool> <bool key="IBUIClipsSubviews">YES</bool>
...@@ -81,24 +148,14 @@ ...@@ -81,24 +148,14 @@
<bool key="IBUIUserInteractionEnabled">NO</bool> <bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<string type="base64-UTF8" key="IBUIText">VGl0bGUgMQpUaXRsZSAyA</string> <string type="base64-UTF8" key="IBUIText">VGl0bGUgMQpUaXRsZSAyA</string>
<object class="NSColor" key="IBUITextColor" id="654385816"> <reference key="IBUITextColor" ref="654385816"/>
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<reference key="IBUIHighlightedColor" ref="654385816"/> <reference key="IBUIHighlightedColor" ref="654385816"/>
<float key="IBUIMinimumFontSize">9</float> <float key="IBUIMinimumFontSize">9</float>
<bool key="IBUIAdjustsLetterSpacingToFitWidth">YES</bool> <bool key="IBUIAdjustsLetterSpacingToFitWidth">YES</bool>
<int key="IBUINumberOfLines">2</int> <int key="IBUINumberOfLines">2</int>
<int key="IBUILineBreakMode">0</int> <int key="IBUILineBreakMode">0</int>
<object class="IBUIFontDescription" key="IBUIFontDescription"> <reference key="IBUIFontDescription" ref="774460032"/>
<int key="type">1</int> <reference key="IBUIFont" ref="36986489"/>
<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>
<double key="preferredMaxLayoutWidth">178</double> <double key="preferredMaxLayoutWidth">178</double>
</object> </object>
<object class="IBUILabel" id="625431089"> <object class="IBUILabel" id="625431089">
...@@ -107,7 +164,6 @@ ...@@ -107,7 +164,6 @@
<string key="NSFrame">{{137, 55}, {178, 15}}</string> <string key="NSFrame">{{137, 55}, {178, 15}}</string>
<reference key="NSSuperview" ref="162418872"/> <reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/> <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="636538169"/>
<string key="NSReuseIdentifierKey">_NS:9</string> <string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIOpaque">NO</bool> <bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool> <bool key="IBUIClipsSubviews">YES</bool>
...@@ -122,15 +178,8 @@ ...@@ -122,15 +178,8 @@
<reference key="IBUIHighlightedColor" ref="654385816"/> <reference key="IBUIHighlightedColor" ref="654385816"/>
<int key="IBUIBaselineAdjustment">0</int> <int key="IBUIBaselineAdjustment">0</int>
<int key="IBUILineBreakMode">0</int> <int key="IBUILineBreakMode">0</int>
<object class="IBUIFontDescription" key="IBUIFontDescription"> <reference key="IBUIFontDescription" ref="175567599"/>
<int key="type">1</int> <reference key="IBUIFont" ref="721212228"/>
<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>
<bool key="IBUIAdjustsFontSizeToFit">NO</bool> <bool key="IBUIAdjustsFontSizeToFit">NO</bool>
</object> </object>
<object class="IBUIImageView" id="775158982"> <object class="IBUIImageView" id="775158982">
...@@ -139,7 +188,7 @@ ...@@ -139,7 +188,7 @@
<string key="NSFrame">{{99, 5}, {31, 31}}</string> <string key="NSFrame">{{99, 5}, {31, 31}}</string>
<reference key="NSSuperview" ref="162418872"/> <reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/> <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="207506414"/> <reference key="NSNextKeyView" ref="807133893"/>
<string key="NSReuseIdentifierKey">_NS:9</string> <string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="IBUIUserInteractionEnabled">NO</bool> <bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
...@@ -154,6 +203,7 @@ ...@@ -154,6 +203,7 @@
<string key="NSFrame">{{6, 64}, {122, 10}}</string> <string key="NSFrame">{{6, 64}, {122, 10}}</string>
<reference key="NSSuperview" ref="162418872"/> <reference key="NSSuperview" ref="162418872"/>
<reference key="NSWindow"/> <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="625431089"/>
<string key="NSReuseIdentifierKey">_NS:9</string> <string key="NSReuseIdentifierKey">_NS:9</string>
<object class="NSColor" key="IBUIBackgroundColor" id="698237866"> <object class="NSColor" key="IBUIBackgroundColor" id="698237866">
<int key="NSColorSpace">3</int> <int key="NSColorSpace">3</int>
...@@ -233,6 +283,22 @@ ...@@ -233,6 +283,22 @@
</object> </object>
<int key="connectionID">28</int> <int key="connectionID">28</int>
</object> </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> </array>
<object class="IBMutableOrderedSet" key="objectRecords"> <object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects"> <array key="orderedObjects">
...@@ -263,6 +329,8 @@ ...@@ -263,6 +329,8 @@
<reference ref="775158982"/> <reference ref="775158982"/>
<reference ref="172563179"/> <reference ref="172563179"/>
<reference ref="636538169"/> <reference ref="636538169"/>
<reference ref="807133893"/>
<reference ref="426150815"/>
</array> </array>
<reference key="parent" ref="0"/> <reference key="parent" ref="0"/>
</object> </object>
...@@ -296,6 +364,16 @@ ...@@ -296,6 +364,16 @@
<reference key="object" ref="636538169"/> <reference key="object" ref="636538169"/>
<reference key="parent" ref="962619467"/> <reference key="parent" ref="962619467"/>
</object> </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> </array>
</object> </object>
<dictionary class="NSMutableDictionary" key="flattenedProperties"> <dictionary class="NSMutableDictionary" key="flattenedProperties">
...@@ -306,8 +384,10 @@ ...@@ -306,8 +384,10 @@
<string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="22.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="27.CustomClassName">VLCLinearProgressIndicator</string> <string key="27.CustomClassName">VLCLinearProgressIndicator</string>
<string key="27.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</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.CustomClassName">VLCPlaylistTableViewCell</string>
<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</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="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> <string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
...@@ -316,7 +396,7 @@ ...@@ -316,7 +396,7 @@
<nil key="activeLocalization"/> <nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/> <dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/> <nil key="sourceID"/>
<int key="maxID">28</int> <int key="maxID">32</int>
</object> </object>
<object class="IBClassDescriber" key="IBDocument.Classes"> <object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions"> <array class="NSMutableArray" key="referencedPartialClassDescriptions">
...@@ -332,6 +412,8 @@ ...@@ -332,6 +412,8 @@
<string key="className">VLCPlaylistTableViewCell</string> <string key="className">VLCPlaylistTableViewCell</string>
<string key="superclassName">UITableViewCell</string> <string key="superclassName">UITableViewCell</string>
<dictionary class="NSMutableDictionary" key="outlets"> <dictionary class="NSMutableDictionary" key="outlets">
<string key="albumNameLabel">UILabel</string>
<string key="artistNameLabel">UILabel</string>
<string key="mediaIsUnreadView">UIImageView</string> <string key="mediaIsUnreadView">UIImageView</string>
<string key="progressIndicator">VLCLinearProgressIndicator</string> <string key="progressIndicator">VLCLinearProgressIndicator</string>
<string key="subtitleLabel">UILabel</string> <string key="subtitleLabel">UILabel</string>
...@@ -339,6 +421,14 @@ ...@@ -339,6 +421,14 @@
<string key="titleLabel">UILabel</string> <string key="titleLabel">UILabel</string>
</dictionary> </dictionary>
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName"> <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"> <object class="IBToOneOutletInfo" key="mediaIsUnreadView">
<string key="name">mediaIsUnreadView</string> <string key="name">mediaIsUnreadView</string>
<string key="candidateClassName">UIImageView</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