|
@@ -609,6 +609,12 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
|
if (!resultDic || !resultDic.allKeys.count) {
|
|
|
return ;
|
|
|
}
|
|
|
+ if ([resultDic[@"TrackMetaData"][@"upnp:songInfoID"] isKindOfClass:NSString.class]) {
|
|
|
+ NSInteger songID = [resultDic[@"TrackMetaData"][@"upnp:songInfoID"] integerValue];
|
|
|
+ if (songID != self.currentResource.songID) {
|
|
|
+ self.currentResource = [self defaultSong];
|
|
|
+ }
|
|
|
+ }
|
|
|
@synchronized (self.currentResource) {
|
|
|
if ([resultDic[@"TrackMetaData"][@"upnp:songType"] isKindOfClass:NSString.class]) {
|
|
|
NSInteger sourceType = [MKRM3UListModel convertSorceTypeWithAudioType:[resultDic[@"TrackMetaData"][@"upnp:songType"] integerValue]];
|
|
@@ -690,6 +696,14 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
|
return _currentResource;
|
|
|
}
|
|
|
|
|
|
+- (id<MKRRadioResorce>)defaultSong{
|
|
|
+ MKRRadioResorce *song = [[MKRRadioResorce alloc] init];
|
|
|
+ song.songName = @"猫王妙播";
|
|
|
+ song.songArtist = @"Keep radio on!";
|
|
|
+ song.resourceStatus = [[MKRPlayResourceStatus alloc] init];
|
|
|
+ return song;
|
|
|
+}
|
|
|
+
|
|
|
- (NSHashTable *)listeners{
|
|
|
if (!_listeners) {
|
|
|
_listeners = [NSHashTable weakObjectsHashTable];
|