Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bc9d5f520b | |||
| 8b00f6df15 | |||
| 8fe76559a2 | |||
| b804d2ce13 | |||
| b772223dc2 | |||
| 3fe601c06e | |||
| ab59d1edf3 | |||
| 2c6a429188 | |||
| 5627be8907 | |||
| 6f30434002 | |||
| a4f8a9d297 | |||
| 89b57f2f65 | |||
| e1e5b3344a | |||
| 32af9fe29b | |||
| 282517f2d4 | |||
| 2062be4c5b | |||
| 74e91c6da1 | |||
| acc770233f | |||
| 80cfdff8f6 | |||
| 634ebd62c4 | |||
| 00e05690ec | |||
| 2031057559 | |||
| c3c4488cdc | |||
| a1e45d9ed5 | |||
| 343f892029 | |||
| f0996e4fce | |||
| 5cd1a221bb | |||
| e92321ada1 | |||
| 99d3881e88 | |||
| 504bdd7473 |
+6
-117
@@ -1,122 +1,11 @@
|
||||
@echo off
|
||||
setlocal
|
||||
echo ============================================================
|
||||
echo Relationships Jukebox - Playlist Generator
|
||||
echo ============================================================
|
||||
echo.
|
||||
|
||||
REM -- Strip trailing backslash from %~dp0 to avoid "Illegal characters in path" --
|
||||
set "ROOT=%~dp0"
|
||||
if "%ROOT:~-1%"=="\" set "ROOT=%ROOT:~0,-1%"
|
||||
|
||||
REM -- If a local ffmpeg folder exists inside the addon, prepend it to PATH --
|
||||
REM This ensures the PS1 script's Find-Ffmpeg can discover it even if
|
||||
REM it isn't on the system PATH yet.
|
||||
if exist "%ROOT%\ffmpeg\ffmpeg.exe" (
|
||||
set "PATH=%ROOT%\ffmpeg;%PATH%"
|
||||
)
|
||||
|
||||
REM -- Check for -UseWinRAR flag --
|
||||
set "PS_ARGS=-NoProfile -ExecutionPolicy Bypass -File "%ROOT%\GeneratePlaylist.ps1" -RootPath "%ROOT%""
|
||||
if "%1"=="-UseWinRAR" (
|
||||
set "PS_ARGS=-NoProfile -ExecutionPolicy Bypass -File "%ROOT%\GeneratePlaylist.ps1" -RootPath "%ROOT%" -UseWinRAR"
|
||||
)
|
||||
if "%1"=="-usewinrar" (
|
||||
set "PS_ARGS=-NoProfile -ExecutionPolicy Bypass -File "%ROOT%\GeneratePlaylist.ps1" -RootPath "%ROOT%" -UseWinRAR"
|
||||
)
|
||||
|
||||
powershell %PS_ARGS%
|
||||
set "ERR=%ERRORLEVEL%"
|
||||
|
||||
if not "%ERR%"=="0" (
|
||||
echo.
|
||||
echo GeneratePlaylist failed with exit code %ERR%.
|
||||
echo.
|
||||
echo Trying fallback download method...
|
||||
echo.
|
||||
|
||||
REM -- Fallback: Use bitsadmin or certutil to download ffmpeg if needed --
|
||||
REM -- This provides at least some progress output when PowerShell fails --
|
||||
|
||||
set "FFMPEG_DIR=%ROOT%\ffmpeg"
|
||||
if not exist "%FFMPEG_DIR%\ffmpeg.exe" (
|
||||
echo ffmpeg not found. Attempting fallback download...
|
||||
echo.
|
||||
|
||||
set "DL_DIR=%ROOT%\ffmpeg_download"
|
||||
if not exist "%DL_DIR%" mkdir "%DL_DIR%"
|
||||
|
||||
REM -- Try bitsadmin (available on most Windows systems) --
|
||||
where bitsadmin >nul 2>nul
|
||||
if %ERRORLEVEL%==0 (
|
||||
echo Using bitsadmin to download ffmpeg...
|
||||
echo This may take several minutes depending on your connection.
|
||||
echo.
|
||||
bitsadmin /transfer "ffmpeg_download" /priority normal "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip" "%DL_DIR%\ffmpeg.zip"
|
||||
if exist "%DL_DIR%\ffmpeg.zip" (
|
||||
echo.
|
||||
echo Download complete. Extracting ffmpeg.zip with PowerShell...
|
||||
powershell -NoProfile -Command "Expand-Archive -LiteralPath '%DL_DIR%\ffmpeg.zip' -DestinationPath '%DL_DIR%\extracted' -Force; $bin = Get-ChildItem '%DL_DIR%\extracted' -Recurse -Directory -Filter 'bin' | Select-Object -First 1; if ($bin) { if (-not (Test-Path '%FFMPEG_DIR%')) { New-Item -ItemType Directory -Path '%FFMPEG_DIR%' -Force | Out-Null }; Copy-Item (Join-Path $bin.FullName 'ffmpeg.exe') '%FFMPEG_DIR%\' -Force -ErrorAction SilentlyContinue; Copy-Item (Join-Path $bin.FullName 'ffprobe.exe') '%FFMPEG_DIR%\' -Force -ErrorAction SilentlyContinue }; Remove-Item '%DL_DIR%\extracted' -Recurse -Force -ErrorAction SilentlyContinue; Remove-Item '%DL_DIR%\ffmpeg.zip' -Force -ErrorAction SilentlyContinue"
|
||||
if exist "%FFMPEG_DIR%\ffmpeg.exe" (
|
||||
echo ffmpeg installed successfully via fallback.
|
||||
) else (
|
||||
echo WARNING: Fallback extraction may not have completed successfully.
|
||||
)
|
||||
) else (
|
||||
echo bitsadmin download failed.
|
||||
)
|
||||
) else (
|
||||
echo bitsadmin not available on this system.
|
||||
echo.
|
||||
echo Please install ffmpeg manually:
|
||||
echo 1. Download from https://www.gyan.dev/ffmpeg/builds/
|
||||
echo 2. Extract ffmpeg.exe and ffprobe.exe
|
||||
echo 3. Place them in: %FFMPEG_DIR%
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Trying to generate playlist without PowerShell...
|
||||
echo.
|
||||
|
||||
REM -- Minimal fallback: just scan Media folder and write AutoPlaylist.lua --
|
||||
REM -- This works without ffmpeg but uses estimated durations --
|
||||
if exist "%ROOT%\Media" (
|
||||
echo Scanning Media folder for audio files...
|
||||
set "OUTFILE=%ROOT%\AutoPlaylist.lua"
|
||||
echo RelationshipsJukeboxAutoPlaylist = {} > "%OUTFILE%"
|
||||
echo RelationshipsJukeboxAutoPlaylist.tracks = { >> "%OUTFILE%"
|
||||
for /r "%ROOT%\Media" %%F in (*.mp3 *.wav *.ogg) do (
|
||||
setlocal enabledelayedexpansion
|
||||
REM Get the full path of the file
|
||||
set "FULLFILE=%%F"
|
||||
REM Strip the ROOT prefix to get a relative path like \Media\song.mp3
|
||||
set "RELPATH=!FULLFILE:%ROOT%=!"
|
||||
REM Build the WoW-relative path: Interface\AddOns\RelationshipsJukeBox\Media\song.mp3
|
||||
REM RELPATH starts with \ (from the remaining path after stripping ROOT)
|
||||
set "FULLPATH=Interface\AddOns\RelationshipsJukeBox!RELPATH!"
|
||||
REM Double all backslashes for Lua string escaping (\\ in source = \ in Lua value)
|
||||
set "FULLPATH=!FULLPATH:\=\\!"
|
||||
set "BASENAME=%%~nF"
|
||||
echo { path = "!FULLPATH!", name = "!BASENAME!", duration = 180 }, >> "%OUTFILE%"
|
||||
endlocal
|
||||
echo Found: %%~nF
|
||||
)
|
||||
echo } >> "%OUTFILE%"
|
||||
echo.
|
||||
echo Playlist generated (using estimated 180s durations).
|
||||
echo Install ffmpeg for accurate durations and MP3 sanitization.
|
||||
) else (
|
||||
echo Media folder not found: %ROOT%\Media
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Usage: GeneratePlaylist.bat [-UseWinRAR]
|
||||
echo -UseWinRAR Prefer WinRAR over 7-Zip for archive extraction
|
||||
pause
|
||||
exit /b %ERR%
|
||||
)
|
||||
REM Pass any command-line arguments (e.g. -UseWinRAR) to the PS1 script
|
||||
powershell -ExecutionPolicy Bypass -File "%~dp0GeneratePlaylist.ps1" %*
|
||||
|
||||
echo.
|
||||
echo Playlist entries now include names and durations for Play All / Shuffle.
|
||||
echo Autoplay and Shuffle work even without metadata - estimated durations are used.
|
||||
echo.
|
||||
echo Tip: Run with -UseWinRAR flag to use WinRAR for archive extraction:
|
||||
echo GeneratePlaylist.bat -UseWinRAR
|
||||
pause
|
||||
|
||||
+1184
-146
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,8 @@
|
||||
<img src="https://i.postimg.cc/Wb6XLr2N/llll.png"/>
|
||||
|
||||
<img src="https://i.postimg.cc/xTytDH96/I.gif"/>
|
||||
|
||||
|
||||
# Relationships Jukebox
|
||||
|
||||
**Relationships Jukebox** is a lightweight World of Warcraft music addon that lets you play your own local audio files in-game through a full playlist window, a compact mini player, and simple slash commands.
|
||||
@@ -16,9 +21,8 @@ The addon scans a local `Media` folder, builds a playlist automatically, and let
|
||||
- **Right-click:** Toggle Full GUI
|
||||
- Automatically imports tracks from `AutoPlaylist.lua`
|
||||
- Stores track names and durations for smoother autoplay and shuffle playback
|
||||
- Attempts to improve **WoW 1.12 MP3 compatibility** by sanitizing problematic MP3 files during playlist generation
|
||||
- Works even without metadata by falling back to estimated durations
|
||||
|
||||
- Attempts to improve MP3, WAV, and OGG compatibility by sanitizing problematic files during playlist generation
|
||||
- Works without metadata by falling back to estimated durations
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -69,8 +73,8 @@ AutoPlaylist.lua
|
||||
- creates or updates `AutoPlaylist.lua`
|
||||
- captures track names
|
||||
- tries to determine durations
|
||||
- checks MP3 files for WoW 1.12 compatibility issues
|
||||
- optionally uses `ffmpeg` / `ffprobe` for better metadata and MP3 sanitization
|
||||
- checks MP3, WAV, and OGG files for WoW 1.12 compatibility issues
|
||||
- optionally uses `ffmpeg` / `ffprobe` for better metadata and MP3, WAV, and OGG sanitization
|
||||
|
||||
After generating the playlist, use `/reload` so the addon can import the updated track list.
|
||||
|
||||
@@ -171,9 +175,9 @@ Important: if the audio file still exists in the `Media` folder and is still inc
|
||||
- Make sure `AutoPlaylist.lua` was created
|
||||
- Use `/reload`
|
||||
|
||||
### Some MP3s do not play
|
||||
### Some MP3, WAV, and OGG files do not play
|
||||
|
||||
WoW 1.12 can be picky about MP3 encoding. Re-run the generator and let it sanitize files if `ffmpeg` is available.
|
||||
WoW 1.12 can be picky about MP3, WAV, and OGG encoding. Re-run the generator and let it sanitize files if `ffmpeg` is available.
|
||||
|
||||
### Durations seem wrong
|
||||
|
||||
@@ -195,5 +199,3 @@ Install one of the following:
|
||||
## Credits
|
||||
|
||||
Author: **Relationship**
|
||||
|
||||
If you package releases, consider including this README alongside the addon so users know to place tracks in `Media`, run the generator, and reload the UI.
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
## Interface: 11200
|
||||
## Title: Relationships Jukebox
|
||||
## Notes: Simple in-game MP3/WAV player with GUI.
|
||||
## Notes: Simple in-game MP3/WAV/OGG player with GUI.
|
||||
## Author: Relationship
|
||||
## Version: 1.5
|
||||
## SavedVariables: RelationshipsJukeboxDB
|
||||
## X-Website: https://github.com/Relationship-OctoWoW/RelationshipsJukeBox
|
||||
## X-GitHub: https://github.com/Relationship-OctoWoW/RelationshipsJukeBox
|
||||
AutoPlaylist.lua
|
||||
Core.lua
|
||||
|
||||
Reference in New Issue
Block a user