forked from Ryuzaki-MrL/savemii
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from w3irDv/enh/mngslot
1.6.4 -> batch restore+wipe/tag slots&backupsets+UI
- Loading branch information
Showing
58 changed files
with
4,224 additions
and
758 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,11 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- name: Docker Layer Caching | ||
uses: jpribyl/action-docker-[email protected] | ||
uses: ScribeMD/docker-[email protected] | ||
continue-on-error: true | ||
id: cache | ||
with: | ||
key: savemii-docker-cache-{hash} | ||
restore-keys: | | ||
savemii-docker-cache- | ||
key: savemii-docker-cache-${{ hashFiles('DockerFile')}} | ||
- name: Build artifacts | ||
run: | | ||
docker build . --file Dockerfile --tag builder | ||
|
@@ -25,11 +24,11 @@ jobs: | |
uses: actions/upload-artifact@v4 | ||
with: | ||
name: SaveMiiModWUTPort-Aroma | ||
path: SaveMiiModWUTPort-Aroma.zip | ||
path: build/Aroma/* | ||
if-no-files-found: warn | ||
- name: Upload HBL version | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: SaveMiiModWUTPort-HBL | ||
path: SaveMiiModWUTPort-HBL.zip | ||
path: build/HBL/* | ||
if-no-files-found: warn |
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
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 |
---|---|---|
@@ -1,30 +1,71 @@ | ||
#pragma once | ||
|
||
#include <BackupSetList.h> | ||
#include <jansson.h> | ||
#include <utils/StringUtils.h> | ||
//#include <utils/StringUtils.h> | ||
#include <savemng.h> | ||
#include <string> | ||
|
||
class Metadata { | ||
public: | ||
Metadata(uint32_t high, uint32_t low, uint8_t s) : highID(high), | ||
lowID(low), | ||
slot(s), | ||
path (getDynamicBackupPath(highID, lowID, slot).append("/savemiiMeta.json")) { | ||
} | ||
path (getDynamicBackupPath(highID, lowID, slot).append("/savemiiMeta.json")), | ||
Date({}), | ||
storage({}), | ||
serialId(this->unknownSerialId), | ||
tag({}) { } | ||
|
||
Metadata(uint32_t high, uint32_t low, uint8_t s, std::string datetime) : highID(high), | ||
lowID(low), | ||
slot(s), | ||
path (getBatchBackupPath(highID, lowID, slot, datetime).append("/savemiiMeta.json")) { | ||
} | ||
path (getBatchBackupPath(highID, lowID, slot, datetime).append("/savemiiMeta.json")), | ||
Date({}), | ||
storage({}), | ||
serialId(this->unknownSerialId), | ||
tag({}) { } | ||
|
||
// guess date from batchBackupRoot, to infer a savemiiMeta.json for <1.6.4 batchBackups | ||
Metadata(const std::string & path) : storage({}), | ||
serialId(this->unknownSerialId), | ||
tag({}) { | ||
Date = path.substr(path.length()-17,17); | ||
if (Date.substr(0,2) != "20") | ||
Date=""; | ||
this->path = path + ("/savemiiMeta.json"); | ||
} | ||
|
||
Metadata(const std::string & datetime, const std::string & storage, const std::string & serialId,const std::string & tag ) : | ||
Date(datetime), | ||
storage(storage), | ||
serialId(serialId), | ||
tag(tag) { | ||
path = getBatchBackupPathRoot(datetime)+"/savemiiMeta.json"; | ||
} | ||
|
||
|
||
bool read(); | ||
bool write(); | ||
std::string simpleFormat(); | ||
std::string get(); | ||
bool set(const std::string &date,bool isUSB); | ||
static std::string serialId; | ||
static std::string thisConsoleSerialId; | ||
static std::string unknownSerialId; | ||
std::string getDate() { return Date;}; | ||
std::string getTag() { return tag;}; | ||
void setTag(std::string tag_) { this->tag = tag_;}; | ||
std::string getSerialId() { return serialId;}; | ||
|
||
private: | ||
uint32_t highID; | ||
uint32_t lowID; | ||
uint8_t slot; | ||
std::string path; | ||
}; | ||
|
||
std::string Date; | ||
std::string storage; | ||
std::string serialId; | ||
std::string tag; | ||
}; | ||
|
Oops, something went wrong.