AIMP Forum

AIMP for Android => Ошибки и замечания / Bugs => Topic started by: JimD on September 28, 2024, 01:46:13

Title: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: JimD on September 28, 2024, 01:46:13
Update 28 September:

It appears that v4.11.1471 27.09.2024 (running on a different device and updated today) finds and displays a cover image named Folder.jpg in the file folder. So perhaps that problem (#1 below) is not a problem after all.

Earlier versions of Windows automatically created a hidden system file named "folder.jpg" in the directory of a music album, as a very low-resolution thumbnail of the album cover. Perhaps Android music players intentionally avoid this. I recall that Neutron did not select a cover image named folder.jpg or Folder.jpg, which is why I always try to remember to use Folder1.jpg (but sometimes forget).

------------------

Original message:

My music albums typically have a "Folder1.jpg" image in the folder. In my settings for "Album Arts" I have "Find in the folder" checked and "Find in tags" unchecked. (I am using v4.11.1467 08.09.2024.)

However, in a few albums I have forgotten to rename Folder.jpg to Folder1.jpg. In those cases, AIMP for Android does not seem to find Folder.jpg and instead displays a default blank image.

This happens both in the "Albums" section of "My Music" and also in the playlist that I create. If I rename the image from Folder.jpg to Folder1.jpg and then clear cache and restart AIMP and update content, the image is still not found.

Problem #1: Why is Folder.jpg not selected as the album cover? Apparently any other name for the image will work, since I sometimes have also Folder2.jpg as the back cover, and AIMP seems to select that for the front cover (apparently sorting by name and taking the last one).

Problem #2: When I rename Folder.jpg to Folder1.jpg, AIMP does not automatically find it, even after clearing cache, restarting and refreshing. If I delete the album and download again from cloud storage, then AIMP will usually find it after clearing cache and restarting, but not always (as if it still "remembers" some previous state for that album).

Problem #3: I cannot find a way to manually select Folder1.jpg from the album folder once I have renamed the file. In the "Albums" section I see "Set custom thumbnail", but it does not show Folder1.jpg from the folder. Instead, I have to scroll through many hundreds or even thousands of images from my device, sorted by date. Within a playlist, there appears to be no way at all to manually change the blank image.
Title: Re: [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on September 30, 2024, 13:16:21
Problem #1: Why is Folder.jpg not selected as the album cover? Apparently any other name for the image will work, since I sometimes have also Folder2.jpg as the back cover, and AIMP seems to select that for the front cover (apparently sorting by name and taking the last one).

AIMP has only one limitation for the images: it does not display images from the Download folder.

Problem #2: When I rename Folder.jpg to Folder1.jpg, AIMP does not automatically find it, even after clearing cache, restarting and refreshing. If I delete the album and download again from cloud storage, then AIMP will usually find it after clearing cache and restarting, but not always (as if it still "remembers" some previous state for that album).

Do you rename the files while the app is running?

Problem #3: I cannot find a way to manually select Folder1.jpg from the album folder once I have renamed the file. In the "Albums" section I see "Set custom thumbnail", but it does not show Folder1.jpg from the folder. Instead, I have to scroll through many hundreds or even thousands of images from my device, sorted by date. Within a playlist, there appears to be no way at all to manually change the blank image.

The "Set custom thumbnail" invokes a system image picker. So, if it does not display the file, it seems like something goes wrong with the file system. This would also explain why AIMP does not see this file.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on September 30, 2024, 13:17:04
Anyway, refer to the "About" dialog of the app, and check the "enable logging" option. Restart the app. Now, reproduce an issue and send the log file to me. Please, report to me a approximate time when issue was happened.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: JimD on September 30, 2024, 15:18:38
Thank you for your responses to each item, Artem. And also thanks for such a fine product for Android and Windows, which I have used for many years.

To keep it simple, I will respond here only to #1: Album cover art not found in file folder when the image is named Folder.jpg. If the image has any other name, such as Folder1.jpg, it is found and then displayed as the album cover.

Today I have tested by downloading into my local "Music" folder an album with a cover image named Folder.jpg. It is an album that has never been on this device (in recent times anyway).

When I do a fresh start of AIMP for Android (v4.11.1471 27.09.2024), the album is found and listed in the "Albums" section. I can also create a playlist. In both cases I can play the album, but the cover art is not displayed, only the default blank image. Even if I exit the app, clear recent apps, clear app cache, and restart the app, only the blank image is displayed. If I "Set custom thumbnail", the file Folder.jpg is not listed.

I have done a Google search and find many references to problems with Windows (prior to 11) interfering with album art by creating a system thumbnail named folder.jpg (overwriting any Folder.jpg that the user may have put in the album folder). I suspect that Android file management APIs simply ignore any files with that name, and this is why AIMP doesn't find and select it for the album cover.

So, let's just consider my problem to be "understood" now and close this problem report. The solution is to never use Folder.jpg as the file name for album art.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on October 01, 2024, 08:40:20
I suspect that Android file management APIs simply ignore any files with that name, and this is why AIMP doesn't find and select it for the album cover.

Yes, it seems like system's file selector interprets this file like system or hidden.
But in the app, the file listed and displayed correctly.
(https://www.aimp.ru/forum/index.php?action=dlattach;topic=73492.0;attach=72496) (https://www.aimp.ru/forum/index.php?action=dlattach;topic=73492.0;attach=72497)
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: JimD on October 01, 2024, 17:11:16
Thank you.

I should emphasize that this is not a big problem for me, since it only happens if I download an older album that still has Folder.jpg and I forget to rename it. It can always be fixed by renaming it and taking proper steps to refresh. I don't think it's worth any effort on your part to investigate further.

In any case, I'll include my latest observations below based on some more systematic testing, since some other users might report "odd" behavior of cover images:

I have a Motorola phone running Android 13 and AIMP v4.11.1471 27.09.2024. My music folders are on internal storage. Cover art named Folder.jpg is correctly found and displayed under "Albums". However, if I select "Set custom thumbnail" for that album, the image is not shown in the list of photos. If I exit the app, rename to Folder1.jpg, and restart, then "Set custom thumbnail" shows the image in the list of photos.

I have a Samsung tablet running Android 14 and the same version of AIMP as the phone above. However, my music folders are on an SD card. Cover art named Folder.jpg is not found and therefore not displayed under "Albums". Also, if I select "Set custom thumbnail" for that album, the image is not shown in the list of photos. If I exit the app, rename to Folder1.jpg, and restart, then "Set custom thumbnail" shows the image in the list of photos. But the album still shows a blank image, which can be fixed by running "Update content".

In summary, Folder.jpg is found and displayed when the album is on internal storage, but it does not appear in the image list (Android 13). But Folder.jpg is not found (and is not in the image list) when the album is on an SD card (Android 14).

Perhaps Android 15 handles this better since the Windows "misuse" of folder.jpg is even further in the past and Android doesn't need to filter it out any longer.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on October 01, 2024, 20:40:12
Perhaps Android 15 handles this better since the Windows "misuse" of folder.jpg is even further in the past and Android doesn't need to filter it out any longer.

No, I afraid the filtering may depends from the firmware.

Update:
I've found the filtering code that may affect to a image chooser:
https://android.googlesource.com/platform/frameworks/base/+/cd92588/media/java/android/media/MediaScanner.java

But it should not affected to album art caching by the player, because the player has it own media scanner implementation
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: JimD on November 02, 2024, 15:25:15
I regret that my problem report became so deeply involved into Android, when it seems to be simply an AIMP issue.

I should have made my initial problem report simpler: Why does "Folder.jpg" not get selected as the cover image for the album in the Android version of AIMP? If I rename it to any other name (e.g., "Folder1.jpg"), it gets selected correctly.

In Settings, under Album Arts, I have "Find in the folder" turned on. The other settings there are turned off. I am using the latest version of AIMP on all the devices, along with Android 13 or 14, depending on the device.

Other music players, such as PowerAmp and Neutron, find "Folder.jpg" and use it as the cover image for the album. They have always done this correctly as far back as I remember.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 02, 2024, 20:59:20
I have no idea, sorry. No one of my devices has this issue, so I cannot investigate it by myself. On AIMP side, I've no filtering except the "Download" folder (AIMP does not show any album artwork from this folder).
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: JimD on November 11, 2024, 15:00:29
Thanks for the reply. Please close this issue. It's not a serious problem for me, as I mentioned earlier, since I usually remember to rename the file. In earlier years Amazon and Google Play Music would always add a file Folder.jpg to albums downloaded from their site. I don't think music albums can be downloaded from them any more, so it's a non-issue going forward.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Я Гриша! on November 22, 2024, 00:15:58
I have no idea, sorry. No one of my devices has this issue, so I cannot investigate it by myself. On AIMP side, I've no filtering except the "Download" folder (AIMP does not show any album artwork from this folder).
Я словил на своей стороне. Проблема правда повторяется однократно.
Из установок активен только чекбокс "искать в папке".

Первый раз я закинул обложку с именем Folder.jpg в папку с аудиозаписями в которых в тегах не прописан альбом - тут обложка сразу подхватилась из папки.
Второй раз я закинул обложку в папку где у меня сборник группы ABBA - обложка не появилась ни в Медиатеке, ни при проигрывании песен.
Подумал что не видит из-за вшитой обложки которая отключена - удалил из одной песни обложку - не помогло.
Зашёл в настройки обнулить кэш - вроде не помогло.
Зашёл в медиатеку и потянул жестом обновление - сработало, обложки появились.

Последовательность могу путать, по этому прилагаю лог 1.

Перед отправкой решил повторить на видео, так у меня вообще не отобразилась обложка в двух папках. Хотя проделывал вроде тоже самое, но с ABB-ой как-то удалось, а тут и переименование не помогло...
Видео - https://disk.yandex.ru/i/b6ME9rN3JGawfQ Плюс лог 2 во вложении.

Сборка: v4.12.1509
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 22, 2024, 08:16:08
Зашёл в настройки обнулить кэш - вроде не помогло.
Зашёл в медиатеку и потянул жестом обновление - сработало, обложки появились.

В настройках обновления есть опция "перечитать обложки альбомов". После манипуляций с файловой системой лучше пользоваться ей, т.к. у фонотеки есть еще in-memory кэш, что используется при отображении
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Я Гриша! on November 22, 2024, 08:30:13
В настройках обновления есть опция "перечитать обложки альбомов". После манипуляций с файловой системой лучше пользоваться ей, т.к. у фонотеки есть еще in-memory кэш, что используется при отображении

Увы, данная опция не помогает.

Ещё одна запись, тут обложка отобразилась - https://disk.yandex.ru/i/u-31eoINNiKSmg
Полагаю, может быть связано с тем, что тут одна папка с альбомом, а не как в предыдущих, где родительская папка содержит дочерние папки с альбомами.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 22, 2024, 10:34:25
Увы, данная опция не помогает

Так ты ее и не использовал в этом видео.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 22, 2024, 11:07:14
Вот сборка, попробуй:
https://disk.yandex.ru/d/2IfAziY1FGXC3w
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Я Гриша! on November 22, 2024, 14:40:15
Вот сборка, попробуй:
https://disk.yandex.ru/d/2IfAziY1FGXC3w
Кроме того что приложение теперь игнорирует отключённую опцию "искать в тегах", никаких изменений не обнаружил.
Кеш сбрасывал, содержимое обновлял через тот функционал что ты выше описал - ничего не помогает, обложка не отображается.
Даже с именем "cover" обложка не отображается, если лежит не в папке с музыкой, а в родительской папке всех альбомов.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 22, 2024, 15:35:05
игнорирует отключённую опцию "искать в тегах"

Это с чего вдруг? Я лишь добавил две точки логгирования для сброса кэша. В коде вообще ничего не менял =)

если лежит не в папке с музыкой, а в родительской папке всех альбомов

Эм, с чего вдруг плеер будет искать обложку альбома в родительской папке?
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 22, 2024, 15:39:19
игнорирует отключённую опцию "искать в тегах"

Перепроверил - нет, не игнорирует.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Я Гриша! on November 22, 2024, 17:54:55
Перепроверил - нет, не игнорирует.
Значит я что-то напутал. Перепроверю.

Эм, с чего вдруг плеер будет искать обложку альбома в родительской папке?
Ну если родительская папка совпадает с именем исполнителя; Если все альбомы исполнителя лежат в одной папке, то логично было бы подтягивать обложку исполнителя из корня папки.

Касательно обложки альбома, столкнулся с тем, что еслии папка лежащая на том же уровне отличается от названия "scan", то обложки из других папок не подтягиваются.
Примеры папок из которых они не подтягиваются:
Images
Aurora Scans
Booklet Scans

Так же, было бы здорово научить АИМП брать обложку из каталога выше, если родительская папка в которой лежит музыка имеет такие названия:
CD 1
CD 2
И т.д. Если внутри папки нет персональной обложки.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Я Гриша! on November 22, 2024, 18:12:44
Проверил ещё на одной папке, там обложка появилась только при помощи "Обновить содержимое".
Лог если нужен.
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 22, 2024, 23:56:56
Проверил ещё на одной папке, там обложка появилась только при помощи "Обновить содержимое".
Лог если нужен.

А просто сброс кэша не помог?
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 22, 2024, 23:57:52
Aurora Scans
Booklet Scans

Вообще это не является обложкой
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Я Гриша! on November 25, 2024, 16:27:32
Вообще это не является обложкой
Ну у меня так папки названы, в которых лежат обложки.

А просто сброс кэша не помог?
Сброс кеша обложек в настройках, на сколько помню, не всегда. С тапком сработал.
https://disk.yandex.ru/i/-muR0-5t2R5tOQ
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 25, 2024, 16:34:33
Ну у меня так папки названы, в которых лежат обложки

У плеера в правилах выборки таких папок нет.

Сброс кеша обложек в настройках, на сколько помню, не всегда

Появился вместе с кэшем.

С тапком сработал.

Что это значит?
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Я Гриша! on November 26, 2024, 12:59:16
У плеера в правилах выборки таких папок нет.
Может сделать настройку как у старшего брата? Там если не ошибаюсь, в порядке приоритета идут те что обычно бывают, а в конце, если до этого ничего не нашёл, выбирает первую попавшуюся папку с картинкой.
(https://i.imgur.com/zVLqLSw.png)
И в этом списке, пускай и под капотом, думаю стоит добавить:
*Scans*
Scans\*Scans*

Что это значит?
Radio Tapok))
Title: Re: [?] [1471] Folder/Cover Image in File Folder Not Always Selected for Display
Post by: Artem on November 26, 2024, 13:17:52
Может сделать настройку как у старшего брата? Там если не ошибаюсь, в порядке приоритета идут те что обычно бывают, а в конце, если до этого ничего не нашёл, выбирает первую попавшуюся папку с картинкой.

ну пока такого там нет.