Windows Now Playing - Rainmeter Forums (2024)

It is currently July 15th, 2024, 6:48 am

  • Board indexCommunity Support
  • Search

Windows Now Playing

Post Reply

  • Print view

57 posts

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next
bigparty
Posts: 5
Joined: March 7th, 2021, 7:39 pm

Windows Now Playing

  • Quote

Postby bigparty »

Hello. I was looking for a skin to display the music information and all skin needed to inform a music player (spotify, wpm, foobar2000 ...). My idea was to display the information of any player or browser that was playing any music or video, as well as in the "now playing" of Windows.

Windows Now Playing - Rainmeter Forums (1)

As today I only use the browser to listen music, the WebNowPlaying plugin would be enough for me. However, it was not compatible with my browser. So I decided to make a program myself to get this information directly from Windows.

The software I made takes information about the title, artist, album name and thumbnail. As in windows, it works with any program and takes information from everything that plays some type of media. If it is useful for someone, I am making a skin available with the example of use. It has some bugs, but I currently use it to get the title and name of the artist and it works well.

Windows Now Playing - Rainmeter Forums (2)

Attachments
Windows Now Playing - Rainmeter Forums (3) WindowsNowPlaying_07.03.2021.rmskin
(5.27 KiB) Downloaded 1993 times

Top

bigparty
Posts: 5
Joined: March 7th, 2021, 7:39 pm

Re: Windows Now Playing

  • Quote

Postby bigparty »

How to use:

Through the RunCommand plugin.

Abstract example:

Parameter = WindowsNowPlaying [title|artist|album] [truncate at] [add at end of truncated string]

or

Parameter = WindowsNowPlaying thumb

Real example:

Code: Select all

[MeasureTitle]Measure=PluginPlugin=RunCommandParameter=WindowsNowPlaying title 32 ...DynamicVariables=1OutputType=ANSIOutputFile=#CURRENTPATH#title.txt

The output of [MeasureTitle] will be the title of the song / video or whatever is playing. If it is longer than 32 characters, it will be truncated to the 32nd character and "..." will be added to the end.

The [truncate at] and [add at end of truncated string] parameters cannot be used with the thumb parameter.

When calling "WindowsNowPlaying thumb" a file named "thumbnail.png" will be saved in the same location as the .ini, if something is playing. For the example I used the QuotePlugin plugin to display the image.

The output of "WindowsNowPlaying thumb" can be two values ​​(150/84). These values ​​represent the height of the image resolution. The file can be in the format of 150x150 or 150x84 (youtube thumnails generally).

When there is nothing playing or paused, the output will be null / empty and the thumbnail will be deleted.

And I believe that is all.

Top

deflore08
Posts: 209
Joined: July 12th, 2020, 7:47 am
Location: Ada, Garden City
Contact:

Contact deflore08

Re: Windows Now Playing

  • Quote

Postby deflore08 »

Really useful! Thank you buddy! Windows Now Playing - Rainmeter Forums (5)

Top

Cariboudjan
Posts: 269
Joined: May 12th, 2019, 8:55 am

Re: Windows Now Playing

  • Quote

Postby Cariboudjan »

Excellent work here. Question, would it be possible for you to recompile the addon to remove new lines from the output?

When using WriteKeyValue to save the output, it creates unneeded/unwanted newlines below the variable.

Using RegExpSubstitute=1 and Substitute="\r\n":"" doesn't appear to work with RunCommand measures?

Also if exceptions could return no text. Maybe move the exception to the Rainmeter log instead of a returning it as the measure's value.

Also would be good to have some way of automatically triggering the RunCommand bangs when some sort of other trigger identifies that a song name has changed.

Last edited by Cariboudjan on June 29th, 2021, 7:21 pm, edited 1 time in total.

Top

jsmorley
Developer
Posts: 22646
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Windows Now Playing

  • Quote

Postby jsmorley »

Cariboudjan wrote: June 29th, 2021, 6:11 pmExcellent work here. Question, would it be possible for you to recompile the addon to remove new lines from the output?

When using WriteKeyValue to save the output, it creates unneeded/unwanted newlines below the variable.

Using RegExpSubstitute=1 and Substitute="\r\n":"" doesn't appear to work with RunCommand measures?

Also if exceptions could return no text. Maybe move the exception to the Rainmeter log instead of a returning it as the measure's value.

123.png

Don't use Substitute="\r\n":"". Use Substitute="#CRLF#":"" instead.

Top

Cariboudjan
Posts: 269
Joined: May 12th, 2019, 8:55 am

Re: Windows Now Playing

  • Quote

Postby Cariboudjan »

Huh. Never considered that.

Top

Yincognito
Rainmeter Sage
Posts: 7727
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

  • Quote

Postby Yincognito »

jsmorley wrote: June 29th, 2021, 6:41 pmDon't use Substitute="\r\n":"". Use Substitute="#CRLF#":"" instead.

\R or \r?\n should work as well, shouldn't they? If it's just \n used as CR/LF instead of the \r\n, that is...

I'm successfully substituting in RunCommand outputs using \n, by the way, so I'm guessing that's the problem.

Top

jsmorley
Developer
Posts: 22646
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Windows Now Playing

  • Quote

Postby jsmorley »

Yincognito wrote: June 29th, 2021, 10:06 pm\R or \r?\n should work as well, shouldn't they? If it's just \n used as CR/LF instead of the \r\n, that is...

I'm successfully substituting in RunCommand outputs using \n, by the way, so I'm guessing that's the problem.

Sure, but #CRLF# will match either way. If the file has \r\n (Windows) EOL characters, or \n (Unix) EOL character. So it seems a lot simpler, or at least more reliable, to me.

I suspect that #CRLF# actually just matches on the \n, but if you remove the \n from the \r\n EOL, it has the same effect. I think a \r by itself has no effect at all. The whole Carriage Return deal is a prehensile tail in any case, that Windows just kept so older code won't fail. Not that many "carriages" out there to "return"...

Top

Yincognito
Rainmeter Sage
Posts: 7727
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Windows Now Playing

  • Quote

Postby Yincognito »

jsmorley wrote: June 29th, 2021, 10:15 pmSure, but #CRLF# will match either way. If the file has \r\n (Windows) EOL characters, or \n (Unix) EOL characters. So it seems a lot simpler, or at least more reliable, to me.

Of course - just wanted to be sure it's not something else than that. Windows Now Playing - Rainmeter Forums (13)

Top

death.crafter
Rainmeter Sage
Posts: 1398
Joined: April 24th, 2021, 8:13 pm
Contact:

Contact death.crafter

Re: Windows Now Playing

  • Quote

Postby death.crafter »

jsmorley wrote: June 29th, 2021, 10:15 pmhttps://www.youtube.com/watch?v=g2LJ1i7222c

A perfect good morning song lol... I am glad I didn't just mark the forums read and paid a visit here

Top

Post Reply

  • Print view

57 posts

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • Next

Windows Now Playing - Rainmeter Forums (2024)

FAQs

How to fix rainmeter not working? ›

Restart your system: A system restart can clear out any temporary data that might be causing Rainmeter to crash. Launch Rainmeter as an administrator: Before troubleshooting the main issue, try running Rainmeter with administrative permissions. To do so, click the search icon and type Rainmeter.

Does Rainmeter take a lot of RAM? ›

It will use about 35 MB of RAM and about 5% of your CPU, because of all the animations. Most rainmeter themes use a LOT less than that, and even that would use less if you turned off the animations.

Does Rainmeter reduce FPS? ›

If you are using a powerful gaming PC it is unlikely that Rainmeter will cause lag or frame rate drops when you play a game. But if your PC isn't ultra-powerful, and if you regularly have to lower in-game settings to get a game to run smoothly, temporarily disabling Rainmeter could help.

Is Rainmeter heavy on PC? ›

Rainmeter uses very little hardware resources and will run perfectly well on any PC using Microsoft Windows 7 through Windows 11.

Is Rainmeter safe for PC? ›

Re: Rainmeter Flagged as Virus in Pc Scan

You have this addon in one of your skins (it's seeable in the screenshot in which one). This file is safe for sure, the alarm is a false positive. I have used this file as well and my antivirus caught it many times, until I finally added it as an exception into my antivirus.

How to optimize a Rainmeter? ›

Bottom line, if you toggle off the media and the visualizer (less important) and don't open the settings skin too much (more important), the usage / power consumption should be acceptable, if you want to avoid editing the code.

Why is my skin not dragging in Rainmeter? ›

Re: Skin not dragging

If your skin is almost as large as your screen, you may be able to drag it lower to set it's position, but to position it higher you need to uncheck 'Keep on screen' and enter negative values into the second coordinate box; Windows will not let you drag anything above the top of the screen.

How do I reset my Rainmeter? ›

Navigate to Roaming/Rainmeter folder and delete the Rainmeter. ini file. Restart Rainmeter. It should load the illustro skins by default.

Why does Rainmeter not open on startup? ›

Look for Rainmeter in the list and make sure you have it set to On. If Rainmeter is not present in the list, open Task Manager (hitting Ctrl + Shift + Esc), click Startup apps tab and check if Rainmeter is in this list (however if it was not present in the previous list, you won't see it here either, I think).

How do I get Rainmeter to stay on my screen? ›

My first try would be: right-click on the skin that flickers through your window when you move that window. Choose "settings" -> "position" and then one of: "normal", "in the background" or "on the desktop". Then the skin should stay behind the moving window.

Top Articles
Latest Posts
Article information

Author: Reed Wilderman

Last Updated:

Views: 6540

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Reed Wilderman

Birthday: 1992-06-14

Address: 998 Estell Village, Lake Oscarberg, SD 48713-6877

Phone: +21813267449721

Job: Technology Engineer

Hobby: Swimming, Do it yourself, Beekeeping, Lapidary, Cosplaying, Hiking, Graffiti

Introduction: My name is Reed Wilderman, I am a faithful, bright, lucky, adventurous, lively, rich, vast person who loves writing and wants to share my knowledge and understanding with you.