Explorar o código

版本升级维护

yyqxiaoyin %!s(int64=5) %!d(string=hai) anos
pai
achega
aa9127332e

+ 10 - 10
MKRRadioManager/Classes/MKRRadioManager/MKRWIFIDeviceManager/MKRWIFIDeviceManager.m

@@ -455,15 +455,15 @@ static inline void wd_playControl_queue(void (^block)(void)){
         NSDictionary *metaDataDic = [[NSDictionary mkr_dictionaryWithXML:dic[@"TrackMetaData"]] objectForKey:@"item"] ? : @{};
         [dic setObject:metaDataDic forKey:@"TrackMetaData"];
         @synchronized (self.currentResource) {
-            self.currentResource.songName = dic[@"upnp:songName"];
-            self.currentResource.songArtist = dic[@"upnp:songPlayer"];
-            self.currentResource.songAlbumCover = dic[@"upnp:songThumb"];
-            self.currentResource.songID = [dic[@"upnp:songInfoID"] integerValue];
-            self.currentResource.songFrom = [dic[@"upnp:songPlatform"] integerValue];
-            self.currentResource.resourceStatus.totalTime = [dic[@"upnp:songDuration"] integerValue];
-            self.currentResource.sourceType = [dic[@"upnp:songType"] integerValue];
-            self.currentResource.songAlbumID = dic[@"upnp:songAlbumID"];
-            NSString *channelString = dic[@"upnp:songFlag"];
+            self.currentResource.songName = dic[@"TrackMetaData"][@"upnp:songName"];
+            self.currentResource.songArtist = dic[@"TrackMetaData"][@"upnp:songPlayer"];
+            self.currentResource.songAlbumCover = dic[@"TrackMetaData"][@"upnp:songThumb"];
+            self.currentResource.songID = [dic[@"TrackMetaData"][@"upnp:songInfoID"] integerValue];
+            self.currentResource.songFrom = [dic[@"TrackMetaData"][@"upnp:songPlatform"] integerValue];
+            self.currentResource.resourceStatus.totalTime = [dic[@"TrackMetaData"][@"upnp:songDuration"] integerValue];
+            self.currentResource.sourceType = [dic[@"TrackMetaData"][@"upnp:songType"] integerValue];
+            self.currentResource.songAlbumID = dic[@"TrackMetaData"][@"upnp:songAlbumID"];
+            NSString *channelString = dic[@"TrackMetaData"][@"upnp:songFlag"];
             NSInteger songChannel = 0;
             if ([channelString containsString:@"-"]) {
                 NSArray *channelStringArr = [channelString componentsSeparatedByString:@"-"];
@@ -474,7 +474,7 @@ static inline void wd_playControl_queue(void (^block)(void)){
             self.currentResource.songChannel = songChannel;
             NSString *songChannelUid = [NSString stringWithFormat:@"%@-%@-%zd",self.userID,device.deviceUUID,songChannel];
             self.currentResource.songChannelUid = songChannelUid;
-            self.currentResource.songFlag = [NSString stringWithFormat:@"%@_%@_%@",songChannelUid,dic[@"upnp:songInfoID"],[dic[@"upnp:songPlatform"] integerValue]];
+            self.currentResource.songFlag = [NSString stringWithFormat:@"%@_%@_%@",songChannelUid,dic[@"TrackMetaData"][@"upnp:songInfoID"],[dic[@"TrackMetaData"][@"upnp:songPlatform"] integerValue]];
         }
     });
     return self.currentResource;