ungive / discord-music-presence

Rich presence for sharing your music listening activity in your Discord status. Works with any media player on your system. For Windows and Mac (and soon Linux).
https://musicpresence.app
Other
40 stars 0 forks source link

Open the player from the application #9

Open mantertius opened 1 month ago

mantertius commented 1 month ago

Is there an existing issue for this?

Describe the problem

I want to be able to open the application and from it open my media player, so that I do not need to run both. I use TIDAL as my main streaming service.

Solution

A button with "open TIDAL" or any other media player from within the tray.

Alternatives

No response

Additional context

I mostly forget to open this application.

ungive commented 1 month ago

Thanks for the suggestions!

What do you mean with "so that I do not need to run both"? Music Presence only detects media from players that are 1. running and 2. actively playing media, so by definition, both applications would need to be running at the same time.

Do I understand it correctly, that you want to open TIDAL (or any other media player) from within the tray menu, while it is closed and not running? So basically like a media player launcher.

Why do you want to do this from the Music Presence tray menu and not simply from the start menu or taskbar?

What problem does this solve or automate?

mantertius commented 1 month ago

Hello, @jonasberge! Loving the app so far.

The tray menu was just a simple approach, but it can be solved from the start menu or the taskbar as well.

The things is that I mostly forget to open both Music Presence and the media player. Most of the time, I just pop my media player open and start to listen. By the time I remember to open Music Presence, plenty of hours have passed.

So, the idea is to - as you said - launch the media player from the Music Presence. So that I do not need to click on two separate icons. image

On the picture above is my suggestion -- there I have opened the app but not the player yet. Something like that, where on the Settings you set the path to the media player.exe and the Open would just be a shortcut to this.

Or even better, when I launch the Music Presence it also launches my default player (if not already running). The idea is to automate/speed up this workflow of launching both apps.

Anyways, thanks for the reply!

ungive commented 1 month ago

I see, thanks for clarifying!

Would creating a startup shortcut solve your problem?

https://support.microsoft.com/en-us/windows/add-an-app-to-run-automatically-at-startup-in-windows-10-150da165-dcd9-7230-517b-cf3c295d89dd

That way Music Presence will launch when you start your computer and you don't have to think about it anymore.

poetryofcode commented 1 month ago

Assuming you're on Windows, if you really want to launch a certain media program and Music Presence with one shortcut, I suppose you could do so using a batch file. Note that it technically is not a shortcut but a short snippet of basic command line arguments.

Here's how to do this. Right click on your desktop, click New -> Text Document, then remove all the text from the file name – including the .txt extension – and name your file something like Music.bat. Doesn't really matter, as long the file extension is .bat.

Then edit the file with Notepad and add the following:

start /d "C:\Users\Windows\Documents\music-presence-2.0.0-win64" "" "Music Presence.exe"
start /d "C:\Users\Windows\AppData\Local\MediaPlayer" MediaPlayer.exe

Note that you need to change the file path above for Music Presence, and the file path for the media player you want to launch and specify a correct file name for its executable (in the example above, MediaPlayer.exe).

If you want to be extra fancy, you could hide the batch file in your documents folder for example, and create a shortcut to it for your desktop. You can then change the icon and name as you will.

This will let you launch a media player and Music Presence with just one click.

Hope this helps. :)

ungive commented 1 month ago

On the picture above is my suggestion -- there I have opened the app but not the player yet. Something like that, where on the Settings you set the path to the media player.exe and the Open would just be a shortcut to this.

While I do think this is not really a problem per se that should be solved within Music Presence (simply launching Music Presence on system startup should solve the annoyance of having to start it manually every time), I do see an appeal in launching a previously used media player from within the tray menu and having all players you have ever used before launchable from one place.

In fact, it should be possible to get the whole path of the executable, when a media player is detected. So after you have played a song in that player once, it should be easy to launch it from within Music Presence, given the executable path (without the user even having to enter it manually or search for it in a file picker). This could even be extended to browsers once I have a way of knowing the website, in which case the browser could launched with the given URL to open e.g. YouTube.

Something like "Launch a previous player" for any player that isn't currently detected might be nice. I'm afraid it might clutter the menu though, so I might hide it in a sub-menu.

This wouldn't be a priority right now though, but I'll keep an eye on it! Right now my first priorities are to create a release for Mac, add support for Linux and detection for browsers, so that Music Presence becomes a universal tool for media from any source and then make sure it's fully stable.

Thank you for your suggestion @mantertius!