It is currently April 18th, 2024, 5:15 am

NowPlaying Measure Can't Display Special Characters From MediaMonkey

Get help with installing and using Rainmeter.
Technotastic
Posts: 21
Joined: November 16th, 2019, 3:50 pm

NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Technotastic »

Greetings Rainmeter Community,

I originally came to you with what I thought was a skin related problem. The problem in question is that when playing a song that contains special characters (such as Japanese) in the song or artist fields from the media player known as MediaMonkey, the meter displaying this information instead outputs a "?", rather than the correct character. After recieving assistance from skilled member of the community, I realized that this was not in fact the fault of any skin or meter.

Rather, it seems that the NowPlaying measure responsible for retrieving title and artist information does not correctly communicate with MediaMonkey anymore. The NowPlaying measure can still correctly recieve and display special characters from other media players, such as WMP. This is not the case with MediaMonkey.

Here is my original thread where I believed this to be a skin based problem. It contains images, files, and other evidence that is still relevant to this issue.

I believe that this communication breakdown is because MediaMonkey has since undergone major revisions. MediaMonkey is currently on build 4.1, but the Rainmeter documentation seems to only guarantee compatibility with MediaMonkey 3.2.5 (and presumably any 3.2 build).

I do not have the technical expertise, nor the understanding required to grasp this problem. Is it even fixable? Can you tamper with the fundamentals of a measure? I have no idea. If anyone with the experience and knowledge can provide feedback or assitance, I would be deeply grateful.

Thank you for your time,
Technotastic

(P.S. if any edits need to be made to this post in order to improve clarity, please let me know.)
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Yamajac »

This is likely because of some character encoding issues and there wouldn't be an easy way for you as a user to fix this. I don't use any skins that interact with media players so I don't know the full breadth of possibilities, but if MediaMonkey can write the current song info to a file you could read from that with a WebParser measure. As long as MediaMonkey is able to output the correct data to file then webparser will be able to read it, even if there's problems with the way the NowPlaying plugin is grabbing that information.
Technotastic
Posts: 21
Joined: November 16th, 2019, 3:50 pm

Re: NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Technotastic »

Great suggestion! I don't know if this is possible, but I'll definitely look into it and see if this workaround/others like it are possible!
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Yamajac »

Technotastic wrote: November 17th, 2019, 8:20 pm Great suggestion! I don't know if this is possible, but I'll definitely look into it and see if this workaround/others like it are possible!
When in doubt, add more points of failure.


Er...

Well, something like that I guess.
Technotastic
Posts: 21
Joined: November 16th, 2019, 3:50 pm

Re: NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Technotastic »

So it seems like MediaMonkey is capable of writing the current track to a .txt file. However, I have to become familiar with MediaMonkey's scripting language in order to do so. This will take some time. For now, this suggestion appears to be the best solution. IF I can figure it all out, and get Media Monkey to export everything to a .txt file, I can then use WebParser to read that file and display it, correct?
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Yamajac »

Technotastic wrote: November 17th, 2019, 11:15 pm So it seems like MediaMonkey is capable of writing the current track to a .txt file. However, I have to become familiar with MediaMonkey's scripting language in order to do so. This will take some time. For now, this suggestion appears to be the best solution. IF I can figure it all out, and get Media Monkey to export everything to a .txt file, I can then use WebParser to read that file and display it, correct?
Yes you can. Webparser can read local files exactly the same as you'd read a webpage with it.
Technotastic
Posts: 21
Joined: November 16th, 2019, 3:50 pm

Re: NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Technotastic »

Excellent news! I have figured out how to get MediaMonkey to print to a .txt file! Whatever is currently playing is sent "NowPlaying.txt", and is formatted like so:

<artist>ARTIST</artist><track>TRACK</track><album>ALBUM</album>

Which when actually used looks like:

<artist>Duett</artist><track>Physical</track><album>Cycles</album>

The bad news is, I can't seem to get WebParser to play nice with a local file. I've attempted to follow the WebParser tutorial, and I've ended up with this code:

Code: Select all

[MeasurePlayingFile]
Measure=WebParser
URL=file://C:\ScriptBin\NowPlaying.txt
RegExp="(?siU)<artist>(.*)</artist>"

[MeasureArtist]
Measure=WebParser
URL=[MeasurePlayingFile]
StringIndex=1
When I check the values of the meter in the About > Skins section of Rainmeter though, I don't get values! Attempting to mass [MeasureArtist] to a meter simply leaves the meter blank. What part of the WebParser code am I doing wrong? I've been staring at it for a good twenty minutes, and I can't figure it out.

Any help is greatly appreciated!
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Yamajac »

Technotastic wrote: November 18th, 2019, 1:51 am Excellent news! I have figured out how to get MediaMonkey to print to a .txt file! Whatever is currently playing is sent "NowPlaying.txt", and is formatted like so:

<artist>ARTIST</artist><track>TRACK</track><album>ALBUM</album>

Which when actually used looks like:

<artist>Duett</artist><track>Physical</track><album>Cycles</album>

The bad news is, I can't seem to get WebParser to play nice with a local file. I've attempted to follow the WebParser tutorial, and I've ended up with this code:

Code: Select all

[MeasurePlayingFile]
Measure=WebParser
URL=file://C:\ScriptBin\NowPlaying.txt
RegExp="(?siU)<artist>(.*)</artist>"

[MeasureArtist]
Measure=WebParser
URL=[MeasurePlayingFile]
StringIndex=1
When I check the values of the meter in the About > Skins section of Rainmeter though, I don't get values! Attempting to mass [MeasureArtist] to a meter simply leaves the meter blank. What part of the WebParser code am I doing wrong? I've been staring at it for a good twenty minutes, and I can't figure it out.

Any help is greatly appreciated!
If you can give me the whole skin I can help you a bit better, but try removing the quotes in RegExp in MeasurePlayingFile for now. I don't believe you need them.
Technotastic
Posts: 21
Joined: November 16th, 2019, 3:50 pm

Re: NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Technotastic »

Here is all the code currently contained in the skin:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[MeasurePlayingFile]
Measure=WebParser
Url=file://\C:\ScriptBin\NowPlaying.txt
RegExp=(?siU)<artist>(.*)</artist>

[MeasureArtist]
Measure=WebParser
Url=[MeasurePlayingFile]
StringIndex=1

[MeterArtist]
Meter=String
MeasureName=MeasureArtist
X=160
Y=160
W=300
H=15
FontSize=11
FontColor=255,225,181,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontWeight=700
StringAlign=Center
AntiAlias=1
I have removed the quotes and tried again, and the problem seems to persist.

I have attached the skin folder so that you can run tests independently. Thank you for lending your help! I hope we can solve this.
You do not have the required permissions to view the files attached to this post.
User avatar
Yamajac
Posts: 134
Joined: June 30th, 2014, 8:44 am

Re: NowPlaying Measure Can't Display Special Characters From MediaMonkey

Post by Yamajac »

Technotastic wrote: November 18th, 2019, 2:08 am Here is all the code currently contained in the skin:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[MeasurePlayingFile]
Measure=WebParser
Url=file://\C:\ScriptBin\NowPlaying.txt
RegExp=(?siU)<artist>(.*)</artist>

[MeasureArtist]
Measure=WebParser
Url=[MeasurePlayingFile]
StringIndex=1

[MeterArtist]
Meter=String
MeasureName=MeasureArtist
X=160
Y=160
W=300
H=15
FontSize=11
FontColor=255,225,181,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontWeight=700
StringAlign=Center
AntiAlias=1
I have removed the quotes and tried again, and the problem seems to persist.

I have attached the skin folder so that you can run tests independently. Thank you for lending your help! I hope we can solve this.
Sorry, I got distracted working on a context menu skin and completely forgot I was helping you. Another thing I totally forgot about, but WebParser can only read files within the Skins directory. So just put the NowPlaying.txt in your MMNowPlaying folder. I believe you can make a symlink as well, but it's gotta be somewhere in the Skins directory.