Tasker Plugin for MAFA

This could be great! I use MAFA in several MPD servers such as phone (local), car (rpi), house (rpi), office (laptop)

I could really use some automatic features depending on the server I am working in the current moment:

  • Play/Pause when there is an active phone call
  • Pointing to the right MPD server depending on condition (setting the current mpd server in MAFA)
  • DB update
  • Populate queue list
  • clearly, I can think of more :slight_smile:

Tasker plugin is on the do-to list but TBH it is in low priority for now. Sorry.

Hi,

I’m revisiting this, I suppose the only thing I really need is the ability to be able to (re)start MAFA with a specific profile, which is actually a server, right?

This can be done with (simple?) android intent, no? giving that one of the “Extras” fields mentions the profile name.

The reasoning behind of me changing my mind is most of the commands I would want to pass through the Tasker plugin I can actually pass directly to the MPD server.

From my experience in the professional software development realm that better than delete code is never write one in the first place :slight_smile:

Keep up the good work!

perhaps with intent MAFA can switch between “profiles”

What is the condition on which you need to switch between MPD servers in MAFA?

I can add such intent. The concern is security. For the sending app to get the permission it must be declared in its manifest. Otherwise some app level security must be implemented.

I have multiple MPD servers (including the localhost on my phone) in which I am circling between depending on my whereabouts (Home, Car, Office, On the go), each has its own IP thus counts as a different MPD server in MAFA.

Regarding the security, that’s odd. because I was playing with intents on some apps which I’m pretty sure are not declared in the manifest. e.g.

  • created a custom intent which is executed in Termux shell and triggers Tasker
  • triggered a copy action in Mix file explorer by sending an intent from tasker

I wouldn’t think that Tasker mentioned Termux in its manifest or Mix file explorer specified Tasker on its manifest

unless I did not understand what you were saying
thanks

If MAFA were to automatically switch to the MPD server that’s available in the current network would that solve this?

I’m not familiar with tasker or the apps you control with it but it would seem like a security issue if an app could execute another app’s functions without restriction or confirmation for example delete files.

Thanks for the reply
Current network is a step forward, but specifically for me will miss the Car scenario (Mobile Network + Wifi Tethering) and the local.

I certainly would not want you to implement a feature you do not 100% agree with or a half-baked solution that will not serve the use case. Saying that Wifi aware MPD client is a feature which i have seen in the past e.g. legendary MPDroid.

One of the best things I’ve learned from being a product manager for the past 12 years, is that it is the best thing you can do is not implement a feature you would regret or will add poor value to the product. MAFA is by far the best MPD client there is today, so better keep it that way

Although I am a heavy Tasker user, I would consider if even it’s worth to add support to it.

MAFA beta release 1.8.0 implements two custom intents.

One sends a command directly to any MPD server by host and port number (and returns the response from MPD as intent-result).

The other changes the selected MPD server in MAFA itself.

It’s still experimental and open to changes. Feedback is welcome.

replied below, WORKS PERFECTLY!!! thank you so much!!

The only thing I need automating is the toggling of the MAFA HTTP streaming feature, then I am golden!