You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/FileMonitor/README.md
+105-6Lines changed: 105 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# FileMonitor: Ver 0.9.0 (By David Maisonave)
1
+
# FileMonitor: Ver 1.0.3 (By David Maisonave)
2
2
3
3
FileMonitor is a [Stash](https://github.com/stashapp/stash) plugin with the following two main features:
4
4
@@ -10,8 +10,19 @@ FileMonitor is a [Stash](https://github.com/stashapp/stash) plugin with the foll
10
10
From the GUI, FileMonitor can be started as a service or as a plugin. The recommended method is to start it as a service. When started as a service, it will jump on the Task Queue momentarily, and then disappear as it starts running in the background.
11
11
12
12
- To start monitoring file changes, go to **Stash->Settings->Task->[Plugin Tasks]->FileMonitor**, and click on the [Start Library Monitor Service] button.
-**Important Note**: At first, this will show up as a plugin in the Task Queue momentarily. It will then disappear from the Task Queue and run in the background as a service.
15
+
-**Important Note**: At first, it will show up as a plugin in the Task Queue momentarily. It will then disappear from the Task Queue and run in the background as a service.
16
+
- To check running status of FileMonitor, use the Settings->Tools->FileMonitor option.
- Generated Content-> [Generate] (Every Sunday at 7AM)
42
53
- Library -> [Scan] (Weekly) (Every Sunday at 3AM)
43
-
- Backup -> [Backup] 2nd sunday of the month at 1AM
54
+
- Backup -> [Backup] 2nd Sunday of the month at 1AM
44
55
- The example tasks are disabled by default because they either have a zero frequency value or the time field is set to **DISABLED**.
45
56
46
57
To configure the schedule or to add new task, edit the **task_scheduler** section in the **filemonitor_config.py** file.
@@ -92,7 +103,7 @@ To configure the schedule or to add new task, edit the **task_scheduler** sectio
92
103
- The **validateDir** field can be used to define the plugin sub directory, which is checked to see if it exist before running the task.
93
104
-**taskName** field is used to name the task to call for the associated plugin. It can not be used with "taskQue":False
94
105
-**taskQue** field is used to call the plugin without using the Task Queue. I.E. "taskQue":False. When this field is set to False, the taskName field can NOT be used. Instead use taskMode to identify the task to call.
95
-
-**taskMode** field is used in order to run the plugin without using the Task Queue. The plugin runs immediatly. Be careful not to confuse taskMode with taskName. Look in the plugin \*.yml file under the **tasks** section where it defines both the task-name and the task-mode.
106
+
-**taskMode** field is used in order to run the plugin without using the Task Queue. The plugin runs immediately. Be careful not to confuse taskMode with taskName. Look in the plugin \*.yml file under the **tasks** section where it defines both the task-name and the task-mode.
96
107
- Task can be scheduled to run monthly, weekly, hourly, and by minutes.
97
108
- The scheduler list uses two types of syntax. One is **weekday** based, and the other is **frequency** based.
98
109
@@ -142,9 +153,12 @@ To configure the schedule or to add new task, edit the **task_scheduler** sectio
142
153
- pip install -r requirements.txt
143
154
- Or manually install each requirement:
144
155
-`pip install stashapp-tools --upgrade`
145
-
-`pip install pyYAML`
156
+
-`pip install requests`
146
157
-`pip install watchdog`
147
158
-`pip install schedule`
159
+
-`pip install pyyaml`
160
+
161
+
Note: pyyaml is only needed for a Docker setup.
148
162
149
163
## Installation
150
164
@@ -170,3 +184,88 @@ Please use the following link to report FileMonitor bugs:
170
184
Please use the following link to report FileMonitor Feature Request:[FileMonitor Feature Reques](https://github.com/David-Maisonave/Axter-Stash/issues/new?assignees=&labels=Enhancement&projects=&template=feature_request_plugin.yml&title=%F0%9F%92%A1%EF%B8%8F%5BEnhancement%5D%3A%5BFileMonitor%5D+Your_Short_title)
171
185
172
186
Please do **NOT** use the feature request to include any problems associated with errors. Instead use the bug report for error issues.
187
+
188
+
## Docker
189
+
190
+
### Single Stash Docker Installation
191
+
192
+
**Note:** This section is for users who have a single instance of Stash Docker installed, and do NOT have Stash installed on the host machine.
193
+
194
+
- FileMonitor requires watchdog module in order to work. Although the watchdog module loads and runs on Docker, it fails to function because Docker fails to report file changes.
195
+
- FileMonitor can work with Docker Stash setup if it's executed externally on the host OS. To do this, start FileMonitor on the command line and pass the Stash URL and docker YML file. (**--url** and **--docker**)
- The **docker-compose.yml** file should be located in the folder associated with the Docker Stash container, and it list the mapped paths which FileMonitor uses to determine the host path which is mapped to the Docker path.
210
+
- For more information, see [Using FileMonitor as a script](https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/FileMonitor#Using-FileMonitor-as-a-script)
211
+
- For more information on creating a Docker Stash setup, see (https://github.com/David-Maisonave/Axter-Stash/tree/main/Docker)
212
+
213
+
### Multiple Stash Docker Configuration
214
+
215
+
**Note:** This section applies to users who have multiple Stash Docker instances running, and also have Stash installed and running on the host machine.
216
+
217
+
- FileMonitor can be configured to run on the host machine, and update all the Stash Docker instances when an associated file change occurs. To activate this option change the filemonitor_config.py file by setting the **dockers** field with the information associated with each Stash Docker instance.
218
+
- There are three examples that are commented out in the **dockers** field, which users can easily modify to configure for their particular Stash Docker instances.
219
+
- The following is the uncommented example from the **filemonitor_config.py** file.
220
+
221
+
```Python
222
+
# Docker notification from host machine
223
+
"dockers": [
224
+
# A simple basic example with only one bind mount path.
- Each Stash Docker instance requires three fields, which are case sensitive.
251
+
-**GQL**: This is the Stash URL which is used by the host machine to access the particular Stash Docker instance. Note: Do **NOT** include graphql in the URL.
252
+
-**apiKey**: This is a required field, but the value can be empty if the Stash instances doesn't require a password.
253
+
-**bindMounts**: At least one bind mount path must be specified.
254
+
- The first string defines the host path (**C:\Video**), and the second string defines the Docker mount path (**/mnt/Video**). These paths are listed on Docker-Desktop under Containers->ContainerName->[Bind Mounts] tab.
255
+
- The host path must be a fully qualified host local path. It can **not** be a relative path **(./../Videos)** and it can **not** be a URL with a local network domain name **(\\\\MyComputerName\\SharedPath\\MyFolder)**.
256
+
- If the host path contains a backslash, start the string with an r. Example: **r"C:\Vid"**
257
+
- If any of the below mount paths are included, they will be ignored because they could trigger a feedback loop.
258
+
- /etc/localtime:/etc/localtime:ro
259
+
- ./config:/root/.stash
260
+
- ./metadata:/metadata
261
+
- ./cache:/cache
262
+
- ./blobs:/blobs
263
+
- ./generated:/generated
264
+
265
+
### Stash Docker Installer
266
+
267
+
If you need help installing Stash Docker, use the Stash Docker installer in the following link: (https://github.com/David-Maisonave/Axter-Stash/tree/main/Docker)
268
+
269
+
## Future Planned Features or Fixes
270
+
271
+
- Have the FileMonitor running status ICON update the icon without having to go to the Settings->Tools->FileMonitor page. Planned for version 1.2.0.
0 commit comments