Commit ee7783e6 authored by David Fuhrmann's avatar David Fuhrmann Committed by Felix Paul Kühne

macosx: simplify playlist duration calculation

(cherry picked from commit 6e24206e034f6bafc3a8d552b5f281a3512100eb)
Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 1f363525
...@@ -949,14 +949,13 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -949,14 +949,13 @@ static VLCMainWindow *_o_sharedInstance = nil;
{ {
playlist_t * p_playlist = pl_Get(VLCIntf); playlist_t * p_playlist = pl_Get(VLCIntf);
PL_LOCK; PL_LOCK;
playlist_item_t * currentPlaylistRoot = [[[VLCMain sharedInstance] playlist] currentPlaylistRoot]; playlist_item_t *currentPlaylistRoot = [[[VLCMain sharedInstance] playlist] currentPlaylistRoot];
PL_UNLOCK; PL_UNLOCK;
if (currentPlaylistRoot == p_playlist->p_local_category || currentPlaylistRoot == p_playlist->p_ml_category) {
if (currentPlaylistRoot == p_playlist->p_local_category) if (currentPlaylistRoot == p_playlist->p_local_category)
[o_chosen_category_lbl setStringValue: [_NS("Playlist") stringByAppendingString:[self _playbackDurationOfNode:p_playlist->p_local_category]]]; [o_chosen_category_lbl setStringValue: [_NS("Playlist") stringByAppendingString:[self _playbackDurationOfNode:p_playlist->p_local_category]]];
else else if (currentPlaylistRoot == p_playlist->p_ml_category)
[o_chosen_category_lbl setStringValue: [_NS("Media Library") stringByAppendingString:[self _playbackDurationOfNode:p_playlist->p_ml_category]]]; [o_chosen_category_lbl setStringValue: [_NS("Media Library") stringByAppendingString:[self _playbackDurationOfNode:p_playlist->p_ml_category]]];
}
} }
- (NSString *)_playbackDurationOfNode:(playlist_item_t*)node - (NSString *)_playbackDurationOfNode:(playlist_item_t*)node
......
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