Browse Source

1.nas下载后台保活

huangxiaodong 1 year ago
parent
commit
da3d4fb966

+ 1 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/customDownloadManager/customDownloadManager.h

@@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property(nonatomic,strong) NSString *uid;//用户id 用来创建文件夹路径 防止不要用户的缓存关联
 @property(nonatomic,assign) NSInteger maxDownLoadCount;//默认一个
+@property(nonatomic,assign) BOOL isDownLoadIngType;//
 
 /** 实例化对象(单例) */
 + (instancetype)shareManager;

+ 9 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/customDownloadManager/customDownloadManager.m

@@ -495,4 +495,13 @@ static int DownloadTaskExeingNotNum = 0;
     }
     return _downloadingOperationArr;
 }
+
+- (BOOL)isDownLoadIngType
+{
+    if(self.downloadingOperationArr.count >= 1){
+        return YES;
+    }
+    
+    return NO;
+}
 @end

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

@@ -481,8 +481,9 @@
    BOOL isUploadingType = [[uploadFileManager shareInstance] checkUploadingFun];
    BOOL isDownloadingType = [[downloadManager shareInstance] checkDownloadingFun];
    BOOL isBackground = [HWDataManager getBoolWithKey:stringKeyAddSn(Const_file_Transfe_working_background)];
+   BOOL isNasDownloadingType = [customDownloadManager shareManager].isDownLoadIngType;
     
-    if ((isBackupsingType || isUploadingType || isDownloadingType) && isBackground) {
+    if ((isBackupsingType || isUploadingType || isDownloadingType ||isNasDownloadingType) && isBackground) {
         HLog(@"后台保活中");
         [cachesFileManager writeLogsWithMsg:@"Background working"];
     }