From 5929fc0b4b98bb7ea7f0f7752ffb4f818cb33cf7 Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Thu, 7 Jul 2022 19:05:32 +0300 Subject: [PATCH] Updated help doc for backend:ignore:* --- src/Commands/Backend/Ignore/ListCommand.php | 17 +++++----- src/Commands/Backend/Ignore/ManageCommand.php | 31 +++++++------------ 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/src/Commands/Backend/Ignore/ListCommand.php b/src/Commands/Backend/Ignore/ListCommand.php index e34e0700..ab080c08 100644 --- a/src/Commands/Backend/Ignore/ListCommand.php +++ b/src/Commands/Backend/Ignore/ListCommand.php @@ -44,25 +44,26 @@ final class ListCommand extends Command ->addOption('backend', null, InputOption::VALUE_REQUIRED, 'Filter based on backend.') ->addOption('db', null, InputOption::VALUE_REQUIRED, 'Filter based on db.') ->addOption('id', null, InputOption::VALUE_REQUIRED, 'Filter based on id.') - ->addOption('with-title', null, InputOption::VALUE_NONE, 'Include entity title in response. Slow operation') ->setDescription('List Ignored external ids.') ->setHelp( <<--type, --backend, --db, --id]. -You can filter the results by using one or more of the provided options like --type, --backend, --db +------------ +[ Examples ] +------------ -For example, To list all ids that are being ignored for specific backend, You can do something like +# List all ignore rules that reletes to specific backend. -{$cmdContext} backend:ignore:list --backend plex_home +{$cmdContext} backend:ignore:list --backend my_backend -You can append more filters to narrow down the list. For example, to filter on both backend and db: +# Appending more filters to narrow down list -{$cmdContext} backend:ignore:list --backend plex_home --db tvdb +{$cmdContext} backend:ignore:list --backend my_backend --db tvdb HELP - ); } diff --git a/src/Commands/Backend/Ignore/ManageCommand.php b/src/Commands/Backend/Ignore/ManageCommand.php index d4b5d53d..0776cb7b 100644 --- a/src/Commands/Backend/Ignore/ManageCommand.php +++ b/src/Commands/Backend/Ignore/ManageCommand.php @@ -45,7 +45,7 @@ final class ManageCommand extends Command $this->setName($cmdRoute) ->setDescription('Add/Remove external id from ignore list.') ->addOption('remove', 'r', InputOption::VALUE_NONE, 'Remove id from ignore list.') - ->addArgument('id', InputArgument::REQUIRED, 'Id to ignore. Id format: type://db:id@backend_name') + ->addArgument('id', InputArgument::REQUIRED, 'Id to ignore.') ->setHelp( <<id format is: type://db:id# Adding exteranl id to ignore list -To ignore tvdb id 320234 from plex_home backend you would do something like +To ignore tvdb id 320234 from my_backend backend you would do something like -For shows external id: -{$cmdContext} {$cmdRoute} show://tvdb:320234@plex_home +{$cmdContext} {$cmdRoute} show://tvdb:320234@my_backend -For movies external id: -{$cmdContext} {$cmdRoute} movie://tvdb:320234@plex_home +If you want to limit this rule to specfic item id you would add [?id=backend_id] to the rule, for example -For episodes external id: -{$cmdContext} {$cmdRoute} episode://tvdb:320234@plex_home +{$cmdContext} {$cmdRoute} show://tvdb:320234@my_backend?id=1212111 -To scope ignore rule to specfic item from backend, You can do the same as before and add [?id=backend_id]. +This will ignore [tvdb://320234] id only when the context id = [1212111] -[backend_id]: - -Refers to the item id from backend. To ignore a specfic guid for item id 1212111 you can do something like this: - -{$cmdContext} {$cmdRoute} episode://tvdb:320234@plex_home?id=1212111 - -# Removing exteranl id from ignore list ? +# Removing exteranl id from ignore list To Remove an external id from ignore list just append [-r, --remove] to the command. For example, -{$cmdContext} {$cmdRoute} --remove episode://tvdb:320234@plex_home +{$cmdContext} {$cmdRoute} --remove episode://tvdb:320234@my_backend -The id should match what what entered. +The id should match what was added exactly. -# Where the list is stored? +# ignore.yaml file location -By defualt we store the list at {$ignoreListFile} +By defualt it should be at {$ignoreListFile} HELP );