We have moved to a new Sailfish OS Forum. Please start new discussions there.
5

Music/Media player lists m3u playlist files in "All Songs" view

asked 2014-09-30 10:30:20 +0300

mcfrisk gravatar image

updated 2014-10-01 17:38:30 +0300

Update: yes, indeed Media player lists m3u playlist files in "All Songs" view so suffling into one of them feels weird since a full album is played.

I have this a lot since display service and reflash of 1.0.8.19.

sdcard has about 20 gigs of music. I select all songs and give media player a few minutes to 'load' all of them and then I select suffle mode playback.

After a while the suffle mode seems to get stuck on an artist or album or playlist. Just had an hour of Metallica Death Magnetic. I can't believe I was so lucky with randomness.

Pressing pause on music player cover does not help, but pressing next button cures this and real random playback continues.

edit retag flag offensive close delete

Comments

Nope, it's just a bug. Maybe playlists have something to do with it, like some of them them being counted into "All songs". That would explain this.

mcfrisk ( 2014-10-01 09:22:42 +0300 )edit
1

Just confirmed my suspicion: Media player lists also m3u files in "All Songs" view. This feels odd since they are playlist files which should not be there, IMO.

Copied an know m3u file to a funny name on jolla and refreshed All Songs view, and search finds this funny file name there.

So a small but clear bug.

mcfrisk ( 2014-10-01 12:41:05 +0300 )edit
2

And bug seems to be in tracker instead of jolla-mediaplayer:

$ tracker-sparql -q "SELECT ?mime
WHERE { 
?song a nmm:MusicPiece ;
    nie:isStoredAs ?as .
 ?as nie:url ?url ;
 nie:mimeType ?mime .
}"| sort | uniq

  audio/flac
  audio/mpeg
  audio/x-mpegurl
  audio/x-ms-wma
  audio/x-vorbis+ogg
  audio/x-wav
 Results:
  video/x-flv

This corresponds to the "All songs" list in jolla-mediaplayer, and these mime entries do not belong to there: audio/x-mpegurl, video/x-flv.

I've had a bunch of recorded flv video files on sdcard and sometimes they were played in music player. How weird is that...

mcfrisk ( 2014-10-01 17:04:37 +0300 )edit

@mcfrisk: Please see my answer with *.pls playlist files.

Can you see/find your m3u playlist files also below "Albums" or "Artists"?

You could generalize your title and tags than.

axaq ( 2014-10-04 16:32:35 +0300 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2014-10-01 17:23:41 +0300

mcfrisk gravatar image

updated 2014-10-01 17:24:28 +0300

A hackish fix for this issue, including the problem where jolla-mediaplayer plays flv videos. The fix uses hints from #tracker irc channel to filter nmm:MusicPiece output with MIME types, though the mime types reported by tracker are weird since ogg Vorbis files could/should also be known with application/ogg and maybe even audio/ogg too. Anyway, this works for me:

--- /usr/lib/qt5/qml/com/jolla/mediaplayer/TrackerHelpers.js-orig   2014-10-01 16:09:34.328148684 +0200
+++ /usr/lib/qt5/qml/com/jolla/mediaplayer/TrackerHelpers.js    2014-10-01 16:18:45.506296032 +0200
@@ -62,7 +62,9 @@ var songsSearchSelect = "" +
 var songsWhere = "" +
     "?song a nmm:MusicPiece " +
         "; nie:isStoredAs ?file " +
-    ". ?file tracker:available ?tr "
+    ". ?file tracker:available ?tr " +
+    "; nie:mimeType ?mime . " +
+    "FILTER (?mime in ('audio/x-vorbis+ogg', 'audio/flac', 'audio/mpeg', 'audio/x-ms-wma', 'audio/x-wav' )) "

 var songsFromArtistFilter = ". FILTER(?performerId = %3) "

Thanks for leaving these things open for hacking. I actually enjoyed it.

edit flag offensive delete publish link more

Comments

Patch still needed in 1.1.1.26. I can't use the music player without this.

-- /usr/lib/qt5/qml/com/jolla/mediaplayer/TrackerHelpers.js-orig    2014-12-18 16:56:27.587355257 +0100
+++ /usr/lib/qt5/qml/com/jolla/mediaplayer/TrackerHelpers.js    2014-12-18 16:57:42.300715985 +0100
@@ -60,7 +60,9 @@ var songsWhere = "" +
     "WHERE { " +
         "?song a nmm:MusicPiece " +
             "; nie:isStoredAs ?file " +
-        ". ?file tracker:available ?tr "
+        ". ?file tracker:available ?tr " +
+        "; nie:mimeType ?mime . " +
+        "FILTER (?mime in ('audio/x-vorbis+ogg', 'audio/flac', 'audio/mpeg', 'audio/x-ms-wma', 'audio/x-wav' )) "

 var songsFromArtistFilter = ". FILTER(?performerId = %3) "
mcfrisk ( 2014-12-18 18:02:14 +0300 )edit

This patch applies to 1.1.2.16 too.

When will Jolla sailors apply this?

mcfrisk ( 2015-03-09 12:35:08 +0300 )edit

Patch needed in 1.1.4.29 (Äijänpäivänjärvi) too. WHEN WILL JOLLA APPLY THIS!

mcfrisk ( 2015-05-08 09:18:23 +0300 )edit

Patch still needed in 1.1.6.27 (Aaslakkajärvi).

mcfrisk ( 2015-06-23 16:00:21 +0300 )edit

Patch still needed in 1.1.7.28. Hallooo Jolla devs!!!

mcfrisk ( 2015-09-03 18:14:30 +0300 )edit
0

answered 2014-10-04 16:28:36 +0300

axaq gravatar image

updated 2014-10-04 16:33:44 +0300

Also *.pls playlist files are listed below "All songs" but also below "Albums" and "Artists" as "Unknown album" and "Unknown artists".

The shown playtime of my *.pls playlist file entries is 00:00.

If I try to start such a playlist file entry from "All songs", "Albums" or "Artists" sub pages than Media app crashes.

My *.pls playlist files contain audio streaming URLs. The playlists are playable from the Media app main page without problems.

edit flag offensive delete publish link more
0

answered 2015-03-11 10:42:41 +0300

Tanty gravatar image

I've checked with latest version and the playlists problem (m3u, pls) should be fixed.

However, "video/x-flv" are still listed.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2014-09-30 10:30:20 +0300

Seen: 1,249 times

Last updated: Mar 11 '15