Browse Source

版本升级维护

yyqxiaoyin 5 years ago
parent
commit
8e7f60ab19

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

@@ -47,6 +47,9 @@
 
 @property (nonatomic, strong)NSString *userID;
 
+//当前临时频道M3U
+@property (nonatomic, strong) MKRM3UListModel *currentTempM3UListModel;
+
 @property (nonatomic, strong) id<MKRUPnPDevice> device;
 
 - (void)addDeviceManagerListener:(id<MKRWIFIDeviceManagerDelegate>)listener;

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

@@ -373,6 +373,7 @@ static inline void wd_playControl_queue(void (^block)(void)){
 }
 
 - (void)setM3UList:(MKRM3UListModel *)m3uListModel{
+    self.currentTempM3UListModel = m3uListModel;
     libupnp_SetNewM3UListV2(m3uListModel.secondsList,
                             m3uListModel.artistList,
                             m3uListModel.titleList,
@@ -443,6 +444,7 @@ static inline void wd_playControl_queue(void (^block)(void)){
              firstPlayingSong:(id<MKRRadioResorce>)firstPlayingSong
                        device:(id<MKRUPnPDevice>)device
                     timeStamp:(NSTimeInterval)timeStamp{
+    self.currentTempM3UListModel = nil;
     wd_playControl_queue(^{
         NSString *playFlag = [NSString stringWithFormat:@"%zd",channelNO];
         [self _playPlayFlag:playFlag device:device timeStamp:timeStamp];
@@ -454,6 +456,7 @@ static inline void wd_playControl_queue(void (^block)(void)){
                         index:(NSInteger)index
                        device:(id<MKRUPnPDevice>)device
                     timeStamp:(NSTimeInterval)timeStamp{
+    self.currentTempM3UListModel = nil;
     wd_playControl_queue(^{
         if (firstPlayingSong && firstPlayingSong.songID) {
             [self setAVTransportURIWithSong:firstPlayingSong device:device];