From 8ecbb8b49b47a6adf29a7ad79a2fd8d295f27c7b Mon Sep 17 00:00:00 2001 From: djvs <2954343+djvs@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:15:02 -0400 Subject: [PATCH] Expose filepath in columns view (#530) * Expose filepath in columns view * update --- doc/config | 1 + doc/ncmpcpp.1 | 1 + src/display.cpp | 2 ++ src/utility/type_conversions.cpp | 2 ++ 4 files changed, 6 insertions(+) diff --git a/doc/config b/doc/config index 57daa8ef..747f2055 100644 --- a/doc/config +++ b/doc/config @@ -172,6 +172,7 @@ ## ## %l - length ## %f - filename +## %F - full filepath ## %D - directory ## %a - artist ## %A - album artist diff --git a/doc/ncmpcpp.1 b/doc/ncmpcpp.1 index e1889f80..7ab7cf90 100644 --- a/doc/ncmpcpp.1 +++ b/doc/ncmpcpp.1 @@ -472,6 +472,7 @@ For song format you can use: %l - length %f - filename + %F - full filepath %D - directory %a - artist %A - album artist diff --git a/src/display.cpp b/src/display.cpp index 4a52d8ce..ddf87932 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -47,6 +47,8 @@ const wchar_t *toColumnName(char c) return L"Filename"; case 'D': return L"Directory"; + case 'F': + return L"Filepath"; case 'a': return L"Artist"; case 'A': diff --git a/src/utility/type_conversions.cpp b/src/utility/type_conversions.cpp index d4bfb8cd..b546fa4a 100644 --- a/src/utility/type_conversions.cpp +++ b/src/utility/type_conversions.cpp @@ -168,6 +168,8 @@ MPD::Song::GetFunction charToGetFunction(char c) return &MPD::Song::getDirectory; case 'f': return &MPD::Song::getName; + case 'F': + return &MPD::Song::getURI; case 'a': return &MPD::Song::getArtist; case 'A':