|
@@ -568,7 +568,12 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
|
- (void)updateChannel:(NSString *)channelFlag device:(id<MKRUPnPDevice>)device{
|
|
|
wd_playControl_queue(^{
|
|
|
NSString *timestamp = [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]];
|
|
|
- int result = libupnp_SetChannelUpdateV2(device.groupManagementUrl, self.userID, timestamp, channelFlag, @"null");
|
|
|
+ NSInteger channelNo = [channelFlag integerValue];
|
|
|
+ NSString *playListUrl = @"null";
|
|
|
+ if (channelNo >= 13) {
|
|
|
+ playListUrl = [NSString stringWithFormat:@"%@/web/playlist",[ASControlTools sharedInstanceUPNP].myIp];
|
|
|
+ }
|
|
|
+ int result = libupnp_SetChannelUpdateV2(device.groupManagementUrl, self.userID, timestamp, channelFlag, playListUrl);
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -598,9 +603,12 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-- (void)updateTempChannelPlayMode:(MKRRadioPlayMode)playMode device:(id<MKRUPnPDevice>)device{
|
|
|
+- (void)updateTempChannelPlayMode:(MKRRadioPlayMode)playMode songs:(NSArray <id <MKRRadioResorce>> *)songs index:(NSInteger)index device:(id<MKRUPnPDevice>)device{
|
|
|
if (!self.currentTempM3UListModel) {
|
|
|
- return;
|
|
|
+ MKRM3UListModel *m3uModel = [MKRM3UListModel tempChannelM3UModelWithSongs:songs startIndex:index];
|
|
|
+ m3uModel.userID = self.userID;
|
|
|
+ m3uModel.playModeString = [self playModeStringWithPlayMode:playMode];
|
|
|
+ self.currentTempM3UListModel = m3uModel;
|
|
|
}
|
|
|
self.currentTempM3UListModel.playModeString = [self playModeStringWithPlayMode:playMode];
|
|
|
wd_playControl_queue(^{
|