Commit 1a5a6b89 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

macosx: Add a link to the playlistitem menu to retrieve Cover Art.

This is based on code that is also used to force preparsing of the file, and
as such likely as working and broken as that.
parent b0438df5
......@@ -462,25 +462,25 @@
</dict>
<dict>
<key>CLASS</key>
<string>FirstResponder</string>
<string>ITSlider</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
<string>NSSlider</string>
</dict>
<dict>
<key>CLASS</key>
<string>ITSlider</string>
<string>NSObject</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSSlider</string>
</dict>
<dict>
<key>CLASS</key>
<string>NSObject</string>
<string>FirstResponder</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
<dict>
<key>ACTIONS</key>
......@@ -703,6 +703,8 @@
<string>id</string>
<key>deleteItem</key>
<string>id</string>
<key>downloadCoverArt</key>
<string>id</string>
<key>playItem</key>
<string>id</string>
<key>preparseItem</key>
......@@ -740,6 +742,8 @@
<string>id</string>
<key>o_mi_delete</key>
<string>id</string>
<key>o_mi_dl_cover_art</key>
<string>id</string>
<key>o_mi_info</key>
<string>id</string>
<key>o_mi_play</key>
......
......@@ -10,13 +10,10 @@
<integer>4</integer>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>2416</integer>
<integer>915</integer>
<integer>1617</integer>
<integer>3568</integer>
<integer>24</integer>
<integer>915</integer>
<integer>21</integer>
<integer>3706</integer>
</array>
<key>IBSystem Version</key>
<string>9F33</string>
......
{
IBClasses = (
{
CLASS = NSApplication;
LANGUAGE = ObjC;
SUPERCLASS = NSResponder;
},
{
CLASS = NSObject;
LANGUAGE = ObjC;
},
{
CLASS = NSTextField;
LANGUAGE = ObjC;
SUPERCLASS = NSControl;
},
{
ACTIONS = {
createOutlineGroup = id;
deleteOutlineGroup = id;
metaFieldChanged = id;
saveMetaData = id;
};
CLASS = VLCInfo;
LANGUAGE = ObjC;
OUTLETS = {
"o_audio_box" = id;
"o_audio_decoded_lbl" = id;
"o_audio_decoded_txt" = id;
"o_author_lbl" = id;
"o_author_txt" = id;
"o_collection_lbl" = id;
"o_collection_txt" = id;
"o_copyright_lbl" = id;
"o_copyright_txt" = id;
"o_date_lbl" = id;
"o_date_txt" = id;
"o_demux_bitrate_lbl" = id;
"o_demux_bitrate_txt" = id;
"o_demux_bytes_lbl" = id;
"o_demux_bytes_txt" = id;
"o_description_lbl" = id;
"o_description_txt" = id;
"o_displayed_lbl" = id;
"o_displayed_txt" = id;
"o_fps_lbl" = id;
"o_fps_txt" = id;
"o_genre_lbl" = id;
"o_genre_txt" = id;
"o_image_well" = id;
"o_info_window" = id;
"o_input_bitrate_lbl" = id;
"o_input_bitrate_txt" = id;
"o_input_box" = id;
"o_language_lbl" = id;
"o_language_txt" = id;
"o_lost_abuffers_lbl" = id;
"o_lost_abuffers_txt" = id;
"o_lost_frames_lbl" = id;
"o_lost_frames_txt" = id;
"o_nowPlaying_lbl" = id;
"o_nowPlaying_txt" = id;
"o_outline_view" = id;
"o_played_abuffers_lbl" = id;
"o_played_abuffers_txt" = id;
"o_publisher_lbl" = id;
"o_publisher_txt" = id;
"o_read_bytes_lbl" = id;
"o_read_bytes_txt" = id;
"o_saveMetaData_btn" = id;
"o_sent_bitrate_lbl" = id;
"o_sent_bitrate_txt" = id;
"o_sent_bytes_lbl" = id;
"o_sent_bytes_txt" = id;
"o_sent_packets_lbl" = id;
"o_sent_packets_txt" = id;
"o_seqNum_lbl" = id;
"o_seqNum_txt" = id;
"o_sout_box" = id;
"o_tab_view" = id;
"o_title_lbl" = id;
"o_title_txt" = id;
"o_uri_lbl" = id;
"o_uri_txt" = id;
"o_video_box" = id;
"o_video_decoded_lbl" = id;
"o_video_decoded_txt" = id;
};
SUPERCLASS = NSObject;
}
);
IBVersion = 1;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBClasses</key>
<array>
<dict>
<key>CLASS</key>
<string>NSApplication</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSResponder</string>
</dict>
<dict>
<key>CLASS</key>
<string>NSTextField</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>SUPERCLASS</key>
<string>NSControl</string>
</dict>
<dict>
<key>CLASS</key>
<string>NSObject</string>
<key>LANGUAGE</key>
<string>ObjC</string>
</dict>
<dict>
<key>ACTIONS</key>
<dict>
<key>createOutlineGroup</key>
<string>id</string>
<key>deleteOutlineGroup</key>
<string>id</string>
<key>downloadCoverArt</key>
<string>id</string>
<key>metaFieldChanged</key>
<string>id</string>
<key>saveMetaData</key>
<string>id</string>
</dict>
<key>CLASS</key>
<string>VLCInfo</string>
<key>LANGUAGE</key>
<string>ObjC</string>
<key>OUTLETS</key>
<dict>
<key>o_audio_box</key>
<string>id</string>
<key>o_audio_decoded_lbl</key>
<string>id</string>
<key>o_audio_decoded_txt</key>
<string>id</string>
<key>o_author_lbl</key>
<string>id</string>
<key>o_author_txt</key>
<string>id</string>
<key>o_collection_lbl</key>
<string>id</string>
<key>o_collection_txt</key>
<string>id</string>
<key>o_copyright_lbl</key>
<string>id</string>
<key>o_copyright_txt</key>
<string>id</string>
<key>o_date_lbl</key>
<string>id</string>
<key>o_date_txt</key>
<string>id</string>
<key>o_demux_bitrate_lbl</key>
<string>id</string>
<key>o_demux_bitrate_txt</key>
<string>id</string>
<key>o_demux_bytes_lbl</key>
<string>id</string>
<key>o_demux_bytes_txt</key>
<string>id</string>
<key>o_description_lbl</key>
<string>id</string>
<key>o_description_txt</key>
<string>id</string>
<key>o_displayed_lbl</key>
<string>id</string>
<key>o_displayed_txt</key>
<string>id</string>
<key>o_fps_lbl</key>
<string>id</string>
<key>o_fps_txt</key>
<string>id</string>
<key>o_genre_lbl</key>
<string>id</string>
<key>o_genre_txt</key>
<string>id</string>
<key>o_image_well</key>
<string>id</string>
<key>o_info_window</key>
<string>id</string>
<key>o_input_bitrate_lbl</key>
<string>id</string>
<key>o_input_bitrate_txt</key>
<string>id</string>
<key>o_input_box</key>
<string>id</string>
<key>o_language_lbl</key>
<string>id</string>
<key>o_language_txt</key>
<string>id</string>
<key>o_lost_abuffers_lbl</key>
<string>id</string>
<key>o_lost_abuffers_txt</key>
<string>id</string>
<key>o_lost_frames_lbl</key>
<string>id</string>
<key>o_lost_frames_txt</key>
<string>id</string>
<key>o_nowPlaying_lbl</key>
<string>id</string>
<key>o_nowPlaying_txt</key>
<string>id</string>
<key>o_outline_view</key>
<string>id</string>
<key>o_played_abuffers_lbl</key>
<string>id</string>
<key>o_played_abuffers_txt</key>
<string>id</string>
<key>o_publisher_lbl</key>
<string>id</string>
<key>o_publisher_txt</key>
<string>id</string>
<key>o_read_bytes_lbl</key>
<string>id</string>
<key>o_read_bytes_txt</key>
<string>id</string>
<key>o_saveMetaData_btn</key>
<string>id</string>
<key>o_sent_bitrate_lbl</key>
<string>id</string>
<key>o_sent_bitrate_txt</key>
<string>id</string>
<key>o_sent_bytes_lbl</key>
<string>id</string>
<key>o_sent_bytes_txt</key>
<string>id</string>
<key>o_sent_packets_lbl</key>
<string>id</string>
<key>o_sent_packets_txt</key>
<string>id</string>
<key>o_seqNum_lbl</key>
<string>id</string>
<key>o_seqNum_txt</key>
<string>id</string>
<key>o_sout_box</key>
<string>id</string>
<key>o_tab_view</key>
<string>id</string>
<key>o_title_lbl</key>
<string>id</string>
<key>o_title_txt</key>
<string>id</string>
<key>o_uri_lbl</key>
<string>id</string>
<key>o_uri_txt</key>
<string>id</string>
<key>o_video_box</key>
<string>id</string>
<key>o_video_decoded_lbl</key>
<string>id</string>
<key>o_video_decoded_txt</key>
<string>id</string>
</dict>
<key>SUPERCLASS</key>
<string>NSObject</string>
</dict>
</array>
<key>IBVersion</key>
<string>1</string>
</dict>
</plist>
......@@ -2,20 +2,16 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>69 68 356 240 0 0 1280 778 </string>
<key>IBFramework Version</key>
<string>489.0</string>
<string>649</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../vlc.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>2</integer>
</array>
<array/>
<key>IBSystem Version</key>
<string>9E17</string>
<string>9F33</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
......
......@@ -80,6 +80,7 @@
IBOutlet id o_mi_delete;
IBOutlet id o_mi_info;
IBOutlet id o_mi_preparse;
IBOutlet id o_mi_dl_cover_art;
IBOutlet id o_mi_selectall;
IBOutlet id o_mi_sort_name;
IBOutlet id o_mi_sort_author;
......@@ -128,6 +129,7 @@
- (IBAction)servicesChange:(id)sender;
- (IBAction)playItem:(id)sender;
- (IBAction)preparseItem:(id)sender;
- (IBAction)downloadCoverArt:(id)sender;
- (IBAction)savePlaylist:(id)sender;
- (IBAction)deleteItem:(id)sender;
- (IBAction)selectAll:(id)sender;
......
......@@ -443,7 +443,8 @@
[o_mi_delete setTitle: _NS("Delete")];
[o_mi_recursive_expand setTitle: _NS("Expand Node")];
[o_mi_selectall setTitle: _NS("Select All")];
[o_mi_info setTitle: _NS("Information...")];
[o_mi_info setTitle: _NS("Media Information...")];
[o_mi_dl_cover_art setTitle: _NS("Download Cover Art")];
[o_mi_preparse setTitle: _NS("Fetch Meta Data")];
[o_mi_sort_name setTitle: _NS("Sort Node by Name")];
[o_mi_sort_author setTitle: _NS("Sort Node by Author")];
......@@ -805,6 +806,37 @@
[self playlistUpdated];
}
- (IBAction)downloadCoverArt:(id)sender
{
int i_count;
NSMutableArray *o_to_preparse;
intf_thread_t * p_intf = VLCIntf;
playlist_t * p_playlist = pl_Yield( p_intf );
o_to_preparse = [NSMutableArray arrayWithArray:[[o_outline_view selectedRowEnumerator] allObjects]];
i_count = [o_to_preparse count];
int i, i_row;
NSNumber *o_number;
playlist_item_t *p_item = NULL;
for( i = 0; i < i_count; i++ )
{
o_number = [o_to_preparse lastObject];
i_row = [o_number intValue];
p_item = [[o_outline_view itemAtRow:i_row] pointerValue];
[o_to_preparse removeObject: o_number];
[o_outline_view deselectRow: i_row];
if( p_item && p_item->i_children == -1 )
{
playlist_AskForArtEnqueue( p_playlist, p_item->p_input );
}
}
vlc_object_release( p_playlist );
[self playlistUpdated];
}
- (IBAction)servicesChange:(id)sender
{
NSMenuItem *o_mi = (NSMenuItem *)sender;
......
......@@ -106,6 +106,7 @@
- (IBAction)metaFieldChanged:(id)sender;
- (IBAction)saveMetaData:(id)sender;
- (IBAction)downloadCoverArt:(id)sender;
- (void)initMediaPanelStats;
- (void)updatePanelWithItem:(input_item_t *)_p_item;
- (input_item_t *)item;
......
......@@ -425,6 +425,13 @@ error:
_NS("OK"), nil, nil);
}
- (IBAction)downloadCoverArt:(id)sender
{
playlist_t * p_playlist = pl_Yield( VLCIntf );
if( p_item) playlist_AskForArtEnqueue( p_playlist, p_item );
pl_Release( VLCIntf );
}
- (input_item_t *)item
{
if( p_item ) vlc_gc_incref( p_item );
......
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