Menu

#58 Rescan media ignores .m3u playlists

v1.0_(example)
open
nobody
None
1
2017-07-24
2017-07-21
Cri
No

If I run "Rescan media" on a directory, .m3u (playlist) files are ignored (although GC includes them in the count of scanned files), i.e. the corresponding playlists in the stock music player are not created/updated (the scan works OK for media files).

The only way I found to update the playlists is to reboot the device.

Expected behaviour: the rescan made by GC should include .m3u playlists files, like the rescan that is done automatically by android at boot time.

(I've heard of some apps to create/manage .m3u files on android, so I guess this is technically feasible)

Samsung cell phone
Android: 4.2.2
GC: 1.54b1 (from f-droid repository)

Discussion

  • Cri

    Cri - 2017-07-21
     
    • zc2

      zc2 - 2017-07-22

      No, that approach is depricated. We supposed to use the MediaScannerConnection object instead.

       
  • zc2

    zc2 - 2017-07-22

    Do you know any application (preferable open sourced) which actually ably to add a .m3u file to the medialibrary?

     
  • Cri

    Cri - 2017-07-23

    Uhm, I checked the music players available in the f-droid repository but none seems to handle .m3u files the way we need.

    BUT, maybe you can have a look at Slight backup
    https://f-droid.org/packages/de.shandschuh.slightbackup/
    it can dump/restore playlists to/from an XML format (I use it often and never had a problem), so I guess it can somehow update the playlist data in the mediastore.

    Ah, another link I found, maybe useful, maybe not...
    https://stackoverflow.com/questions/3300137/how-can-i-refresh-mediastore-on-android

     
  • Cri

    Cri - 2017-07-23

    Anyway, does GC really have to actually deal with the .m3u file directly? Can't you just tell android "hey rescan this directory" and let the android media scanner deal automatically with all kinds of files it finds in there, as it does at boot (or when the SD card is remounted)?

     
    • zc2

      zc2 - 2017-07-24

      As far as I know it does. I call the method scanFile() for each file individually, there is no way to scan a directory.
      The problem with .m3u file, for some reason, the call back method (onScanCompleted() ) is called with null as the URI, meaning the media store was failed to add the file to the library. I tried to pass different mime type string to the scanFile() method, no avail.

       

Log in to post a comment.