Parcourir la source

版本升级维护

yyqxiaoyin il y a 5 ans
Parent
commit
35075b1c97

+ 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 {