|
@@ -347,10 +347,10 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
}
|
|
}
|
|
|
|
|
|
- (void)setAVTransportURIWithSong:(id <MKRRadioResorce>)song
|
|
- (void)setAVTransportURIWithSong:(id <MKRRadioResorce>)song
|
|
- device:(id <MKRUPnPDevice>)device
|
|
|
|
- userID:(NSString *)userID {
|
|
|
|
|
|
+ device:(id <MKRUPnPDevice>)device{
|
|
NSString *timestamp = [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]];
|
|
NSString *timestamp = [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]];
|
|
NSString *channelNumString = [NSString stringWithFormat:@"CHANNEL_UPDATE_%zd",song.songChannel];
|
|
NSString *channelNumString = [NSString stringWithFormat:@"CHANNEL_UPDATE_%zd",song.songChannel];
|
|
|
|
+ NSString *userID = self.userID;
|
|
libupnp_SetAVTransportURI(
|
|
libupnp_SetAVTransportURI(
|
|
device.avTransportUrl,
|
|
device.avTransportUrl,
|
|
song.songUrl?:@"",
|
|
song.songUrl?:@"",
|
|
@@ -379,10 +379,11 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
- (void)playSongWithChannelNO:(NSInteger)channelNO
|
|
- (void)playSongWithChannelNO:(NSInteger)channelNO
|
|
index:(NSInteger)index
|
|
index:(NSInteger)index
|
|
device:(id <MKRUPnPDevice>)device
|
|
device:(id <MKRUPnPDevice>)device
|
|
- userID:(NSString *)userID {
|
|
|
|
|
|
+ timeStamp:(NSTimeInterval)timeStamp{
|
|
NSString *playFlag = [NSString stringWithFormat:@"%zd-%zd",channelNO,index];
|
|
NSString *playFlag = [NSString stringWithFormat:@"%zd-%zd",channelNO,index];
|
|
NSString *playListUrl = [NSString stringWithFormat:@"%@/web/playlist",[ASControlTools sharedInstanceUPNP].myIp];
|
|
NSString *playListUrl = [NSString stringWithFormat:@"%@/web/playlist",[ASControlTools sharedInstanceUPNP].myIp];
|
|
- NSString *timestamp = [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]];
|
|
|
|
|
|
+ NSString *timestamp = [NSString stringWithFormat:@"%.0f", timeStamp];
|
|
|
|
+ NSString *userID = self.userID;
|
|
wd_playControl_queue(^{
|
|
wd_playControl_queue(^{
|
|
libupnp_PlayNumFlag(
|
|
libupnp_PlayNumFlag(
|
|
device.avTransportUrl,
|
|
device.avTransportUrl,
|
|
@@ -398,10 +399,11 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
|
|
|
|
- (void)playSongWithChannelNO:(NSInteger)channelNO
|
|
- (void)playSongWithChannelNO:(NSInteger)channelNO
|
|
device:(id <MKRUPnPDevice>)device
|
|
device:(id <MKRUPnPDevice>)device
|
|
- userID:(NSString *)userID {
|
|
|
|
|
|
+ timeStamp:(NSTimeInterval)timeStamp{
|
|
NSString *playFlag = [NSString stringWithFormat:@"%zd",channelNO];
|
|
NSString *playFlag = [NSString stringWithFormat:@"%zd",channelNO];
|
|
NSString *playListUrl = [NSString stringWithFormat:@"%@/web/playlist",[ASControlTools sharedInstanceUPNP].myIp];
|
|
NSString *playListUrl = [NSString stringWithFormat:@"%@/web/playlist",[ASControlTools sharedInstanceUPNP].myIp];
|
|
- NSString *timestamp = [NSString stringWithFormat:@"%.0f", [[NSDate date] timeIntervalSince1970]];
|
|
|
|
|
|
+ NSString *timestamp = [NSString stringWithFormat:@"%.0f", timeStamp];
|
|
|
|
+ NSString *userID = self.userID;
|
|
wd_playControl_queue(^{
|
|
wd_playControl_queue(^{
|
|
libupnp_PlayNumFlag(
|
|
libupnp_PlayNumFlag(
|
|
device.avTransportUrl,
|
|
device.avTransportUrl,
|
|
@@ -417,27 +419,27 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
- (void)playTempChannelSongs:(NSArray<id<MKRRadioResorce>> *)songs
|
|
- (void)playTempChannelSongs:(NSArray<id<MKRRadioResorce>> *)songs
|
|
index:(NSInteger)index
|
|
index:(NSInteger)index
|
|
device:(id<MKRUPnPDevice>)device
|
|
device:(id<MKRUPnPDevice>)device
|
|
- userID:(NSString *)userID{
|
|
|
|
|
|
+ timeStamp:(NSTimeInterval)timeStamp{
|
|
MKRM3UListModel *m3uModel = [MKRM3UListModel tempChannelM3UModelWithSongs:songs startIndex:index];
|
|
MKRM3UListModel *m3uModel = [MKRM3UListModel tempChannelM3UModelWithSongs:songs startIndex:index];
|
|
- m3uModel.userID = userID;
|
|
|
|
|
|
+ m3uModel.userID = self.userID;
|
|
m3uModel.playModeString = @"REPEAT_ALL";
|
|
m3uModel.playModeString = @"REPEAT_ALL";
|
|
wd_playControl_queue(^{
|
|
wd_playControl_queue(^{
|
|
[[MKRWIFIDeviceManager shareManager] setM3UList:m3uModel];
|
|
[[MKRWIFIDeviceManager shareManager] setM3UList:m3uModel];
|
|
- [self setAVTransportURIWithSong:songs[index] device:device userID:userID];
|
|
|
|
- [self playSongWithChannelNO:13 index:index device:device userID:userID];
|
|
|
|
|
|
+ [self setAVTransportURIWithSong:songs[index] device:device];
|
|
|
|
+ [self playSongWithChannelNO:13 index:index device:device timeStamp:timeStamp];
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- (void)playTempChannelSongs:(NSArray<id<MKRRadioResorce>> *)songs
|
|
- (void)playTempChannelSongs:(NSArray<id<MKRRadioResorce>> *)songs
|
|
device:(id<MKRUPnPDevice>)device
|
|
device:(id<MKRUPnPDevice>)device
|
|
- userID:(NSString *)userID{
|
|
|
|
|
|
+ timeStamp:(NSTimeInterval)timeStamp{
|
|
MKRM3UListModel *m3uModel = [MKRM3UListModel tempChannelM3UModelWithSongs:songs startIndex:index];
|
|
MKRM3UListModel *m3uModel = [MKRM3UListModel tempChannelM3UModelWithSongs:songs startIndex:index];
|
|
- m3uModel.userID = userID;
|
|
|
|
|
|
+ m3uModel.userID = self.userID;
|
|
m3uModel.playModeString = @"REPEAT_ALL";
|
|
m3uModel.playModeString = @"REPEAT_ALL";
|
|
wd_playControl_queue(^{
|
|
wd_playControl_queue(^{
|
|
[[MKRWIFIDeviceManager shareManager] setM3UList:m3uModel];
|
|
[[MKRWIFIDeviceManager shareManager] setM3UList:m3uModel];
|
|
- [self setAVTransportURIWithSong:songs[0] device:device userID:userID];
|
|
|
|
- [self playSongWithChannelNO:13 device:device userID:userID];
|
|
|
|
|
|
+ [self setAVTransportURIWithSong:songs[0] device:device];
|
|
|
|
+ [self playSongWithChannelNO:13 device:device timeStamp:timeStamp];
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|