mirror of
https://github.com/jellyfin/jellyfin-desktop.git
synced 2026-10-26 16:45:24 +00:00
Change socket names
This commit is contained in:
1 parent
0df5b28b6c
commit
d1a8a16fd7
2 files changed
+4
-14
No files matched your search
+3
-13
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "LocalJsonClient.h"
|
||||
#include "utils/Utils.h"
|
||||
|
||||
#define SOCKET_NAME "pmpUniqueApplication"
|
||||
#define SOCKET_NAME "singleton"
|
||||
|
||||
class UniqueApplication : public QObject
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user