File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,10 +25,13 @@ - (void)updateMetas:(CDVInvokedUrlCommand*)command
2525 NSString *album = [command.arguments objectAtIndex: 2 ];
2626 NSString *cover = [command.arguments objectAtIndex: 3 ];
2727 NSString *elapsedTime = [command.arguments objectAtIndex: 4 ];
28+
29+ NSString * basePath = [NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES ) objectAtIndex: 0 ];
30+ NSString *fullPath = [NSString stringWithFormat: @" %@%@ " , basePath, cover];
2831
2932 MPMediaItemArtwork *albumArt;
3033 if (NSClassFromString (@" MPNowPlayingInfoCenter" )) {
31- UIImage *image = [UIImage imageNamed: cover ];
34+ UIImage *image = [UIImage imageNamed: fullPath ];
3235 albumArt = [[MPMediaItemArtwork alloc ] initWithImage: image];
3336
3437 MPNowPlayingInfoCenter *infoCenter = [MPNowPlayingInfoCenter defaultCenter ];
You can’t perform that action at this time.
0 commit comments