mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-31 18:13:38 +01:00
Make media detection more robust
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#define FF_PLAYER_MODULE_NAME "Media Player"
|
||||
#define FF_PLAYER_NUM_FORMAT_ARGS 3
|
||||
#define FF_PLAYER_NUM_FORMAT_ARGS 4
|
||||
|
||||
void ffPrintPlayer(FFinstance* instance)
|
||||
{
|
||||
@@ -62,7 +62,8 @@ void ffPrintPlayer(FFinstance* instance)
|
||||
ffPrintFormat(instance, FF_PLAYER_MODULE_NAME, 0, &instance->config.player, FF_PLAYER_NUM_FORMAT_ARGS, (FFformatarg[]){
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &playerPretty},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->player},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->busNameShort}
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->busNameShort},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->url}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
+2
-3
@@ -5,7 +5,7 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#define FF_SONG_MODULE_NAME "Media"
|
||||
#define FF_SONG_NUM_FORMAT_ARGS 5
|
||||
#define FF_SONG_NUM_FORMAT_ARGS 4
|
||||
|
||||
static bool shouldIgoreChar(char c)
|
||||
{
|
||||
@@ -97,8 +97,7 @@ void ffPrintSong(FFinstance* instance)
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &songPretty},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->song},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->artist},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->album},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->url}
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->album}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user