···11-/***************************************************************************
22- * __________ __ ___.
33- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
44- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
55- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
66- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
77- * \/ \/ \/ \/ \/
88- * $Id$
99- *
1010- * Copyright (C) 2023 Christian Soffke
1111- *
1212- * This program is free software; you can redistribute it and/or
1313- * modify it under the terms of the GNU General Public License
1414- * as published by the Free Software Foundation; either version 2
1515- * of the License, or (at your option) any later version.
1616- *
1717- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
1818- * KIND, either express or implied.
1919- *
2020- ****************************************************************************/
2121-#include "plugin.h"
2222-2323-/* Fills mp3entry with metadata retrieved from RAM, if possible, or by reading from
2424- * the file directly. Note that the tagcache only stores a subset of metadata and
2525- * will thus not return certain properties of the file, such as frequency, size, or
2626- * codec.
2727- */
2828-bool retrieve_id3(struct mp3entry *id3, const char* file)
2929-{
3030-#if defined (HAVE_TAGCACHE) && defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
3131- if (rb->tagcache_fill_tags(id3, file))
3232- {
3333- rb->strlcpy(id3->path, file, sizeof(id3->path));
3434- return true;
3535- }
3636-#endif
3737-3838- return rb->get_metadata(id3, -1, file);
3939-}
-26
apps/plugins/lib/id3.h
···11-/***************************************************************************
22- * __________ __ ___.
33- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
44- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
55- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
66- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
77- * \/ \/ \/ \/ \/
88- * $Id$
99- *
1010- * Copyright (C) 2023 Christian Soffke
1111- *
1212- * This program is free software; you can redistribute it and/or
1313- * modify it under the terms of the GNU General Public License
1414- * as published by the Free Software Foundation; either version 2
1515- * of the License, or (at your option) any later version.
1616- *
1717- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
1818- * KIND, either express or implied.
1919- *
2020- ****************************************************************************/
2121-#ifndef ID3_H
2222-#define ID3_H
2323-2424-bool retrieve_id3(struct mp3entry *id3, const char* file);
2525-2626-#endif /* ID3_H */
+18-1
apps/plugins/pictureflow/pictureflow.c
···3333#include "lib/grey.h"
3434#include "lib/mylcd.h"
3535#include "lib/feature_wrappers.h"
3636-#include "lib/id3.h"
37363837/******************************* Globals ***********************************/
3938static fb_data *lcd_fb;
···20742073 pf_tracks.used = 0;
20752074 pf_tracks.cur_idx = -1;
20762075 buf_ctx_unlock();
20762076+}
20772077+20782078+/* Fills mp3entry with metadata retrieved from RAM, if possible, or by reading from
20792079+ * the file directly. Note that the tagcache only stores a subset of metadata and
20802080+ * will thus not return certain properties of the file, such as frequency, size, or
20812081+ * codec.
20822082+ */
20832083+bool retrieve_id3(struct mp3entry *id3, const char* file)
20842084+{
20852085+#if defined (HAVE_TAGCACHE) && defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
20862086+ if (rb->tagcache_fill_tags(id3, file))
20872087+ {
20882088+ rb->strlcpy(id3->path, file, sizeof(id3->path));
20892089+ return true;
20902090+ }
20912091+#endif
20922092+20932093+ return rb->get_metadata(id3, -1, file);
20772094}
2078209520792096/**