Change socket names

This commit is contained in:
Andrew Rabert committed 2025-12-14 05:56:32 -05:00
1 parent 0df5b28b6c
commit d1a8a16fd7
2 files changed
+4 -14

No files matched your search

+3 -13
View File
@@ -174,22 +174,12 @@ QString Paths::logDir(const QString& file)
/////////////////////////////////////////////////////////////////////////////////////////
QString Paths::socketName(const QString& serverName)
{
QString userName = qgetenv("USER");
if(userName.isEmpty())
userName = qgetenv("USERNAME");
if(userName.isEmpty())
userName = "unknown";
// Include profile ID in socket name for profile isolation
QString profileSuffix;
if (!g_activeProfileId.isEmpty())
profileSuffix = "_" + g_activeProfileId.left(8);
QString profileId = g_activeProfileId.isEmpty() ? "default" : g_activeProfileId;
#ifdef Q_OS_UNIX
return QString("/tmp/jmp_%1_%2%3.sock").arg(serverName, userName, profileSuffix);
return QString("/tmp/jellyfin-desktop.%1.%2").arg(profileId, serverName);
#else
return QString("jmp_%1_%2%3.sock").arg(serverName, userName, profileSuffix);
return QString("jellyfin-desktop.%1.%2").arg(profileId, serverName);
#endif
}
+1 -1
View File
@@ -11,7 +11,7 @@
#include "LocalJsonClient.h"
#include "utils/Utils.h"
#define SOCKET_NAME "pmpUniqueApplication"
#define SOCKET_NAME "singleton"
class UniqueApplication : public QObject
{