]> git.sesse.net Git - vlc/blobdiff - projects/macosx/framework/Sources/VLCMediaList.m
macosx/framework: Added [VLCMediaList initWithArray:] method
[vlc] / projects / macosx / framework / Sources / VLCMediaList.m
index 7d0443602a7641b3a791b90cd603763fd6d98b94..c2f68e7fa7deba93d7e206cfe51910bedd8244bf 100644 (file)
@@ -86,6 +86,17 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
     return self;
 }
 
+- (id)initWithArray:(NSArray *)array
+{
+    self = [self init];
+    if (!self)
+        return nil;
+
+    for (VLCMedia *media in array)
+        [self addMedia:media];
+    return self;
+}
+
 - (void)release
 {
     @synchronized(self)