Exit the player or clear the current playlist queue

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
feba
Junior Member
Junior Member
Posts: 5
Joined: 2021-05-16, 09:04 UTC

Exit the player or clear the current playlist queue

Post by *feba »

Hello,

I managed to use TC as media player for mp3 files via Tasker intents.
When I trigger a task to play another file, the file is appended to the playlist queue. Is it possible to send an action or intent to delete the current queue, then add the new file in a new task and then "hit play"? I figured how to do the latter two parts, but not the delete playlist queue.

In short, if I send an intent to play a music file, I want it to be the only file in the queue.

My approaches so far were
- killing the app, then send the play command (but don't want to root or grant device admin rights to apps)
- use the com.ghisler.Exit intent which is stated in the manifest (did not work, maybe misconfiguration?). I assume it will exit the TC or just the media player, I don't know.
- immediately skip to the next track upon opening the file (this kinda works but it increases the queue length infinitely especially if not maintained regularly because of usage with kids)

Another task I could not succeed in is rewinding a music file. The usual Tasker media command actions seem to be ignored.

Thanks for the help,
feba
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Exit the player or clear the current playlist queue

Post by *ghisler(Author) »

Yes, you have to send the following URL to the player: file://exit
You can do this via a button:
Function type: View file with app
Command: click on >> and pick "TotalCmd (Queue)"
Parameters: url:file://exit

Important: You must specify url:file://exit and not just file://exit as parameters, otherwise Android will send file:///exit with 3 slashes!
Author of Total Commander
https://www.ghisler.com
feba
Junior Member
Junior Member
Posts: 5
Joined: 2021-05-16, 09:04 UTC

Re: Exit the player or clear the current playlist queue

Post by *feba »

Hi,
thank you for your very quick reply.

Buttons also need root access as mentioned by Tasker.
Can I send it via an intent, too? Or can I open a file instead with the URL as path? How would i configure that command?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Exit the player or clear the current playlist queue

Post by *ghisler(Author) »

Buttons also need root access as mentioned by Tasker.
What do you mean? Buttons in TC do not need root access, although you could use root commands.
Can I send it via an intent, too?
Yes, although newer programs will crash when trying to send an intent with file: URL, unless you prevent it.
The button you define is essentially for an intent of type VIEW or MAIN.
Author of Total Commander
https://www.ghisler.com
feba
Junior Member
Junior Member
Posts: 5
Joined: 2021-05-16, 09:04 UTC

Re: Exit the player or clear the current playlist queue

Post by *feba »

Sorry for being unspecific.

I interpreted your first reply as to create a button task with the given settings. I found that to create the following in Tasker: Task -> Input -> Button to be root-only.
I don't know where to apply your configurations to in Tasker from your first reply.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Exit the player or clear the current playlist queue

Post by *ghisler(Author) »

My first reply was for a button in the lower toolbar of Total Commander, not for tasker.
You can't currently send this with Tasker, I have tried it. I will add something to the next version.
Author of Total Commander
https://www.ghisler.com
feba
Junior Member
Junior Member
Posts: 5
Joined: 2021-05-16, 09:04 UTC

Re: Exit the player or clear the current playlist queue

Post by *feba »

Thank you, that would be awesome. Would it also be possible to support the rewind / fast forward buttons? I know, the TC media player seems not to feature that currently, but would it be out of the realm of possibilities?

Kind regards, I am looking forward!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Exit the player or clear the current playlist queue

Post by *ghisler(Author) »

You can add buttons to the player to jump forward/backward by a specific amount, and also play back at a higher/lower speed, which is probably the closest you can get to fast forward.
Author of Total Commander
https://www.ghisler.com
feba
Junior Member
Junior Member
Posts: 5
Joined: 2021-05-16, 09:04 UTC

Re: Exit the player or clear the current playlist queue

Post by *feba »

Yes, I found that in the configurations setting, I just thought about addressing them via Tasker again. If I understand the manifest correctly, currently only play/pause/next/prev are supported, the other two, exit and null I don't know what they do or how to use them in an intent. I hoped that the rewind/forward buttons and the stop button could also be featured there.
Post Reply