fix: remove plex settings

This commit is contained in:
MasutaYunikon committed 2026-03-28 10:44:13 +01:00
commit 83a2fb9860
5 files changed
+25 -32

No files matched your search

+7
View File
@@ -1,5 +1,12 @@
# Changelog
## [3.1.0](https://github.com/Masutayunikon/FanKarr/compare/v3.0.0...v3.1.0) (2026-03-27)
### Features
* use original_name and formated_name from scraper to bypass timeout ([1b693fc](https://github.com/Masutayunikon/FanKarr/commit/1b693fc53b9ca3a830c952c3f2c101bf1da7d27e))
## [3.0.0](https://github.com/Masutayunikon/FanKarr/compare/v2.4.1...v3.0.0) (2026-03-27)
+2 -2
View File
@@ -41,8 +41,8 @@ app.get('/api/settings', requireAuth, (_req, res) => {
res.json(readSettings())
})
app.post('/api/settings', requireAuth, (req, res) => {
const { mediaPath, completePath, organizeMode, category, nfoSupport, autoImport, usePlexTitles } = req.body
const updated = writeSettings({ mediaPath, completePath, organizeMode, category, nfoSupport, autoImport, usePlexTitles })
const { mediaPath, completePath, organizeMode, category, nfoSupport, autoImport } = req.body
const updated = writeSettings({ mediaPath, completePath, organizeMode, category, nfoSupport, autoImport })
logger.info('api', 'Paramètres mis à jour')
res.json(updated)
})
+4 -9
View File
@@ -20,12 +20,12 @@ function error(msg: string) { parentPort?.postMessage({ type: 'log', level: 'err
function debug(msg: string) { parentPort?.postMessage({ type: 'log', level: 'debug', msg }) }
// ─── Settings ─────────────────────────────────────────────────
function readSettings(): { mediaPath: string; completePath: string; organizeMode: string; nfoSupport: boolean; usePlexTitles: boolean } {
function readSettings(): { mediaPath: string; completePath: string; organizeMode: string; nfoSupport: boolean } {
try {
const p = path.join(DATA_DIR, 'settings.json')
if (!fs.existsSync(p)) return { mediaPath: '', completePath: '', organizeMode: 'hardlink', nfoSupport: false, usePlexTitles: false }
if (!fs.existsSync(p)) return { mediaPath: '', completePath: '', organizeMode: 'hardlink', nfoSupport: false }
return JSON.parse(fs.readFileSync(p, 'utf-8'))
} catch { return { mediaPath: '', completePath: '', organizeMode: 'hardlink', nfoSupport: false, usePlexTitles: false } }
} catch { return { mediaPath: '', completePath: '', organizeMode: 'hardlink', nfoSupport: false } }
}
// ─── Organized log ────────────────────────────────────────────
@@ -271,13 +271,8 @@ async function organizeTorrent(hash: string, name: string, savePath: string, ser
}
const { torrent, serieData } = found
const { usePlexTitles } = readSettings()
const rawTitle = serieData.title ?? serieData.show_title ?? name
const serieTitle = sanitizeDirName(
usePlexTitles && serieData.title_for_plex
? serieData.title_for_plex
: rawTitle
)
const serieTitle = sanitizeDirName(rawTitle)
debug(`Série identifiée : "${serieTitle}" (mode: ${organizeMode}${nfoSupport ? ', NFO' : ''})`)
+12 -14
View File
@@ -5,23 +5,21 @@ import { DATA_DIR } from './config.js'
const DATA_PATH = path.join(DATA_DIR, 'settings.json')
export interface Settings {
mediaPath : string
completePath : string
organizeMode : 'hardlink' | 'move'
category : string
nfoSupport : boolean
autoImport : boolean
usePlexTitles : boolean // utilise title_for_plex pour les noms de dossiers
mediaPath : string
completePath : string
organizeMode : 'hardlink' | 'move'
category : string
nfoSupport : boolean
autoImport : boolean
}
const defaults: Settings = {
mediaPath : '',
completePath : '',
organizeMode : 'hardlink',
category : 'fankai',
nfoSupport : false,
autoImport : true,
usePlexTitles: false,
mediaPath : '',
completePath: '',
organizeMode: 'hardlink',
category : 'fankai',
nfoSupport : false,
autoImport : true,
}
export function readSettings(): Settings {
@@ -72,12 +72,6 @@
description="Importer automatiquement dès qu'un téléchargement est terminé. Vérifie toutes les 5 minutes."
/>
<SettingsToggle
v-model="form.usePlexTitles"
label="Titres optimisés Plex"
description="Utilise title_for_plex pour les noms de dossiers — évite les caractères spéciaux."
/>
<SettingsToggle
v-model="form.nfoSupport"
label="NFO / Métadonnées"
@@ -133,7 +127,6 @@ const form = ref({
organizeMode : 'hardlink' as 'hardlink' | 'move',
nfoSupport : false,
autoImport : true,
usePlexTitles: false,
})
const picker = ref<{ open: boolean; field: 'completePath' | 'mediaPath'; currentPath: string }>({