Skip to content

Commit 2f5377c

Browse files
richardssamtedwainexShirae
committed
FEATURE - Filesystem plugin browser (#198)
* Add numpy to pip installed packages Signed-off-by: Ted Waine <ted.waine@gmail.com> Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Tweak for set video range action Signed-off-by: Ted Waine <ted.waine@gmail.com> Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Handle missing Decklink hardware when drivers are installed (#238) Signed-off-by: xShirae <xshiraayuki@gmail.com> Signed-off-by: Ted Waine <ted.waine@gmail.com> Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Initial checkin of filesystem_plugin prior to refactor. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * A ffmpeg constant changed, I believe the older one FF_PROFILE_UNKOWN has been obsolete for a while. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Cleanup GUI Better filtering, got progress bar working, and version and date filtering. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Adding fileseq for the python libraries for the FileSystem Browser. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Got the progress bar to work correctly. Also added a separate timing test where you can specify an output directory, not really for unit testing, but good for testing against real directories. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Fix for color scheme for right click menu. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Add readme. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Adding copyright/license info. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Adding (c). Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Dont be quite so agressive updating the UI, only do it every 5 secs or so. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Swapped file-browser with a history view. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Updated readme. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Fixing QML issue. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Demo of widget as a floating window. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Filtering fixes. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Switched to a tree-view with some "smart" collapsing of directories. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Fixed the file-loading issue, it was trying to load a relative path. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Double clicking on a directory changes the overall search window path. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Make the search case insensitive. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Adding different types of tree view. and recursion depths. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Minor tweak to prune empty folders if we are filtering. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Adding a directory view. The directory view allows a more obvious browsing of the tree. For the very top of the directory tree we dont auto-scan for media, once you get down to 4 levels it will start scanning. We have also made a config.json file to store configurations of things like the auto_scan_threashold, along with adding a list of folders that need to be ignored. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Filtering all the time. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * GUI update: * Fixed auto-complete * Tree view opens to node when path is entered in path dialog. * Added a refresh button * Tree view now persistent, with a nicer sidebar label. * Smart scan button now visible. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Added a preview mode, so when you click on a clip, it will automatically load it into the player * double click will load it into your target * Cursor keys will allow you to move through the results loading as you go (left right for icon view, up down for list view) * Enter will do the same as double click. * Preview playlist will be deleted on Enter. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Updated to have a common style, and synced style with xstudio. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * More style fixes, and also making menu options consistent between icon and list view: * Adding Append menu option * Adding copy path menu option * Add compare menu option Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Adding a show-in-finder menu option. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * MInor bug fixes, cleaning threading. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Some code refactoring to simplify it, in particular the dispatch table. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Setup a interface class, so that if you want to change the back end you have a centralized area to do that. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Removed some debug output and removed an un-necesary header. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Fixed a padding issue. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> * Added ability to set the directory root. Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> --------- Signed-off-by: Ted Waine <ted.waine@gmail.com> Signed-off-by: Sam.Richards@taurich.org <Sam.Richards@taurich.org> Signed-off-by: xShirae <xshiraayuki@gmail.com> Signed-off-by: tedwaine <59868698+tedwaine@users.noreply.github.com> Co-authored-by: Ted Waine <ted.waine@gmail.com> Co-authored-by: xShirae <83482842+xShirae@users.noreply.github.com> Co-authored-by: tedwaine <59868698+tedwaine@users.noreply.github.com>
1 parent f7626aa commit 2f5377c

14 files changed

Lines changed: 5147 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ if (USE_VCPKG)
208208
message(FATAL_ERROR "Failed to ensurepip.")
209209
else()
210210
execute_process(
211-
COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy
211+
COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy fileseq
212212
RESULT_VARIABLE PIP_RESULT
213213
)
214214
if(PIP_RESULT)

src/plugin/media_metadata/ffprobe/src/ffprobe_lib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ nlohmann::json populate_stream(AVFormatContext *avfc, int index, MediaStream *is
444444
result["profile"] = nullptr;
445445
if (profile = avcodec_profile_name(par->codec_id, par->profile))
446446
result["profile"] = profile;
447-
else if (par->profile != FF_PROFILE_UNKNOWN) {
447+
else if (par->profile != AV_PROFILE_UNKNOWN) {
448448
result["profile"] = std::to_string(par->profile);
449449
}
450450

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Filesystem Browser Plugin for xStudio
2+
3+
A high-performance, multi-threaded filesystem browser for xStudio, designed to handle large directories and image sequences efficiently.
4+
5+
## Features
6+
7+
- **Fast Multi-threaded Scanning**: Uses a thread pool and BFS algorithm to scan directories quickly without freezing the UI.
8+
- **Image Sequence Detection**: Automatically detects and groups file sequences (e.g., `shot_001.1001.exr` -> `shot_001.####.exr`). Supports exclusion of specific extensions (e.g., `.mov`, `.mp4`) via configuration.
9+
- **Smart Filtering**:
10+
- **Text Filter**: Supports "AND" logic (space-separated terms). E.g., `comp exr` finds files matchings both "comp" and "exr".
11+
- **Time Filter**: Filter by modification time (Last 1 day, 1 week, etc.).
12+
- **Version Filter**: Filter to show only the latest version or latest 2 versions of a shot.
13+
- **Navigation**:
14+
- Native Directory Picker integration.
15+
- Path completion/suggestions.
16+
- History tracking (via sticky attributes).
17+
- **Playback Integration**:
18+
- **Double-Click**: Loads media and immediately starts playback using the playlist's playhead logic.
19+
- **Context Menu**:
20+
- **Replace**: Replaces the currently viewed media with the selected item.
21+
- **Compare with**: Loads the selected item and sets up an A/B comparison with the current media.
22+
23+
## Usage
24+
25+
1. **Open the Browser**:
26+
- Go to `View` -> `Panels` -> `Filesystem Browser`.
27+
- Or use the hotkey **'B'**.
28+
2. **Navigation**:
29+
- Enter a path in the text field or click the folder icon to browse.
30+
- **Double-click** a folder to navigate into it.
31+
- **Quick Access (▼)**: Click the arrow next to the path field to open the Quick Access list.
32+
- **History**: Shows recently visited directories.
33+
- **Pinned**: Shows your pinned locations for easy access.
34+
- **Pinning**: Click the "Pin" icon (📌) next to any item to pin or unpin it. Pinned items appear at the top in gold.
35+
36+
## Configuration
37+
38+
### Environment Variables
39+
40+
- `XSTUDIO_BROWSER_PINS`: Pre-define a list of pinned directories.
41+
- Format: JSON list of objects or simple path string (colon-separated on Unix, semicolon on Windows).
42+
- Example (JSON): `'[{"name": "Show", "path": "/jobs/show"}, "/home/user"]'`
43+
- Example (Simple): `/jobs/show:/home/user`
44+
45+
3. **Loading Media**:
46+
- **Double-click** a file/sequence to load it into the current or new playlist.
47+
- **Right-click** for advanced actions (Replace, Compare).
48+
49+
## Logic & Performance
50+
51+
- **Scanning**: The scanner runs in a background thread, reporting partial results to the UI to keep it responsive.
52+
- **Sequences**: Uses the `fileseq` library (for robust sequence parsing.
53+
54+
## Testing
55+
56+
A benchmark script is included to test the scanner performance:
57+
58+
```bash
59+
python scanner_benchmark.py --threads 2 /shots/MYSHOW/MYSHOT
60+
```
61+
62+
This allows you to test the scanning performance at different thread speeds for the specified directory.
63+
64+
```bash
65+
python test_scanner.py
66+
```
67+
Unit test for scanner.
68+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .filesystem_browser import create_plugin_instance
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"extensions": [
3+
".mov",
4+
".mp4",
5+
".mkv",
6+
".exr",
7+
".jpg",
8+
".jpeg",
9+
".png",
10+
".dpx",
11+
".tiff",
12+
".tif",
13+
".wav",
14+
".mp3",
15+
".pdf"
16+
],
17+
"ignore_dirs": [
18+
".git",
19+
".quarantine",
20+
"eryx_unreal_plugin",
21+
".DS_Store"
22+
],
23+
"root_ignore_dirs": [
24+
"/Applications",
25+
"/bin",
26+
"/cores",
27+
"/dev",
28+
"/etc",
29+
"/Library",
30+
"/opt",
31+
"/private",
32+
"/sbin",
33+
"/System",
34+
"/usr",
35+
"/var",
36+
"/proc",
37+
"/sys",
38+
"/snap"
39+
],
40+
"max_recursion_depth": 6,
41+
"auto_scan_threshold": 4
42+
}

0 commit comments

Comments
 (0)