Commit 36d5b35b authored by Carola Nitz's avatar Carola Nitz Committed by Felix Paul Kühne

added conveniencemethods to get an mlfile from albums and episodes

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 32c1b6e2
......@@ -30,6 +30,8 @@ extern NSString *const MLAlbumTrackNumber;
extern NSString *const MLAlbumTrackTrackName;
extern NSString *const MLAlbumTrackDiscNumber;
@class MLFile;
@interface MLAlbumTrack : NSManagedObject
+ (NSArray *)allTracks;
......@@ -79,4 +81,5 @@ extern NSString *const MLAlbumTrackDiscNumber;
- (void)removeFilesObject:(NSManagedObject *)value;
- (void)addFiles:(NSSet *)value;
- (void)removeFiles:(NSSet *)value;
- (MLFile *)anyFileFromTrack;
@end
......@@ -26,6 +26,7 @@
#import <CoreData/CoreData.h>
@class MLShow;
@class MLFile;
@interface MLShowEpisode : NSManagedObject
......@@ -56,6 +57,6 @@
- (void)removeFilesObject:(NSManagedObject *)value;
- (void)addFiles:(NSSet *)value;
- (void)removeFiles:(NSSet *)value;
- (MLFile *)anyFileFromEpisode;
@end
......@@ -26,6 +26,7 @@
#import "MLMediaLibrary.h"
#import "MLAlbumTrack.h"
#import "MLAlbum.h"
#import "MLFile.h"
NSString *const MLAlbumTrackAlbum = @"MLAlbumTrackAlbum";
NSString *const MLAlbumTrackAlbumName = @"MLAlbumTrackAlbumName";
......@@ -183,4 +184,10 @@ NSString *const MLAlbumTrackDiscNumber = @"MLAlbumTrackDiscNumber";
@dynamic album;
@dynamic files;
@dynamic containsArtwork;
- (MLFile *)anyFileFromTrack
{
return (MLFile *)self.files.anyObject;
}
@end
......@@ -27,6 +27,7 @@
#import "MLMediaLibrary.h"
#import "MLShowEpisode.h"
#import "MLShow.h"
#import "MLFile.h"
@interface MLShowEpisode ()
@property (nonatomic, strong) NSNumber *primitiveUnread;
......@@ -139,4 +140,10 @@
@dynamic name;
@dynamic show;
@dynamic files;
- (MLFile *)anyFileFromTrack
{
return (MLFile *)self.files.anyObject;
}
@end
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