fix(cli): more consistent labeling in movie/show download prompt
This commit is contained in:
parent
b316c58b1a
commit
a27c18101b
5 changed files with 25 additions and 21 deletions
|
@ -3,7 +3,7 @@ import path from 'path';
|
|||
import https from 'https';
|
||||
import inquirer from 'inquirer';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { loadConfig } from './config.js';
|
||||
import { loadConfig, MEDIA_TYPES } from './config.js';
|
||||
import { sanitizeMediaString } from './sanitize.js';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
@ -51,8 +51,11 @@ export const downloadWatchingImages = async () => {
|
|||
const { mediaType } = await inquirer.prompt({
|
||||
type: 'list',
|
||||
name: 'mediaType',
|
||||
message: 'Movie or a show?',
|
||||
choices: Object.keys(config.mediaPaths)
|
||||
message: 'Movie or a tv show?',
|
||||
choices: MEDIA_TYPES.map(({ key, label }) => ({
|
||||
name: label,
|
||||
value: key
|
||||
}))
|
||||
});
|
||||
const { tmdbId } = await inquirer.prompt({
|
||||
name: 'tmdbId',
|
||||
|
@ -241,7 +244,7 @@ export const downloadAsset = async () => {
|
|||
type: 'list',
|
||||
name: 'type',
|
||||
message: 'What type of asset are you downloading?',
|
||||
choices: ['movie/show', 'artist', 'album', 'book']
|
||||
choices: ['movie/tv show', 'artist', 'album', 'book']
|
||||
});
|
||||
|
||||
if (type === 'artist') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue