User Tools

Site Tools


config:stash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
config:stash [2025/06/24 11:22] Wuffconfig:stash [2025/08/30 00:01] (current) – [api] Wuff
Line 81: Line 81:
 </code> </code>
  
 +==== Scene Search at top ====
 +
 +This moves the scene search from the sidebar to the top bar
 +
 +<code javascript>
 +// Move search from sidebar next to filter at top
 +(function() {
 +  const sourceSelector = 'body div div.main.container-fluid div.item-list-container.scene-list div.sidebar-pane div.sidebar div.sidebar-search-container';
 +  const targetSelector = 'body div div.main.container-fluid div.item-list-container.scene-list.hide-sidebar div.sidebar-pane.hide-sidebar div div.scene-list-toolbar.btn-toolbar';
 +
 +  const observer = new MutationObserver(() => {
 +    const sourceElement = document.querySelector(sourceSelector);
 +    const targetContainer = document.querySelector(targetSelector);
 +
 +    if (sourceElement && targetContainer) {
 +      targetContainer.insertBefore(sourceElement, targetContainer.lastChild);
 +      observer.disconnect(); // Stop observing once done
 +      console.log('Moved element to target container.');
 +    }
 +  });
 +
 +  // Observe the entire document for added/removed elements
 +  observer.observe(document.body, {
 +    childList: true,
 +    subtree: true
 +  });
 +})();
 +</code>
  
 ==== Studio as Text ==== ==== Studio as Text ====
Line 137: Line 165:
  
 https://github.com/stashapp/stash/issues/3918 https://github.com/stashapp/stash/issues/3918
 +
 +
 +<code>
 +#If API authentication is required, add the following to the curl commands:
 +-H "ApiKey: YOUR_API_KEY_HERE" \
 +</code>
 +
 +<code>
 +# Metadata Scan of a particular directory
 +curl -X POST http://192.168.1.2:9998/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{
 +    "query": "mutation MetadataScan($paths: [String!]!) { metadataScan(input: { paths: $paths }) }",
 +    "variables": {
 +      "paths": ["/data/stash-temp"]
 +    }
 +  }'
 +
 +curl -X POST http://localhost:9999/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{
 +    "query": "mutation { scanMetadata(input: { paths: [\"/path/to/your/folder\"] generateCovers: true generatePreviews: true generateSprites: true generatePhashes: true }) }"
 +  }'
 +</code>
 +
 +
 +<code>
 +# Full Metadata Scan
 +curl -X POST http://localhost:9998/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{"query": "mutation { metadataScan(input: {}) }"}'
 +
 +curl -X POST http://localhost:9999/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{"query": "mutation { scanMetadata(input: { generateCovers: true generatePreviews: true generateSprites: true generatePhashes: true }) }"}'
 +
 +</code>
 +
 +Show status:
 +<code>
 +curl -X POST http://localhost:9999/graphql \
 +  -H "Content-Type: application/json" \
 +  -d '{"query": "{ metadataScanStatus { status progress } }"}'
 +</code>
 +
 +Show status until done:
 +<code>
 +while true; do
 +  curl -s -X POST http://localhost:9999/graphql \
 +    -H "Content-Type: application/json" \
 +    -d '{"query": "{ metadataScanStatus { status progress } }"}' \
 +  | jq '.data.metadataScanStatus';
 +  sleep 5;
 +done
 +</code>
 +
  
  
Line 412: Line 496:
     #merge_scenes_with_same_filename(STASH_SCHEME, STASH_HOST, STASH_PORT, DELETE, DRYRUN, FILE)     #merge_scenes_with_same_filename(STASH_SCHEME, STASH_HOST, STASH_PORT, DELETE, DRYRUN, FILE)
 </code> </code>
 +
 +
config/stash.1750760574.txt.gz · Last modified: by Wuff