소스 검색

版本升级维护

yyqxiaoyin 5 년 전
부모
커밋
35075b1c97
1개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 13 1
      MKRRadioManager/Classes/MKRRadioManager/MKRWIFIDeviceManager/MKRWIFIDeviceManager.m

+ 13 - 1
MKRRadioManager/Classes/MKRRadioManager/MKRWIFIDeviceManager/MKRWIFIDeviceManager.m

@@ -393,7 +393,19 @@ static inline void wd_playControl_queue(void (^block)(void)){
 - (void)playSongWithChannelNO:(NSInteger)channelNO
                        device:(id <MKRUPnPDevice>)device
                        userID:(NSString *)userID {
-    [self playSongWithChannelNO:channelNO index:0 device:device userID:userID];
+    NSString *playFlag = [NSString stringWithFormat:@"%zd",channelNO];
+    NSString *playListUrl = [NSString stringWithFormat:@"%@/web/playlist",[ASControlTools sharedInstanceUPNP].myIp];
+    NSString *timestamp = [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]];
+    wd_playControl_queue(^{
+        libupnp_PlayNumFlag(
+        device.avTransportUrl,
+        playFlag,
+        timestamp,
+        userID,
+        playListUrl,
+        @"1"
+        );
+    });
 }
 
 - (void)pauseWithDevice:(id <MKRUPnPDevice>)device {