- 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
33 lines
808 B
C++
33 lines
808 B
C++
#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;
|
|
}
|
|
|