Implement XDG compliance, logging, and improved 401 error handling

- Install to ~/.local/bin/winamp-mpris
- Use ~/.local/state/winamp-mpris/bridge.log for logging
- Use $XDG_RUNTIME_DIR/winamp-mpris.pid for PID management
- Add detailed user notification for 401 Unauthorized errors
- Add install.sh for automated, standard-compliant setup
- Include Winamp Web Interface source code and installer in repository
This commit is contained in:
2026-04-08 18:29:40 -04:00
parent 1e9257a27f
commit 22492dbee9
120 changed files with 9092 additions and 10 deletions

View File

@@ -0,0 +1,32 @@
#include <windows.h>
#include <winsock.h>
#include "main.h"
extern HINSTANCE inst;
extern HWND hwnd;
extern char host[255], username[20], password[20], title[255];
extern int port, default_action, update_delay;
extern char szAppName[], AboutText[];
extern HWND ConfigWnd, VolumeWnd;
// --------------------------------------------------------------------------------
// Thread to update title in systray tooltip
DWORD WINAPI TitleThread(LPVOID param)
{
while(true)
{
MakeRequest(host,port,"/smalltitle",false,false,true);
if (StrComp(title,""))
wsprintf(title,"%s",szAppName);
systray_modify(hwnd,1030,LoadIcon(inst, MAKEINTRESOURCE(GetIconID())),title);
//MessageBox(hwnd,title,"Title",MB_OK | MB_TOPMOST);
Sleep(update_delay*1000);
}
return true;
}