Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Desktop Client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SpinShare
Desktop Client
Commits
815e289e
Commit
815e289e
authored
Jun 21, 2020
by
SpinShare
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed library cleanup to check the albumart and audioclips folders as well
parent
6f2f6ef0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/views/Library.vue
src/views/Library.vue
+8
-2
No files found.
src/views/Library.vue
View file @
815e289e
...
@@ -240,14 +240,20 @@
...
@@ -240,14 +240,20 @@
// Waits for resolve in order to avoid bug where all songs would be added to differingAssets
// Waits for resolve in order to avoid bug where all songs would be added to differingAssets
let
allLinkedAssetsResults
=
await
allLinkedAssetsPromise
;
let
allLinkedAssetsResults
=
await
allLinkedAssetsPromise
;
// Whitelisted filenames
let
whitelistedFiles
=
[
let
whitelistedFiles
=
[
"
Settings.txt
"
,
// Programmatic's SRTB Editor
"
Settings.txt
"
,
// Programmatic's SRTB Editor
"
SRTB_Editor.exe
"
,
// Programmatic's SRTB Editor
"
SRTB_Editor.exe
"
,
// Programmatic's SRTB Editor
"
SRTB_Editor.pdb
"
// Programmatic's SRTB Editor
"
SRTB_Editor.pdb
"
// Programmatic's SRTB Editor
]
]
// Creates differingAssets by seeing if each entry in the assets folder is included in the allLinkedAssets.
// Create an array of all files in the root, audioclips and albumart folders
let
allFiles
=
glob
.
sync
(
path
.
join
(
userSettings
.
get
(
'
gameDirectory
'
),
"
*
"
));
let
allRootFiles
=
glob
.
sync
(
path
.
join
(
userSettings
.
get
(
'
gameDirectory
'
),
"
*
"
));
let
allAudioClipsFiles
=
glob
.
sync
(
path
.
join
(
userSettings
.
get
(
'
gameDirectory
'
),
"
AudioClips
"
,
"
*
"
));
let
allAlbumArtFiles
=
glob
.
sync
(
path
.
join
(
userSettings
.
get
(
'
gameDirectory
'
),
"
AlbumArt
"
,
"
*
"
));
let
allFiles
=
allRootFiles
.
concat
(
allAudioClipsFiles
,
allAlbumArtFiles
);
allFiles
.
forEach
((
file
)
=>
{
allFiles
.
forEach
((
file
)
=>
{
if
(
!
allLinkedAssetsResults
.
includes
(
file
)
&&
fs
.
statSync
(
file
).
isFile
())
{
if
(
!
allLinkedAssetsResults
.
includes
(
file
)
&&
fs
.
statSync
(
file
).
isFile
())
{
// Exclude whitelisted files & .zip files
// Exclude whitelisted files & .zip files
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment