A lot of things
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
export const CHUNK_SIZE = 8192;
|
||||
|
||||
const PATCH_EXTENSIONS = new Set([
|
||||
'ips', 'bps', 'ups', 'aps', 'ppf', 'xdelta', "zip"
|
||||
]);
|
||||
|
||||
/**
|
||||
* An uploaded file instance.
|
||||
* Create a new file data.
|
||||
@@ -12,6 +16,8 @@ export const CHUNK_SIZE = 8192;
|
||||
*/
|
||||
export function FSFileData(name, totalChunks, rawFile ) {
|
||||
|
||||
const extension = name.split('.').pop().toLowerCase();
|
||||
|
||||
return {
|
||||
|
||||
/**
|
||||
@@ -66,6 +72,8 @@ export function FSFileData(name, totalChunks, rawFile ) {
|
||||
*/
|
||||
state: 'public',
|
||||
|
||||
can_be_online_patched: PATCH_EXTENSIONS.has(extension),
|
||||
|
||||
/**
|
||||
* If the online patcher is enabled
|
||||
*/
|
||||
@@ -76,6 +84,21 @@ export function FSFileData(name, totalChunks, rawFile ) {
|
||||
*/
|
||||
meta_secondary_online_patcher: false,
|
||||
|
||||
/**
|
||||
* If this patch can be played online.
|
||||
*/
|
||||
meta_play_online: false,
|
||||
|
||||
/**
|
||||
* Selected core for play online
|
||||
*/
|
||||
meta_play_online_core: null,
|
||||
|
||||
/**
|
||||
* If the threads are enabled for playing online.
|
||||
*/
|
||||
meta_play_online_threads: null,
|
||||
|
||||
/**
|
||||
* Look if this file is currently uploading.
|
||||
* @returns {boolean}
|
||||
@@ -164,6 +187,6 @@ export function FSFileData(name, totalChunks, rawFile ) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user