Skip to content

Evaluating Android Apps

Eric Mink edited this page Aug 27, 2020 · 1 revision

Testing Android Apps

I created a new playlist. It contains just one song

../2017/juli/torrent/Icon for Hire/Icon For Hire - Slow Down.mp3

and I verified that it plays fine on my computer in VLC.

The first thing to check is whether the playlist is auto-imported. I think I'd be fine with manually importing new playlists, but it's good to know.

PowerAMP BlackPlayer
Auto-import ✔️ ❌ Need to manually click "import" and select each playlist file. Or go to the Playlists view in the navdrawer, and then use menu dots > more > import from android library. Importing the same playlist manually twice will create a second playlist with the same name.
Auto-remove playlist when the m3u file is deleted ✔️ ❌ Duplicate Playlists remain after their files were deleted. Pressing "Rescan" does not seem to resolve this. You'll have to remove duplicate playlists manually. This was resolved by not scanning the syncthing trash as mentioned in Modify Playlists outside PowerAmp. ❌ You'll have to remove deleted playlists manually.
Auto-Add-Songs to playlist 🚧 Only after pressing "Re-scan", which takes quite some time to run, the new song appeared. "Rescan" is automatically triggered on complete reopen of app.

It seems like modifying the playlist in the filesystem sometimes causes duplication of the playlist in PowerAmp.

Importing with "Rescan" does not modify the m3u file.

There is an option to always instantly rescan which I have not tried yet.
❌ Despite having set this as a "Synchronized Playlist" (whatever that does) the new song does not automatically appear.
Sort Playlists by date modified ✔️ 🚧 No, but you can manually pin playlists to the "Play Now" screen.
Auto-Renaming ✔️Renaming testing.m3u to test-thing.m3u first seemed like it had removed testing.m3u without adding test-thing.m3u. Pressing "Re-Scan" now shows both playlists.
After another testrun of renaming, it has duplicated the old playlist without adding the new name. A bit later, it renamed one of the two to the new name on another rescan.

Renaming works if you don't scan the syncthing trash can. See Modify Playlists outside PowerAmp and the table row "Auto-Remove Song".
❌ Renaming requires a manual deletion and a manual import.
Renaming in app and writing to file ✔️ Renaming the playlist in the app changes the filename of the m3u file. This did not modify the content. ❌ Renaming the playlist in the app does not change the file.
Modify file on adding song ✔️ /🚧The song does get added to the file. However, the playlist file is reformatted to use nothing but absolute paths on all songs, to start with the #EXTM3U annotation and to contain a #EXT-X-RATING:0 annotation for each song. This annotation is not documented on wikipedia.
This modification may be partly due to the activated setting Settings>Library>Scanner>Always Use UTF-8 for .m3u

See Relative Paths for more info.
Modify file on adding song for extended m3u
This is interesting because see above row.
~~Starting on an extended m3u with relative paths and reopening poweramp and "Rescan" done... creates a new playlist entry :(
~~Also, it changes the paths back to absolute...
Auto-renaming extended m3u
Interesting because technically the display title could be specified with #PLAYLIST:hello
❌ PowerAmp uses the filename as Playlist Title (which is okay, imho)
Auto-remove Song ✔️Removing a song from the playlist file actually modifies the playlist but does sometimes generate a duplicate. But only sometimes. And it does not seem to be related to wether the rescan was triggered manually or by opening the app.

Maybe these duplicates happen when I run a rescan while another rescan is already running and there was actually a modification? No - sometimes they happen also when I did nothing other than open the app.

To avoid duplicates, make sure that either you are not using any syncthing versioning like e.g. a trash bin, or make sure that PowerAmp ignores that directory while scanning. Settings > Library > Music Folders.

Re-import all in PowerAMP

Backup all the m3u files to a different dir. Then select all playlists, delete all, confirm the dialog with "Delete" and not "Delete Files"

Selected playlists will be deleted, including file-based playlist files. Songs won't be deleted.

That deletes the m3u files too! Not sure why there are two options?

Now "Rescan" in PowerAMP.

BlackPlayer Confusion

What does "synchronized Playlist" do? What does Playlist Save Changes do?

PowerAMP Duplicates Issue

One idea I have is that the duplicates might be happening due to how syncthing views a rename. If it actually does those as first a copy and then a delete, it would somewhat make sense for poweramp to first pick up the duplicate, and then notice that one rename happened.

This would, if true, still not explain the duplicates on deletion or addition of songs though. Still, it may be a good idea to test without syncthing for a moment.

I have removed a song in the text editor directly on the phone and triggered a rescan. Nothing changed. So I triggered another rescan. Nothing changed. So I closed and reopened the app. Nothing changed. So I re-opened the text file... it is back to how it was. So I close poweramp and edit it again. Turns out editing did not modify the file?? So I install a different text editor and try again. The playlist has been changed without creating a duplicate. I try again, this time keeping PowerAmp open and leaving an empty newline in the end. Everything works as it should. I delete another line, close and reopen poweramp and quickly start two rescans. No problem either. The song is correctly removed.

However, deleting the m3u file locally still keeps the playlist around. This is definitely not the behaviour I'd expect for my use case.

PowerAmp Support E-Mail

I have contacted PowerAmp Support about three things.

Relative Paths

Question: I could write a script that runs hourly and changes all absolute paths back to relative paths. But if it were not much effort on your part or if there is already such an option that I just have not found, I'd be delighted if I could mark playlists as relative to their m3u file's location in PowerAmp.

Answer:

Poweramp writes absolute paths, but Poweramp and other (PC) players are able to resolve this. For Poweramp, only the last folder and file name is significant - i.e. for "primary/folderA/folderB/song1.mp3", Poweramp uses only folderB/song1.mp3 for track resolution. Also file is only "matched" if its folder (or parents) is checked Poweramp Music Folders selection. While it's possible to write some file entries as relative paths, generally it's not possible on Android (e.g. on Android 10+ where no direct access to file system and no relative paths exists, or due to different root folders for songs in a playlist - Poweramp doesn't limit playlists so any song from any root may be added, or even those can be songs from different Android "providers", where path is like content://com.foo.bar/some%encoded%path).

Result:

  • We can assume that some PC players are able to play broken playlists and that PowerAmp can handle wrong absolute paths as well.
  • If there were a feature for relative paths in the player itself, it would have to be explicitly only available for my use case where all the songs are in the same file tree.

So if my PC player supports wrong absolute paths, I won't have to worry. However, VLC does not like them, so I might end up writing a cron job anyway. If the PC player only supports correct absolute paths, this means now that I can just make the script transform everything into the PC Absolute paths - but that would become tricky again if the laptop player has issues with that.

Modify Playlist outside PowerAmp

Question: Sometimes when I modify the playlist file outside PowerAmp, a duplicate playlist will show up in PowerAmp that will not disappear on its own.

Answer:

Changing entries or renaming playlist outside Poweramp may require Full Rescan (Settings / Library).

Result:

Having to manually trigger a full rescan is not something I'm eager to have to do. Maybe it is possible to automate this? I'll have to ask them, but first I'll have to figure out whether that full scan actually helps. I'm testing it now, and that full scan is taking quite long - nothing I'd be willing to do manually on a daily basis. And turns out it did not remove the duplicate.

While replying to them, I noticed how to solve this issue!

I have just tried it and the duplicate playlist remains even after a full rescan. Also, a full rescan just takes too long to do manually daily even if it would work. However, I think I found the actual problem: Syncthing's trash directory which is cleaned out every 14 days. One option I have would be to just disable it - but I wondered if there's an option to ignore certain folder names while scanning. In my case, I'd like to have PowerAmp scan for music in /sdcard/Music and /sdcard/Music/somename but not in /sdcard/Music/.stversions so I can just remove the checkmark for that directory in the scan options, so it works for me now!

Delete Playlist Popup

Question:

I don't understand the options when deleting a playlist in PowerAmp. What is the difference between "Delete Files" and "Delete" in the "Delete entry? Selected playlists will be deleted, including file-based playlist files. Songs won't be deleted" popup?

Answer:

Poweramp can delete just entry not touching the track file, or it can remove both entry + the track (Poweramp will additionally ask to confirm this). This option was requested previously by users, though this is true for almost everything in Poweramp.

Result:

So "Delete" deletes just the m3u file while "Delete Files" also deletes all Song Files.