Jump to content
LaunchBox Community Forums

danp142

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

danp142's Achievements

4-Bit Adder

4-Bit Adder (2/7)

0

Reputation

  1. Made a mistake on the previous script so don`t use it lol I made a better version anyway, Its still one by one but way quicker, drop LaunchBox BoxArt Name Grabber.exe into a Platform and run it, it searches for all boxart ending in -01 and adds them to a list within a GUI, clicking a line in the list will save it to the clipboard and delete the line from the GUI, then using this new script right click in the search box on Search video games, characters, developers (igdb.com) it will paste and search automatically, make sure to select a platform for better results, then right click a image to match a game and it will rename it using the last pasted text. New Script for Tampermonkey // ==UserScript== // @name IGDB Right Click 4k Boxart Downloader // @namespace http://tampermonkey.net/ // @version 2024-06-05 // @description Right-click on an image to automatically download 4k boxart from IGDB.com and paste text in input fields // @author Clean Boxart // @match *://*.igdb.com/* // @grant none // ==/UserScript== (async function() { 'use strict'; // Function to get text from clipboard async function getClipboardText() { try { const text = await navigator.clipboard.readText(); return text.trim(); } catch (err) { console.error('Failed to read clipboard contents: ', err); return ''; } } // Function to simulate key press function simulateEnterKey(target) { let keyboardEvent = new KeyboardEvent('keydown', { bubbles: true, cancelable: true, key: 'Enter', code: 'Enter', keyCode: 13, which: 13 }); target.dispatchEvent(keyboardEvent); keyboardEvent = new KeyboardEvent('keypress', { bubbles: true, cancelable: true, key: 'Enter', code: 'Enter', keyCode: 13, which: 13 }); target.dispatchEvent(keyboardEvent); keyboardEvent = new KeyboardEvent('keyup', { bubbles: true, cancelable: true, key: 'Enter', code: 'Enter', keyCode: 13, which: 13 }); target.dispatchEvent(keyboardEvent); } // Event listener for context menu document.addEventListener('contextmenu', async function(event) { let target = event.target; // Handle image right-click if (target.tagName === 'IMG') { event.preventDefault(); let imageUrl = target.src; // Determine the image name let imageName = await getClipboardText(); // If no clipboard text, find the nearest link element text if (!imageName) { let parentElement = target.closest('.media'); let linkElement = parentElement ? parentElement.querySelector('a') : null; if (!linkElement) { console.log("No nearby link found for the image."); return; } imageName = linkElement.innerText.trim(); if (!imageName) { console.log("No text found in the nearby link."); return; } } // Edit URL to always download the largest boxart size const sizeVariants = ['_cover_big_2x', '_cover_big', '_cover_med', '_cover_small', '_720p', '_1080p']; sizeVariants.forEach(variant => { if (imageUrl.includes(variant)) { imageUrl = imageUrl.replace(variant, '_4k'); } }); console.log("Modified URL: " + imageUrl); // Fetch the image data let response = await fetch(imageUrl); if (!response.ok) { console.log("Failed to fetch the image."); return; } let blob = await response.blob(); let blobUrl = window.URL.createObjectURL(blob); // Create a hidden link element to trigger the download let link = document.createElement('a'); link.href = blobUrl; link.download = imageName + '.jpg'; // Use the clipboard text or the nearest link text to name the file document.body.appendChild(link); link.click(); document.body.removeChild(link); window.URL.revokeObjectURL(blobUrl); // Handle input or textarea right-click } else if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA') { event.preventDefault(); let clipboardText = await getClipboardText(); if (clipboardText) { // Clear the text field before pasting the data target.value = ''; let clearEvent = new Event('input', { bubbles: true }); target.dispatchEvent(clearEvent); // Set the clipboard text target.value = clipboardText; console.log("Auto-pasted text: " + clipboardText); // Simulate input event to trigger any change listeners let inputEvent = new Event('input', { bubbles: true }); target.dispatchEvent(inputEvent); // Simulate pressing Enter key setTimeout(() => simulateEnterKey(target), 100); // Add a slight delay to ensure paste is completed } } }, true); })(); IGDB 4k boxart & rename.mp4 LaunchBox boxart name grabber.exe
  2. You can use Tampermonkey - Microsoft Edge Addons I made a script for it so you can just right-click on the image and it will automatically download the 4k images, In Tapermokey click add new user script and replace the template with this // ==UserScript== // @name IGDB Right Click 4k Boxart Downloader // @namespace http://tampermonkey.net/ // @version 2024-06-05 // @description Right-click on an image to automatically download 4k boxart from IGDB.com // @author Clean Boxart // @match *://*.igdb.com/* // @grant none // ==/UserScript== (async function() { 'use strict'; document.addEventListener('contextmenu', async function(event) { if (event.target.tagName === 'IMG') { event.preventDefault(); let imageUrl = event.target.src; // Find the nearest link element to the image within the same parent let parentElement = event.target.closest('.media'); let linkElement = parentElement ? parentElement.querySelector('a') : null; if (!linkElement) { console.log("No nearby link found for the image."); return; } // Get the text from the link to use as image name let linkText = linkElement.innerText.trim(); if (!linkText) { console.log("No text found in the nearby link."); return; } // Edit URL to always download the largest boxart size const sizeVariants = ['_cover_big_2x', '_cover_big', '_cover_med', '_cover_small', '_720p', '_1080p']; sizeVariants.forEach(variant => { if (imageUrl.includes(variant)) { imageUrl = imageUrl.replace(variant, '_4k'); } }); console.log("Modified URL: " + imageUrl); // Fetch the image data let response = await fetch(imageUrl); let blob = await response.blob(); let blobUrl = window.URL.createObjectURL(blob); // Create a hidden link element to trigger the download let link = document.createElement('a'); link.href = blobUrl; link.download = `${linkText}.jpg`; // Use the link text to get the game name document.body.appendChild(link); link.click(); document.body.removeChild(link); window.URL.revokeObjectURL(blobUrl); } }, true); })(); Then click File and Save after refresh IGDB.com then you will be able to Right Click on Boxart to download images automatically 20240605201000.mp4
  3. No launchbox but there is a frontends for Xbox One and Series Consoles that uses launchbox meta data but they do not have a scrapper, one is RetroPass retropassdev/RetroPass: Retro Pass is a simple frontend for RetroArch, RetriX Gold, Dolphin, XBSX2 and Xenia Canary running on Xbox. (github.com) thats in the style of GamePass and the other is a fork i have been working on with 2 others called LaunchPass Misunderstood-Wookiee/LaunchPass: Retro Pass Fork with additional features. (github.com) which is the same with more customization but not quite finished just yet. By the way Xbox Series Consoles can run retroarch, dolphin, xenia, ppsspp, flycast and retrix gold all very well with all ports getting pretty frequent updates and the community is getting quite large now in the discord there is 320000 members and growing, LaunchBox and BigBox would be great on xbox and many people would probably get bigbox, i did and im mainly a xbox user
  4. If any one could help and point me in the right direction, I'm looking cover art packs in these two styles
×
×
  • Create New...