浏览代码

1.重启备份不继续问题

huangxiaodong 1 年之前
父节点
当前提交
28da50da0b

+ 3 - 31
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/backupsFileManager.m

@@ -35,8 +35,6 @@ static backupsFileManager * cur_backupsFileShareInstance = nil;
 
 - (void)handlePhotosBackupsFun
 {
-    //return;
-    
     BOOL haveOpenBackups = [HWDataManager getBoolWithKey:Const_photo_backups_state];
     
     if(!haveOpenBackups){
@@ -319,40 +317,14 @@ static backupsFileManager * cur_backupsFileShareInstance = nil;
 //检查是否需要重新备份
 - (void)checkReBackupsFileFun
 {
-    BOOL haveOpenBackups = [HWDataManager getBoolWithKey:Const_photo_backups_state];
-    
-    if(!haveOpenBackups){
+    if(!_curPhotosBackupsTaskMod){
         return;
     }
     
-    //相册权限
-    if (![[TZImageManager manager] authorizationStatusAuthorized]){
-        [HWDataManager setBoolWithKey:Const_photo_backups_state value:NO];
+    if(_curPhotosBackupsTaskMod.curBackupsState != backupsStateUploading){
         return;
     }
     
-    
-    [photosBackupsTaskModel bg_findAsync:backups_photos_tableName limit:1 orderBy:nil desc:YES complete:^(NSArray * _Nullable array) {
-        if(!array || array.count == 0){
-            return;
-        }
-        
-        photosBackupsTaskModel *lastModel = array.firstObject;
-        
-        HLog(@"1 bg_id:%@",lastModel.bg_id);
-        
-        if(lastModel.isBackupsSuspendType == backupsSuspendByUser){
-            return;
-        }
-        
-        if(lastModel.curBackupsState == backupsStateFail
-           ||lastModel.curBackupsState == backupsStateDone){//上次备份完成
-            
-        }
-        else{//继续上次的备份任务
-            [self handelBackupsModelFun:lastModel];
-        }
-    }];
-    
+    [self beginBackupsFileFun];
 }
 @end

+ 2 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.h

@@ -35,6 +35,8 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)searchFileListResponseFun:(NSDictionary *)dataDict;
 
 - (void)handleDownloadResponseFunBy:(id)message;
+
+- (void)checkOtherTaskFun;
 @end
 
 NS_ASSUME_NONNULL_END

+ 6 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm

@@ -319,4 +319,10 @@
     }
     
 }
+
+- (void)checkOtherTaskFun
+{
+
+}
+
 @end

+ 4 - 10
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -772,15 +772,7 @@ ComontAlretViewControllerDelegate>
 
 - (void)WebSocketNeedRelinkFun
 {
-    if(_isRebootIngType){
-        self.webSocketTime = -10;
-    }
-    else if(_isResetingType){
-        self.webSocketTime = -10;
-    }
-    else{
-        self.webSocketTime = 0;
-    }
+    self.webSocketTime = 0;
     
     //[self showNetErrorAlertFun:2];
     if(self.commandChannelManager){
@@ -1143,6 +1135,7 @@ ComontAlretViewControllerDelegate>
                     [[iToast makeText:NSLocalizedString(@"player_link_reboot_suc_Tips",nil)] show];
                 });
                 _isRebootIngType = NO;
+                [self opencommandChannelManagerrc_openURL];
             }
             
             //重启后重连 出来的
@@ -1151,6 +1144,7 @@ ComontAlretViewControllerDelegate>
                     [[iToast makeText:NSLocalizedString(@"my_set_no_Restore_Factorying_tips",nil)] show];
                 });
                 _isResetingType = NO;
+                [self opencommandChannelManagerrc_openURL];
             }
             
             
@@ -2846,7 +2840,7 @@ static int  couneeee = 0;
     //处理websockt是否断开
     self.webSocketTime++;
     
-    if(self.webSocketTime == 8)
+    if(self.webSocketTime > 8)
     {
         [self WebSocketNeedRelinkFun];
     }