Skip to content

Commit

Permalink
Profile Sync portable now works.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kezyma committed Feb 6, 2023
1 parent dedead7 commit a088adb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
9 changes: 5 additions & 4 deletions directory/plugins/profilesync.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
"DataPath": [ "data/profilesync" ]
},
{
"Version": "1.1.0a",
"Released": "2023-01-16",
"Version": "1.1.1a",
"Released": "2023-02-06",
"MinSupport": "2.4.0",
"MaxSupport": "2.5.0",
"MinWorking": "2.4.0",
"ReleaseNotes": [
"(1.1.0) Potential fix for previously non-supported characters.",
"(1.1.0) Added support for MO 2.5.0"
"(1.1.0) Added support for MO 2.5.0",
"(1.1.1) Portable sync profiles (Requires recreating Sync Profiles on portable instances)."
],
"DownloadUrl": "https://github.com/Kezyma/ModOrganizer-Plugins/releases/download/profilesync/profilesync.1.1.0.zip",
"DownloadUrl": "https://github.com/Kezyma/ModOrganizer-Plugins/releases/download/profilesync/profilesync.1.1.1.zip",
"PluginPath": [ "profilesync" ],
"LocalePath": [],
"DataPath": [ "data/profilesync" ]
Expand Down
10 changes: 8 additions & 2 deletions src/profilesync/modules/profilesync_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def __init__(self, organiser=mobase.IOrganizer):
_profileSyncGroupJsonFile = str()
def profileSyncGroupJsonFile(self):
if self._profileSyncGroupJsonFile == str():
self._profileSyncGroupJsonFile = self.pluginDataPath() / self.safeGamePathName() / "profile_sync_groups.json"
if self.currentInstanceName() == "":
self._profileSyncGroupJsonFile = self.pluginDataPath() / "Portable" / "profile_sync_groups.json"
else:
self._profileSyncGroupJsonFile = self.pluginDataPath() / self.safeGamePathName() / "profile_sync_groups.json"
if not Path(self._profileSyncGroupJsonFile).parent.exists():
os.makedirs(str(Path(self._profileSyncGroupJsonFile).parent))
if not Path(self._profileSyncGroupJsonFile).exists():
Expand All @@ -21,7 +24,10 @@ def profileSyncGroupJsonFile(self):
_profileSyncModlistFolder = str()
def profileSyncGroupModlist(self, groupName=str):
if self._profileSyncModlistFolder == str():
self._profileSyncModlistFolder = self.pluginDataPath() / self.safeGamePathName() / "groups"
if self.currentInstanceName() == "":
self._profileSyncModlistFolder = self.pluginDataPath() / "Portable" / "groups"
else:
self._profileSyncModlistFolder = self.pluginDataPath() / self.safeGamePathName() / "groups"
if not Path(self._profileSyncModlistFolder).exists():
os.makedirs(str(self._profileSyncModlistFolder))
return Path(self._profileSyncModlistFolder) / (self.fileSafeName(str(groupName)) + ".txt")
Expand Down
2 changes: 1 addition & 1 deletion src/profilesync/profilesync_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class ProfileSyncPlugin(SharedPlugin):

def __init__(self):
super().__init__("ProfileSync", "Profile Sync", mobase.VersionInfo(1,1,0, mobase.ReleaseType.ALPHA))
super().__init__("ProfileSync", "Profile Sync", mobase.VersionInfo(1,1,1, mobase.ReleaseType.ALPHA))

def init(self, organiser=mobase.IOrganizer):
self.profilesync = ProfileSync(organiser)
Expand Down

0 comments on commit a088adb

Please sign in to comment.