-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36df3b7
commit 2be477e
Showing
6 changed files
with
51 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from pathlib import Path | ||
from backend.modules.filesession import FileSession | ||
import os | ||
from backend import utils | ||
|
||
|
||
def libs(): | ||
data = { | ||
"download-default-nhentai": { | ||
"active": True, | ||
"processor": "nhentai", | ||
"path": ".\\downloads\\nhentai" | ||
}, | ||
"download-default-gallery-dl-hitomila": { | ||
"active": True, | ||
"processor": "gallery-dl-hitomila", | ||
"path": ".\\downloads\\gallery-dl-hitomila" | ||
}, | ||
"download-default-gallery-dl-nhentai": { | ||
"active": False, | ||
"processor": "gallery-dl-nhentai", | ||
"path": ".\\downloads\\gallery-dl-nhentai" | ||
} | ||
} | ||
|
||
path = Path("./settings/libs/libs_default.json") | ||
|
||
if path.exists() is False: | ||
path.parent.mkdir(parents=True, exist_ok=True) | ||
|
||
utils.write_json(path, data) | ||
|
||
else: | ||
exist_data = utils.read_json(path) | ||
|
||
for key in data.keys(): | ||
if key not in exist_data: | ||
exist_data[key] = data[key] | ||
|
||
|
||
def init(): | ||
libs() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters