Commit 45de52a
Fix issue #1554: Preserve custom thumbnails in gallery script
Modified scripts/generate_gallery.py to check if a thumbnail file already
exists before extracting from notebooks. This prevents the script from
overwriting manually-placed custom thumbnails in the _thumbnails directory.
The gen_previews() method now:
1. Checks if self.png_path exists
2. If yes, logs info message and returns early (preserving custom thumbnail)
3. If no, proceeds with extraction from notebook or uses default logo
Fixes #15541 parent f8d03be commit 45de52a
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
| |||
0 commit comments