diff --git a/engine/client/keys.c b/engine/client/keys.c index 68724d8b4..2d63966a9 100644 --- a/engine/client/keys.c +++ b/engine/client/keys.c @@ -1043,6 +1043,12 @@ void Key_DefaultLinkClicked(console_t *con, char *text, char *info) return; } #endif + c = Info_ValueForKey(info, "playaudio"); + if (*c && !strchr(c, ';') && !strchr(c, '\n')) + { + Cbuf_AddText(va("\nplay \"%s\"\n", c), RESTRICT_LOCAL); + return; + } c = Info_ValueForKey(info, "desc"); if (*c) { diff --git a/engine/common/fs.c b/engine/common/fs.c index 7ffcdfffd..0831aa102 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -827,6 +827,8 @@ static int QDECL COM_Dir_List(const char *name, qofs_t size, time_t mtime, void } else if (!Q_strcasecmp(link, "roq") || !Q_strcasecmp(link, "cin") || !Q_strcasecmp(link, "avi") || !Q_strcasecmp(link, "mp4") || !Q_strcasecmp(link, "mkv")) Q_snprintfz(link, sizeof(link), "\\tip\\Play Film\\film\\%s", name); + else if (!Q_strcasecmp(link, "wav") || !Q_strcasecmp(link, "ogg") || !Q_strcasecmp(link, "mp3") || !Q_strcasecmp(link, "opus") || !Q_strcasecmp(link, "flac")) + Q_snprintfz(link, sizeof(link), "\\tip\\Play Audio\\playaudio\\%s", name); else { colour = "^3"; //nothing