Music Explorer (from OpenRepos)

Does anyone know how to open the browser from QML?

This dbus works but only outside Sailjail even when the “Web content” permission is present.
org.sailfishos.browser / org.sailfishos.browser.openUrl 'https://www.youtube.com/watch?v=XRU1AJsXN1g'

SilicaWebView seems not to be an option either, the page loads but YT refuses to play the video.

Qt.openUrlExternally(link);

4 Likes

Perfect. Thanks. Works like a charm.

Does something like this exist to open the media player as well?

It works with files too, just pass filepath as the link

2 Likes

Didn’t know you could do it that way

Perfect. Thanks.

Now one can tap on the Image to open youtube or use the menu to download and play the track directly.

3 Likes

It seems like Qt.openUrlExternally() treats the files as video (because of the container format) which makes it a bit inconvenient to use.
I decided to implement a rudimentary player inside the app to circumvent this issue:

5 Likes

I’m afraid I’ve added so much functionality to the app, I may have accidentally created a poor man’s spotify :joy:

8 Likes

Music Explores employs the Playlist object inside Audio to play music:

Playlist {
      id: playlist
...
}

Loading the playlist works correctly:

playlist.load(Qt.resolvedUrl('/home/defaultuser/Music/playlist_load.m3u'))

But saving the playlist creates just an empty file:

console.log(playlist.save(Qt.resolvedUrl('/home/defaultuser/Music/playlist_save.m3u'), 'm3u'))
false

What am I doing wrong?

I have also seen this in an app where I use playlist.
I think it’s a bug, you are using it as advertized AFAICS.

Maybe some gdb or strace magic can reveal where it fails.

Qt source is here but I can’t really read that.

I have found this which sais:

So maybe it’s that the app can’t access the PersistentStorage path or database for some reason? If so there’s some discussion about that here.

1 Like

hmmm, you can try to disable jailsail and check

but if you have enabled userdir and portable media it should work
and .local & .config i think even without …

the core of my problem at that time was me as usual
and yes you should check that you do not load the old .config .local … that would be readonly, but it would not create empty files

1 Like

I’m pretty sure disabling jail was the first thing I tried when I saw this. It didn’t help.

1 Like

It looks like the python part of the app is able to store/delete files in this directory so I don’t think this would be just an issue with sailjail. Also the fact that QML is able to create the playlist file but not to populate it may indicate it’s not just access permissions alone.

1 Like

Just tested it without Sailjail to the same outcome.

Before I deep dive into the next anarchy app, why in the name of all that’s, err, good does a search for Xenakis come up with NOTHING???

Ok, avant-pop stuff shows up. And directly playing Pascal Comelade’s Haikus de Pianos does upgrade the SFOS experience by 10 point. Bravo.

Now where is Xenakis!?

Shit. It’s me again. So, great app. Almost as much fun as last.fm :slight_smile: One bitch, beside the Xenakis rant, jumping to the first page with junk when you delete back to zero chars in search is really painful.

Otherwise, really useful. Fun!

1 Like

The more you search for “your” stuff the more this view should adapt so the “junk” should become less and less.

Besides this, take a look at the settings page, there you should be able to either disable this completely or set it to only display content you’ve downloaded yourself.

Fair, but I don’t understand why you would introduce ‘blocking’ behavior (can’t type after deleting last char because the UI is locked in loading). The very fact that I see Kenny Rogers and can’t find Xenakis is disturbing enough, but that the ‘main’ screen loads again when I have focus on the search bar is kinda evil.

None is nice :wink: How do I get rid of stuff that I should rather NOT have downloaded?