How Album Art for a track is selected?

Poweramp v2: for main UI/widgets/lock screen track cover:
Poweramp v3: for any track cover in main screen or lists:

Depending on Album Art download settings, including Prefer Downloaded Art, one of the following images will be selected:

- user selected album art (if exists)
- embed album art (bigger than 100x100, but less than ~8-24mb - depends on available device memory)
- cached downloaded art (if exists)
- folders mode: [album name].jpg ([album name] replaced with the actual album name) (less than 4mb)
- folders mode: folder.jpg/cover.jpg/AlbumArt...Large.jpg (less than 4mb)
- folders mode: any standalone jpg (bigger than 4kb, less than 4mb)
- search & download initiated for image

Poweramp v3: for Folders Hierarchy:
- even if the folder has no songs, in-folder image is checked and shown
- if none, child subfolders are checked for in-folder images
- if none, some song, preferable with embedded album art is selected from that folder hierarchy and the song cover is used

Poweramp v2: for Folder List first few songs can checked (not sorted by anything -> so first 3 random files are checked):
- user selected album art for song in this folder
- if there is cached image from previous searches, it's used (.pamp)
- if there is folder.jpg/cover.jpg/AlbumArt...Large.jpg or any other jpg -> it's used
- embed art in first 3 files, if found, that will be used
- for album and artist, if found, cached downloaded art will be used or download initiated.

For Library Albums List:
- user selected album art for song in this album
- otherwise search & download started

Search & download won't be started if:
- there are no album+artist tags
- or title+artist tags (for singles)
- [new] or meaningful filename with enough valid characters in the song 
- Poweramp v3: additional options are available in settings => Album Art, such as Download Artist Images, Also search by Title/Filename, etc.