Monitored Folders #2
Replies: 5 comments 8 replies
-
|
Monitoring folders/file in Node JS isn't a difficult task. As it currently stands, and I say currently because I'm always open to changes that will make the user experience easier, buckets are not tied to directories, so while renaming or deleting a file could result in updating a bucket to rename or remove a file, where would added files go? In other words, if you added a file to the file system, which bucket would it go in? This would require buckets to be tied to directories (and/or its subdirectories). I'm going to mention @imsorrywhat here because they had a similar request to monitor files for when their filenames get changed. I think this can be an interesting discussion. One solution could be to simply tie a bucket to a directory. Instead of picking files to be in the bucket from the UI you would just pick what directory that bucket is connected to, and then when the backend creates the string for Plex it just looks in that directory and picks the random file from there instead of from the list of files in the config file. Then any change to the directory (adding, removing, renaming) would trigger the string to be regenerated so if something was renamed or removed it wouldn't be in the string anymore. Pros:
Cons:
I'm open to discussion and perhaps alternatives I haven't considered. |
Beta Was this translation helpful? Give feedback.
-
|
Maybe I'm not understanding this correctly so let me know if that's the case. When editing existing buckets, they all show the same file list on the right side. So if a new file is added to the directory, wouldn't it just show up on the right side window? Then one would just edit the desired bucket and add the new file. I will say that I like not having to manage directories on the host side. I'm deploying with docker so I would have to edit the compose and restart the container anytime I want to add a new directory. |
Beta Was this translation helpful? Give feedback.
-
|
I've made additional updates that I pushed to develop as version 0.1.3. As of right now, Preroll Plus is monitoring your preroll folders, so if you rename, delete, or move a file it should automatically scan your Buckets and update (or delete) that file in any Bucket it is found in. It will also auto-update the Plex string as well, so that there aren't any prerolls in the string that aren't in the file system. Same if you create/update an existing Bucket in the UI. It will also update the Plex string and if you delete a Bucket it should also delete that Bucket from any Sequences that Bucket was in. Adding a file currently does not do anything, but I will still be looking into creating an option in the buckets to either add/remove files from Buckets like you can now, or the option to tie a Bucket to a directory as requested above. This should satisfy both worlds. It might take a little time to do that since it will involve updating several pieces of code. Maybe sometime next week. I'm also looking into having the frontend update in real-time when files are changed in the file system. Right now, if you make any changes to the file system you will need to refresh your browser to pull those changes in. Chad |
Beta Was this translation helpful? Give feedback.
-
|
How often is the scan performed? I just removed a file and refreshed the browser but it's still in the bucket. In case this is a bug, my files are stored in this way: /Prerolls/Holiday/HolidayPreroll.mp4, /Prerolls/Normal/NormalPreroll.mp4, etc. Let me know if you'd like me to open an issue. |
Beta Was this translation helpful? Give feedback.
-
I've finally completed both of these features and they are ready to test.
The new tag is chadwpalm/prerollplus:feature-bucket-dir-0.1.5.24 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice to have an option to monitor a folder and automatically update the bucket when prerolls are added or removed.
Beta Was this translation helpful? Give feedback.
All reactions