Sfoglia il codice sorgente

版本升级维护

yyqxiaoyin 5 anni fa
parent
commit
4c2885cfa4

+ 6 - 0
MKRRadioManager/Classes/MKRRadioManager/MKRWIFIDeviceManager/MKRWIFIDeviceManager.h

@@ -231,6 +231,12 @@
 /// @param channelNO 设置播放模式的频道
 - (void)setPlayMode:(MKRRadioPlayMode)playMode device:(id<MKRUPnPDevice>)device channelNO:(NSInteger)channelNO;
 
+/// 更新临时频道播放模式
+/// 先刷新临时频道的M3U 更改M3U的播放模式 并向设备发送更新频道命令
+/// @param playMode 播放模式
+/// @param device 需要设置的设备
+- (void)updateTempChannelPlayMode:(MKRRadioPlayMode)playMode device:(id<MKRUPnPDevice>)device;
+
 /// 设置低电量提醒
 /// @param enable 是否开启低电量提醒
 /// @param device 控制的设备

+ 11 - 0
MKRRadioManager/Classes/MKRRadioManager/MKRWIFIDeviceManager/MKRWIFIDeviceManager.m

@@ -598,6 +598,17 @@ static inline void wd_playControl_queue(void (^block)(void)){
     });
 }
 
+- (void)updateTempChannelPlayMode:(MKRRadioPlayMode)playMode device:(id<MKRUPnPDevice>)device{
+    if (!self.currentTempM3UListModel) {
+        return;
+    }
+    self.currentTempM3UListModel.playModeString = [self playModeStringWithPlayMode:playMode];
+    wd_playControl_queue(^{
+        [self setM3UList:self.currentTempM3UListModel];
+        [self updateChannel:@(13).stringValue device:device];
+    });
+}
+
 - (void)setLowPowerNoticeEnable:(BOOL)enable device:(id<MKRUPnPDevice>)device{
     wd_playControl_queue(^{
         libupnp_SetLowBatteryNotification(device.groupManagementUrl,enable);