Forráskód Böngészése

版本升级维护

yyqxiaoyin 5 éve
szülő
commit
41a5f01d86

+ 1 - 1
MKRRadioManager/Classes/MKRRadioManager/MKRWIFIDeviceManager/MKRWIFIDeviceManager.h

@@ -186,7 +186,7 @@
 /// 当channelFlag 为 @"x(频道号)" 时 为更新x频道 eg:@"3"
 /// 当channelFlag 为 @"audition_x(频道号)"时  为通知设备更新x频道 并且在更新后的频道中找到当前播放的歌曲续播 eg: @"audition_3"
 /// @param channelFlag 频道标识
-- (void)setChannelUpdate:(NSString *)channelFlag device:(id <MKRUPnPDevice>)device;
+- (void)updateChannel:(NSString *)channelFlag device:(id<MKRUPnPDevice>)device;
 
 @end
 

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

@@ -547,10 +547,10 @@ static inline void wd_playControl_queue(void (^block)(void)){
     });
 }
 
-- (void)setChannelUpdate:(NSString *)channelFlag device:(id<MKRUPnPDevice>)device timeStamp:(NSTimeInterval)timeStamp{
-    NSString *timestamp = [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]];
+- (void)updateChannel:(NSString *)channelFlag device:(id<MKRUPnPDevice>)device{
     wd_playControl_queue(^{
-        libupnp_SetChannelUpdateV2(device.groupManagementUrl, self.userID, timestamp, channelFlag, @"null");
+        NSString *timestamp = [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]];
+        int result = libupnp_SetChannelUpdateV2(device.groupManagementUrl, self.userID, timestamp, channelFlag, @"null");
     });
 }