Compare commits

...

19 Commits

Author SHA1 Message Date
Linus Dierheimer 30365e8997 Release prebuild binaries as tar.gz and zip 2022-03-25 12:16:06 +01:00
Linus Dierheimer 5b66938bf4 Release with rpm package too 2022-03-25 12:09:48 +01:00
Linus Dierheimer 80c5600a7b Use cmake to build packages 2022-03-25 11:57:58 +01:00
Linus Dierheimer 65ce2eafed Hopefully finally fix github actions 2022-03-24 22:26:44 +01:00
Linus Dierheimer d840c7a12d Use workflow instead of action 2022-03-24 22:15:46 +01:00
Linus Dierheimer 634e27bc42 Try to give github actions the right permissions 2022-03-24 22:02:39 +01:00
Linus Dierheimer cc18315e84 Fix check action 2022-03-24 21:59:15 +01:00
Linus Dierheimer 83e2787b24 Use reusable action for check 2022-03-24 21:57:53 +01:00
Linus Dierheimer ef5a9384da Try to fix github actions again 2022-03-24 21:49:39 +01:00
Linus Dierheimer 2d7e6c37ff Try to fix github actions 2022-03-24 21:43:27 +01:00
Linus Dierheimer 92e8f23261 Refactored github actions again 2022-03-24 21:38:56 +01:00
Linus Dierheimer e09f1d3647 Refactored github actions 2022-03-24 21:32:45 +01:00
Linus Dierheimer 6f01e33955 Clear URL from unsucessfull media detection too 2022-03-24 19:06:20 +01:00
Linus Dierheimer 4b813cdf59 Automatic track commits between versions 2022-03-24 18:56:44 +01:00
Linus Dierheimer 942c583c89 Media: Don't show website urls 2022-03-23 21:41:52 +01:00
Linus Dierheimer 24a48c1fc0 Dont show lyric information in song title 2022-03-23 16:07:47 +01:00
Linus Dierheimer e2e95732e8 Don't remove dirty / clean from song title 2022-03-23 15:58:30 +01:00
Linus Dierheimer d647f9e3f2 Pretty song output, if the media is a browser playing a video 2022-03-23 15:43:30 +01:00
Linus Dierheimer 4895c68ca9 Capitalize the first letter of media player if appropiate 2022-03-23 11:54:05 +01:00
14 changed files with 232 additions and 168 deletions
+37
View File
@@ -0,0 +1,37 @@
name: manage pull requests
on: pull_request
jobs:
check:
name: manage pull request
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: install required packages
run: sudo apt-get update && sudo apt-get install -y libpci-dev libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libxfconf-0-dev rpm librpm-dev libzstd-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
- name: configure project
run: cmake -DBUILD_TESTS=On .
- name: build project
run: cmake --build . -j$(nproc) --target package
- name: run fastfetch
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true
- name: run flashfetch
run: ./flashfetch
- name: run tests
run: ctest
- name: perform CodeQL analysis
uses: github/codeql-action/analyze@v1
+27 -68
View File
@@ -1,101 +1,60 @@
name: Manage pushes and pull requests
name: manage pushes
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
BUILD_TYPE: Release
jobs:
check:
name: Build, Run and Analyze fastfetch
manage:
name: manage push
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: checkout repository
uses: actions/checkout@v2
- name: Update and install packages
run: sudo apt-get update && sudo apt-get install -y libpci-dev libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libxfconf-0-dev librpm-dev libzstd-dev
- name: install required packages
run: sudo apt-get update && sudo apt-get install -y libpci-dev libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libxfconf-0-dev rpm librpm-dev libzstd-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} .
- name: configure project
# We reuse the build binary only for the releases.
# We set tweak version to off, because it is wrong, as git tag will happen after this step. Releases don't have a tweak, so this is ok.
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
- name: Build
run: cmake --build . -j$(nproc)
- name: build project
run: cmake --build . -j$(nproc) --target package
- name: Run fastfetch
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true
- name: run fastfetch
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true
- name: Run flashfetch
run: ./flashfetch
- name: run flashfetch
run: ./flashfetch
- name: Run tests
run: ctest
- name: run tests
run: ctest
- name: Build deb package
run: sh packaging/deb/create.sh .
- name: perform CodeQL analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Create tarball
if: github.event_name == 'push'
run: tar -cvf fastfetch.tar ./fastfetch -C packaging/deb ./fastfetch.deb
- name: Upload tarball
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: fastfetch.tar
path: ./fastfetch.tar
deploy:
name: Create GitHub release
runs-on: ubuntu-latest
needs: check
if: github.event_name == 'push'
permissions:
contents: write
steps:
- name: Download tarball
uses: actions/download-artifact@v3
with:
name: fastfetch.tar
path: ./fastfetch.tar
- name: Extract tarball
run: tar --overwrite -xvf ./fastfetch.tar/fastfetch.tar
- name: Get fastfetch version
- name: get fastfetch version
id: get_version_fastfetch
run: echo "::set-output name=release::$(./fastfetch --version-raw)"
- name: Get latest release version
- name: get latest release version
id: get_version_release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
- name: Push release
- name: create release
if: steps.get_version_fastfetch.outputs.release != steps.get_version_release.outputs.release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.get_version_fastfetch.outputs.release }}
commit: ${{ github.sha }}
artifacts: ./fastfetch,./fastfetch.deb
artifacts: ./fastfetch-*.*
-3
View File
@@ -1,3 +0,0 @@
[submodule "packaging/aur"]
path = packaging/aur
url = https://aur.archlinux.org/fastfetch-git.git
+52 -9
View File
@@ -1,15 +1,15 @@
cmake_minimum_required(VERSION 3.1.0) # Threads::Threads
project(fastfetch
VERSION 1.1.1
VERSION 1.2.2
LANGUAGES C
)
#e.g. +1
#This allows to track builds between versions, without GitHub creating a new release
set(PROJECT_VERSION_EXTRA "")
# This is set to off by github actions for release builds
OPTION(SET_TWEAK "Add tweak to project version" ON)
include(GNUInstallDirs)
# Also create test executables
OPTION(BUILD_TESTS "Build tests" OFF)
OPTION(ENABLE_LIBPCI "Enable libpci" ON)
OPTION(ENABLE_VULKAN "Enable vulkan" ON)
@@ -23,7 +23,17 @@ OPTION(ENABLE_DCONF "Enable dconf" ON)
OPTION(ENABLE_DBUS "Enable dbus-1" ON)
OPTION(ENABLE_XFCONF "Enable libxfconf-0" ON)
OPTION(ENABLE_RPM "Enable rpm" ON)
OPTION(BUILD_TESTS "Build tests" ON)
# Track commits between version bumps for output in --version
if (SET_TWEAK AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process(
COMMAND git describe --tags
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE PROJECT_VERSION_TWEAK
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(REGEX MATCH "-[0-9]+" PROJECT_VERSION_TWEAK "${PROJECT_VERSION_TWEAK}")
endif()
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
@@ -55,7 +65,7 @@ find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
# Init CMake targets.
# Init CMake targets
add_library(libfastfetch STATIC
src/util/FFstrbuf.c
@@ -267,7 +277,7 @@ target_link_libraries(flashfetch
PRIVATE libfastfetch
)
# Testing.
# Testing
if (BUILD_TESTS)
add_executable(fastfetch-test-performance
@@ -288,7 +298,9 @@ if (BUILD_TESTS)
add_test(NAME test-strbuf COMMAND fastfetch-test-strbuf)
endif()
# Installation.
# Installation
include(GNUInstallDirs)
install(
TARGETS fastfetch
@@ -310,3 +322,34 @@ install(
FILES ./LICENSE
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/licenses/${CMAKE_PROJECT_NAME}
)
# Packaging
set(CPACK_GENERATOR "DEB;RPM;TGZ;ZIP")
set(CPACK_PACKAGE_CONTACT "Linus Dierheimer <Linus@Dierheimer.de>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Neofetch clone written in C")
set(CPACK_PACKAGE_DESCRIPTION "
fastfetch is a neofetch-like tool for fetching system information and displaying them in a pretty way.
It is written in c to achieve much better performance.
")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/LinusDierheimer")
set(CPACK_DEBIAN_PACKAGE_SECTION, "utils")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6")
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "
libpci3
libvulkan1
libwayland-client0
libxcb-randr0
xcb
libxrandr2
libx11-6
libdconf1
libglib2.0-0
libdbus-1-3
libxfconf-0-3
")
include(CPack)
+1 -1
View File
@@ -86,7 +86,7 @@ If pkg-config fails to find the headers for a library listed in [dependencies](#
* [AUR](https://aur.archlinux.org/packages/fastfetch-git/): Packaged by me. Will install the fastfetch binary, bash completion and the presets. Git version
* [Manjaro Repositories](https://gitlab.manjaro.org/packages/community/fastfetch): Packaged by a manjaro maintainer. Usually a bit outdated.
* [Gentoo (Guru)](https://github.com/gentoo/guru/tree/master/app-misc/fastfetch): Packed by some other guy. May be out of date some times.
* DEB: Run [`packaging/deb/create.sh`](packaging/deb/create.sh) from the root directory. You can give a custom build directory as an argument.
* DEB / RPM: Run `cmake -B build && cmake --build build --target package` to build the packages in build.
* Manually:
* Build: Follow the [build instructions](#building).
* Install: `sudo cmake --install build --prefix /usr/local`
Submodule packaging/aur deleted from 7ac9c5d132
-13
View File
@@ -1,13 +0,0 @@
Package: fastfetch
Version: <VERSION>
Section: utils
Priority: extra
Architecture: amd64
Maintainer: Linus@Dierheimer.de
Homepage: https://github.com/LinusDierheimer/fastfetch
Installed-Size: 410K
Description: A fast alternative to neofetch
fastfetch is a neofetch-like tool for fetching system information and
displaying them in a pretty way. It is written in c to achieve much better
performance, in return only Linux and Android are supported. It also uses
mechanisms like multithreading and caching to finish as fast as possible.
-28
View File
@@ -1,28 +0,0 @@
#!/bin/sh
# This script is intended to be run from the root of the repository.
# If you don't want to use build/ as build directoy, or already build the elsewere, you can give the build directoy as argument.
BUILD_DIR="${1:-build}"
ROOT_DIR="${2:-.}"
PACKAGE_DIR="${BUILD_DIR}/packaging/deb/fastfetch"
# Create missing files
mkdir -p "${BUILD_DIR}" || exit 1
if [ ! -f "${BUILD_DIR}/cmake_install.cmake" ]; then
cmake -S "${ROOT_DIR}" -B "${BUILD_DIR}" || exit 2
rm -f "${BUILD_DIR}/fastfetch" || exit 3 # Always rebuild the project if we reconfigured it
fi
if [ ! -f "${BUILD_DIR}/fastfetch" ]; then
cmake --build "${BUILD_DIR}" || exit 4
fi
# Populate the files
cmake --install "${BUILD_DIR}" --prefix "${PACKAGE_DIR}/usr" || exit 5
mkdir -p "${PACKAGE_DIR}/DEBIAN" || exit 6
sed "s/<VERSION>/$("${BUILD_DIR}/fastfetch" --version-raw)/g" "${ROOT_DIR}/packaging/deb/control-template" > "${PACKAGE_DIR}/DEBIAN/control" || exit 7
# Create the package
dpkg-deb --build "${PACKAGE_DIR}" || exit 8
+1 -34
View File
@@ -1,6 +1,5 @@
#include "fastfetch.h"
#include <ctype.h>
#include <string.h>
#include <pthread.h>
@@ -209,6 +208,7 @@ static bool getBusProperties(const char* busName, FFMediaResult* result, DBusDat
{
ffStrbufClear(&result->artist);
ffStrbufClear(&result->album);
ffStrbufClear(&result->url);
return false;
}
@@ -316,28 +316,6 @@ static void getMedia(FFinstance* instance, FFMediaResult* result)
getBestBus(result, &data);
dlclose(dbus);
//If we are on a website, prepend the website name
if(ffStrbufStartsWithS(&result->url, "https://www."))
ffStrbufAppendS(&result->playerPretty, result->url.chars + 12);
else if(ffStrbufStartsWithS(&result->url, "http://www."))
ffStrbufAppendS(&result->playerPretty, result->url.chars + 11);
else if(ffStrbufStartsWithS(&result->url, "https://"))
ffStrbufAppendS(&result->playerPretty, result->url.chars + 8);
else if(ffStrbufStartsWithS(&result->url, "http://"))
ffStrbufAppendS(&result->playerPretty, result->url.chars + 7);
//If we found a website name, make it more pretty
if(result->playerPretty.length > 0)
{
ffStrbufSubstrBeforeFirstC(&result->playerPretty, '/'); //Remove the path
ffStrbufSubstrBeforeLastC(&result->playerPretty, '.'); //Remove the TLD
}
//Check again for length, as we may have removed everything.
//If we don't have subdomains, it is usually more pretty to capitalize the first letter.
if(result->playerPretty.length > 0 && ffStrbufFirstIndexC(&result->playerPretty, '.') < result->playerPretty.length)
result->playerPretty.chars[0] = (char) toupper(result->playerPretty.chars[0]);
}
#endif
@@ -358,7 +336,6 @@ const FFMediaResult* ffDetectMedia(FFinstance* instance)
ffStrbufInit(&result.busNameShort);
ffStrbufInit(&result.player);
ffStrbufInit(&result.playerPretty);
ffStrbufInit(&result.song);
ffStrbufInit(&result.artist);
ffStrbufInit(&result.album);
@@ -381,16 +358,6 @@ const FFMediaResult* ffDetectMedia(FFinstance* instance)
if(result.player.length == 0)
ffStrbufAppend(&result.player, &result.busNameShort);
bool hasCustomPrettyName = result.playerPretty.length > 0;
if(hasCustomPrettyName)
ffStrbufAppendS(&result.playerPretty, " (");
ffStrbufAppend(&result.playerPretty, &result.player);
if(hasCustomPrettyName)
ffStrbufAppendC(&result.playerPretty, ')');
pthread_mutex_unlock(&mutex);
return &result;
}
+3 -2
View File
@@ -312,7 +312,8 @@ static inline void printCommandHelp(const char* command)
}
else if(strcasecmp(command, "song-format") == 0)
{
constructAndPrintCommandHelpFormat("song", "{2} - {3} - {1}", 4,
constructAndPrintCommandHelpFormat("song", "{3} - {4} - {1}", 5,
"Song name pretty",
"Song name",
"Artist name",
"Album name",
@@ -616,7 +617,7 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
}
else if(strcasecmp(key, "-v") == 0 || strcasecmp(key, "--version") == 0)
{
puts("fastfetch "FASTFETCH_PROJECT_VERSION""FASTFETCH_PROJECT_VERSION_EXTRA);
puts("fastfetch "FASTFETCH_PROJECT_VERSION""FASTFETCH_PROJECT_VERSION_TWEAK);
exit(0);
}
else if(strcasecmp(key, "--version-raw") == 0)
-1
View File
@@ -259,7 +259,6 @@ typedef struct FFMediaResult
{
FFstrbuf busNameShort; //e.g. plasma-browser-integration
FFstrbuf player; // e.g. Google Chrome
FFstrbuf playerPretty; // e.g. YouTube (Google Chrome)
FFstrbuf song;
FFstrbuf artist;
FFstrbuf album;
+1 -1
View File
@@ -4,7 +4,7 @@
#define FASTFETCH_PROJECT_NAME "@PROJECT_NAME@"
#define FASTFETCH_PROJECT_VERSION "@PROJECT_VERSION@"
#define FASTFETCH_PROJECT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define FASTFETCH_PROJECT_VERSION_EXTRA "@PROJECT_VERSION_EXTRA@"
#define FASTFETCH_PROJECT_VERSION_TWEAK "@PROJECT_VERSION_TWEAK@"
#define FASTFETCH_DATATEXT_STRUCTURE "@DATATEXT_STRUCTURE@"
#define FASTFETCH_DATATEXT_CONFIG "@DATATEXT_CONFIG@" //Requires FASTFETCH_PROJECT_VERSION and FASTFETCH_DATATEXT_STRUCTURE to be set
+39 -2
View File
@@ -1,5 +1,7 @@
#include "fastfetch.h"
#include <ctype.h>
#define FF_PLAYER_MODULE_NAME "Media Player"
#define FF_PLAYER_NUM_FORMAT_ARGS 3
@@ -13,15 +15,50 @@ void ffPrintPlayer(FFinstance* instance)
return;
}
FFstrbuf playerPretty;
ffStrbufInit(&playerPretty);
//If we are on a website, prepend the website name
if(ffStrbufStartsWithS(&media->url, "https://www."))
ffStrbufAppendS(&playerPretty, media->url.chars + 12);
else if(ffStrbufStartsWithS(&media->url, "http://www."))
ffStrbufAppendS(&playerPretty, media->url.chars + 11);
else if(ffStrbufStartsWithS(&media->url, "https://"))
ffStrbufAppendS(&playerPretty, media->url.chars + 8);
else if(ffStrbufStartsWithS(&media->url, "http://"))
ffStrbufAppendS(&playerPretty, media->url.chars + 7);
//If we found a website name, make it more pretty
if(playerPretty.length > 0)
{
ffStrbufSubstrBeforeFirstC(&playerPretty, '/'); //Remove the path
ffStrbufSubstrBeforeLastC(&playerPretty, '.'); //Remove the TLD
}
//Check again for length, as we may have removed everything.
bool playerPrettyIsCustom = playerPretty.length > 0;
//If we don't have subdomains, it is usually more pretty to capitalize the first letter.
if(playerPrettyIsCustom && ffStrbufFirstIndexC(&playerPretty, '.') == playerPretty.length)
playerPretty.chars[0] = (char) toupper(playerPretty.chars[0]);
if(playerPrettyIsCustom)
ffStrbufAppendS(&playerPretty, " (");
ffStrbufAppend(&playerPretty, &media->player);
if(playerPrettyIsCustom)
ffStrbufAppendC(&playerPretty, ')');
if(instance->config.playerFormat.length == 0)
{
ffPrintLogoAndKey(instance, FF_PLAYER_MODULE_NAME, 0, &instance->config.playerKey);
ffStrbufPutTo(&media->playerPretty, stdout);
ffStrbufPutTo(&playerPretty, stdout);
}
else
{
ffPrintFormatString(instance, FF_PLAYER_MODULE_NAME, 0, &instance->config.playerKey, &instance->config.playerFormat, NULL, FF_PLAYER_NUM_FORMAT_ARGS, (FFformatarg[]){
{FF_FORMAT_ARG_TYPE_STRBUF, &media->playerPretty},
{FF_FORMAT_ARG_TYPE_STRBUF, &playerPretty},
{FF_FORMAT_ARG_TYPE_STRBUF, &media->player},
{FF_FORMAT_ARG_TYPE_STRBUF, &media->busNameShort}
});
+71 -5
View File
@@ -1,7 +1,44 @@
#include "fastfetch.h"
#include <ctype.h>
#define FF_SONG_MODULE_NAME "Song"
#define FF_SONG_NUM_FORMAT_ARGS 4
#define FF_SONG_NUM_FORMAT_ARGS 5
static bool shouldIgoreChar(char c)
{
return isblank(c) || c == '-' || c == '.';
}
static bool artistInSongTitle(const FFstrbuf* song, const FFstrbuf* artist)
{
uint32_t artistIndex = 0;
uint32_t songIndex = 0;
while(true)
{
while(shouldIgoreChar(song->chars[songIndex]))
++songIndex;
while(shouldIgoreChar(artist->chars[artistIndex]))
++artistIndex;
if(artist->chars[artistIndex] == '\0')
return true;
if(song->chars[songIndex] == '\0')
return false;
if(tolower(song->chars[songIndex]) != tolower(artist->chars[artistIndex]))
return false;
++artistIndex;
++songIndex;
}
//Unreachable
return false;
}
void ffPrintSong(FFinstance* instance)
{
@@ -13,27 +50,56 @@ void ffPrintSong(FFinstance* instance)
return;
}
FFstrbuf songPretty;
ffStrbufInitCopy(&songPretty, &media->song);
const char* removeStrings[] = {
"(Official Music Video)", "(Official Video)", "(Music Video)",
"[Official Music Video]", "[Official Video]", "[Music Video]",
"| Official Music Video", "| Official Video", "| Music Video",
"[Official Audio]", "[Audio]", "(Audio)", "| Official Audio", "| Audio", "| OFFICIAL AUDIO",
"(Lyric Video)", "(Official Lyric Video)", "(Lyrics)",
"[Lyric Video]", "[Official Lyric Video]", "[Lyrics]",
"| Lyric Video", "| Official Lyric Video", "| Lyrics",
};
ffStrbufRemoveStringsA(&songPretty, sizeof(removeStrings) / sizeof(removeStrings[0]), removeStrings);
ffStrbufTrimRight(&songPretty, ' ');
if(songPretty.length == 0)
ffStrbufAppend(&songPretty, &media->song);
if(instance->config.songFormat.length == 0)
{
//We don't expose artistPretty to the format, as it might be empty (when the think that the artist is already in the song title)
FFstrbuf artistPretty;
ffStrbufInitCopy(&artistPretty, &media->artist);
ffStrbufRemoveIgnCaseEndS(&artistPretty, " - Topic");
ffStrbufRemoveIgnCaseEndS(&artistPretty, "VEVO");
ffStrbufTrimRight(&artistPretty, ' ');
if(artistInSongTitle(&songPretty, &artistPretty))
ffStrbufClear(&artistPretty);
ffPrintLogoAndKey(instance, FF_SONG_MODULE_NAME, 0, &instance->config.songKey);
if(media->artist.length > 0)
if(artistPretty.length > 0)
{
ffStrbufWriteTo(&media->artist, stdout);
ffStrbufWriteTo(&artistPretty, stdout);
fputs(" - ", stdout);
}
if(media->album.length > 0)
//Some sites (e.g. reddit) expose their url as album. We don't want to show that
if(media->album.length > 0 && !ffStrbufStartsWithIgnCaseS(&media->album, "http"))
{
ffStrbufWriteTo(&media->album, stdout);
fputs(" - ", stdout);
}
ffStrbufPutTo(&media->song, stdout);
ffStrbufPutTo(&songPretty, stdout);
}
else
{
ffPrintFormatString(instance, FF_SONG_MODULE_NAME, 0, &instance->config.songKey, &instance->config.songFormat, NULL, FF_SONG_NUM_FORMAT_ARGS, (FFformatarg[]){
{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},