cleaning up code

This commit is contained in:
2026-08-09 09:54:52 -04:00
parent 1d06156b8b
commit 2abdbaa4e9
59 changed files with 518 additions and 2929 deletions

View File

@@ -13,7 +13,7 @@ import path from "path"
const APP_DIR_NAME = "podtui"
/** Resolve the XDG_CONFIG_HOME directory, defaulting to ~/.config */
export function getXdgConfigHome(): string {
function getXdgConfigHome(): string {
const xdg = process.env.XDG_CONFIG_HOME
if (xdg) return xdg
@@ -44,7 +44,7 @@ export async function ensureConfigDir(): Promise<string> {
}
/** Resolve the XDG_DATA_HOME directory, defaulting to ~/.local/share */
export function getXdgDataHome(): string {
function getXdgDataHome(): string {
const xdg = process.env.XDG_DATA_HOME
if (xdg) return xdg
@@ -55,12 +55,12 @@ export function getXdgDataHome(): string {
}
/** Get the application-specific data directory path */
export function getDataDir(): string {
function getDataDir(): string {
return path.join(getXdgDataHome(), APP_DIR_NAME)
}
/** Get the downloads directory path */
export function getDownloadsDir(): string {
function getDownloadsDir(): string {
return path.join(getDataDir(), "downloads")
}