-
-@implementation VLGetURLScriptCommand
-
-- (id)performDefaultImplementation {
- NSString *o_command = [[self commandDescription] commandName];
- NSString *o_urlString = [self directParameter];
-
- NSLog(@"test1");
- if ( [o_command isEqualToString:@"GetURL"] || [o_command isEqualToString:@"OpenURL"] )
- {
- intf_thread_t * p_intf = [NSApp getIntf];
- NSLog( o_command );
- playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist == NULL )
- {
- return nil;
- }
-
- if ( o_urlString )
- {
- NSURL * o_url;
-
- int i_mode = PLAYLIST_INSERT | PLAYLIST_GO;
-
- playlist_Add( p_playlist, [o_urlString fileSystemRepresentation],
- i_mode, PLAYLIST_END );
- NSLog( o_urlString );
- o_url = [NSURL fileURLWithPath: o_urlString];
- if( o_url != nil )
- {
- [[NSDocumentController sharedDocumentController]
- noteNewRecentDocumentURL: o_url];
- }
- }
- vlc_object_release( p_playlist );
- }
- return nil;
-}
-
-@end
-