Skip to content

Commit

Permalink
feat: Improve platform-specific path handling in StreamLabsTikTokStre…
Browse files Browse the repository at this point in the history
…amKeyGenerator.py
  • Loading branch information
Loukious committed Aug 8, 2024
1 parent 2082125 commit 88c16e5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions StreamLabsTikTokStreamKeyGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,17 @@ def load_token():
import os
import re
import glob
import platform

# Determine the correct path based on the operating system
if platform.system() == 'Windows':
path_pattern = os.path.expandvars(r'%appdata%\slobs-client\Local Storage\leveldb\*.log')
elif platform.system() == 'Darwin': # macOS
path_pattern = os.path.expanduser('~/Library/Application Support/slobs-client/Local Storage/leveldb/*.log')
else:
messagebox.showinfo("Unsupported OS", "This script supports only Windows and macOS.")
return None

# Define the directory pattern
path_pattern = os.path.expandvars(r'%appdata%\slobs-client\Local Storage\leveldb\*.log')

# Get all files matching the pattern
files = glob.glob(path_pattern)

Expand Down

0 comments on commit 88c16e5

Please sign in to comment.