-
Notifications
You must be signed in to change notification settings - Fork 341
/
commandlineparser.cpp
121 lines (114 loc) · 6.32 KB
/
commandlineparser.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#include <QString>
#include "mythcorecontext.h"
#include "commandlineparser.h"
MythBackendCommandLineParser::MythBackendCommandLineParser() :
MythCommandLineParser(MYTH_APPNAME_MYTHBACKEND)
{ LoadArguments(); }
void MythBackendCommandLineParser::LoadArguments(void)
{
addHelp();
addVersion();
addDaemon();
addSettingsOverride();
addUPnP();
addLogging();
addPIDFile();
CommandLineArg::AllowOneOf(QList<CommandLineArg*>()
<< add("--printsched", "printsched", false,
"Print upcoming list of scheduled recordings.", "")
// ->SetDeprecated("use mythutil instead")
<< add("--testsched", "testsched", false,
"do some scheduler testing.", "")
// ->SetDeprecated("use mythutil instead")
<< add("--resched", "resched", false,
"Trigger a run of the recording scheduler on the existing "
"master backend.",
"This command will connect to the master backend and trigger "
"a run of the recording scheduler. The call will return "
"immediately, however the scheduler run may take several "
"seconds to a minute or longer to complete.")
->SetDeprecated("use mythutil instead")
<< add("--scanvideos", "scanvideos", false,
"Trigger a rescan of media content in MythVideo.",
"This command will connect to the master backend and trigger "
"a run of the Video scanner. The call will return "
"immediately, however the scanner may take several seconds "
"to tens of minutes, depending on how much new or moved "
"content it has to hash, and how quickly the scanner can "
"access those files to do so. If enabled, this will also "
"trigger the bulk metadata scanner upon completion.")
->SetDeprecated("use mythutil instead")
<< add("--event", "event", "",
"Send a backend event test message.", "")
->SetDeprecated("use mythutil instead")
<< add("--systemevent", "systemevent", "",
"Send a backend SYSTEM_EVENT test message.", "")
->SetDeprecated("use mythutil instead")
<< add("--clearcache", "clearcache", false,
"Trigger a cache clear on all connected MythTV systems.",
"This command will connect to the master backend and trigger "
"a cache clear event, which will subsequently be pushed to "
"all other connected programs. This event will clear the "
"local database settings cache used by each program, causing "
"options to be re-read from the database upon next use.")
->SetDeprecated("use mythutil instead")
<< add("--printexpire", "printexpire", "ALL",
"Print upcoming list of recordings to be expired.", "")
// ->SetDeprecated("use mythutil instead")
<< add("--setverbose", "setverbose", "",
"Change debug mask of the existing master backend.", "")
// ->SetDeprecated("use mythutil instead")
<< add("--setloglevel", "setloglevel", "",
"Change logging level of the existing master backend.", "")
// ->SetDeprecated("use mythutil instead");
);
add("--nosched", "nosched", false, "",
"Intended for debugging use only, disable the scheduler "
"on this backend if it is the master backend, preventing "
"any recordings from occuring until the backend is "
"restarted without this option.");
add("--nojobqueue", "nojobqueue", false, "",
"Intended for debugging use only, disable the jobqueue "
"on this backend. As each jobqueue independently selects "
"jobs, this will only have any affect on this local "
"backend.");
add("--nohousekeeper", "nohousekeeper", false, "",
"Intended for debugging use only, disable the housekeeper "
"on this backend if it is the master backend, preventing "
"any guide processing, recording cleanup, or any other "
"task performed by the housekeeper.");
add("--noautoexpire", "noautoexpire", false, "",
"Intended for debugging use only, disable the autoexpirer "
"on this backend if it is the master backend, preventing "
"recordings from being expired to clear room for new "
"recordings.");
add("--user", "username", "",
"Drop permissions to username after starting.", "");
add("--upnprebuild", "upnprebuild", false, "", "")
->SetRemoved("The UPnP server no longer maintains its own list\n"
" of video content, and instead uses the shared\n"
" list of the Video Library. Update the Video Library\n"
" content list from within mythfrontend, or on the\n"
" command line using 'mythutil --scanvideos'.",
"0.25");
add("--infile", "inputfile", "", "", "")
->SetRemoved("mythbackend is no longer used for preview\n"
" generation. Please use mythpreviewgen.", "0.25");
add("--outfile", "outputfile", "", "", "")
->SetRemoved("mythbackend is no longer used for preview\n"
" generation. Please use mythpreviewgen.", "0.25");
add("--chanid", "chanid", "", "", "")
->SetRemoved("mythbackend is no longer used for preview\n"
" generation. Please use mythpreviewgen.", "0.25");
add("--starttime", "starttime", "", "", "")
->SetRemoved("mythbackend is no longer used for preview\n"
" generation. Please use mythpreviewgen.", "0.25");
}
QString MythBackendCommandLineParser::GetHelpHeader(void) const
{
return "MythBackend is the primary server application for MythTV. It is \n"
"used for recording and remote streaming access of media. Only one \n"
"instance of this application is allowed to run on one host at a \n"
"time, and one must be configured to operate as a master, performing \n"
"additional scheduler and housekeeper tasks.";
}