diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-02-25 22:54:47 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-02-25 22:54:47 -0500 |
commit | 887249671ce2d39e0e75bcab87a1cecefde7406b (patch) | |
tree | 4af3f77bf28eea4f450f4494a997663f7f689b97 | |
parent | 836616b937889db46500e5791de075247386be2d (diff) | |
download | rockbox-887249671c.tar.gz rockbox-887249671c.zip |
TagTree Show file name for tag_title [UNTAGGED]
fallback to filename as [UNTAGGED] is a terrible way to browse titles
Change-Id: Ifcdc4c27562339b8a916313fb946c88c4eba3b5a
-rw-r--r-- | apps/tagtree.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c index 696ba81487..4db4a91cc7 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -1584,6 +1584,19 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) if (strcmp(tcs.result, UNTAGGED) == 0) { + if (tag == tag_title) /* Fallback to filename */ + { + char *lastname = dptr->name; + dptr->name = core_get_data(c->cache.name_buffer_handle)+namebufused; + if (tagcache_retrieve(&tcs, tcs.idx_id, tag_filename, dptr->name, + c->cache.name_buffer_size - namebufused)) + { + namebufused += strlen(dptr->name)+1; + goto entry_skip_formatter; + } + dptr->name = lastname; /* restore last entry if filename failed */ + } + tcs.result = str(LANG_TAGNAVI_UNTAGGED); tcs.result_len = strlen(tcs.result); tcs.ramresult = true; @@ -1632,6 +1645,7 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) else dptr->name = tcs.result; +entry_skip_formatter: dptr++; current_entry_count++; |