Skip to content

Commit

Permalink
1. Update storage path
Browse files Browse the repository at this point in the history
  • Loading branch information
ianyanzhang committed Jun 7, 2023
1 parent 0b5ab08 commit 58d1ead
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ - (TXVodDownloadCenter *)manager {
_manager = [TXVodDownloadCenter sharedInstance];
_manager.delegate = self;
// 设置下载存储路径
NSString *cachesDir = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *cachesDir = [paths objectAtIndex:0];
NSString *path = [NSString stringWithFormat:@"%@/videoCache",cachesDir];
[_manager setDownloadPath:path];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ @implementation SuperPlayerView {
#pragma mark - life Cycle

+ (void)initialize {
NSString *path = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *path = [paths objectAtIndex:0];
NSString *cachePath = [path stringByAppendingString:@"/TXCache"];
[TXPlayerGlobalSetting setCacheFolderPath:cachePath];
[TXPlayerGlobalSetting setMaxCacheSize:500];
Expand Down

0 comments on commit 58d1ead

Please sign in to comment.