Discovered a glitch with the Android App

Need help? Post your questions here.

Moderator: moderators

Discovered a glitch with the Android App

Postby formslash » Mon Apr 16, 2018 3:14 pm

So I recently discovered a glitch in the android app while streaming music in my car.

Granted, some of this is conjecture based on how I think the code works. I haven't myself bothered to look at it in depth.

When streaming a song on your android, the app seems to first search your cache directory on your phone and, if the song name is found, it plays it off your phone to save the trouble of making a network call. If it's not found, then it calls the database and downloads the track into your cache.

I discovered that this is kind of flawed if you have two separate songs which happen to have the same name. In my particular case, when you play the first song, it is downloaded and stored in cache. Then when you try to play the second song, it finds the song name in your cache folder and incorrectly plays that track instead of the one you wanted.

I don't exactly know Subsonic's methodology/naming conventions for saving these audio files, but I assume that it saves based on song name since in this case, that is the only thing similar between my two audio files (artists are different).

I'd imagine changing the naming convention from being simply the song title to something that can more accurately map unique audio tracks wouldn't be too hard (create some kind of mapping where song entries are pointers to song files with a generated key name, e.g. an integer, or whatever is appropriate to avoid this issue.

I wouldn't know because I don't have one, but I'm guessing that a similar issue would probably be prevalent in the iPhone version of the app too...
formslash
 
Posts: 1
Joined: Mon Apr 16, 2018 3:11 pm

Re: Discovered a glitch with the Android App

Postby acroyear » Mon Apr 16, 2018 6:13 pm

There's no official iPhone app, so each has its own rules for caching. I personally haven't found that happen on Android, or at least, I haven't noticed, but from my browsing through offline cache, it looks like it is storing the whole file path the file.

Did the second file have the same album as well as name and artist as the first one?

One way to distinguish is to add (live) or (live + show location/data) or all the different remix flags one can add. However, that runs the risk of the desired file not matching last.fm's naming scheme when it comes to deciding the most popular tracks of an artist, so your mileage may vary. (then again, leaving that metadata out of the filename ALSO means that a live version or later recording may come up instead of the original, so there we are; can't have it both ways.)
--
Joe Shelby
http://subfireplayer.net/
User avatar
acroyear
 
Posts: 547
Joined: Wed Mar 27, 2013 8:05 pm
Location: Northern, VA


Return to Help

Who is online

Users browsing this forum: No registered users and 6 guests