It is currently March 29th, 2024, 6:55 am

iTunes Repeat States/NowPlaying Plugin

Report bugs with the Rainmeter application and suggest features.
User avatar
Aethrios
Posts: 50
Joined: February 25th, 2014, 1:45 am

iTunes Repeat States/NowPlaying Plugin

Post by Aethrios »

I've seen this mentioned a few times before, but I thought this merited bringing up again (in part because I'm one more confronting the issue!).

In iTunes, for quite some time, there have been three different repeat states: off (0), repeating a single song (1), and repeat all (2?).

The NowPlaying plugin, as it stands, only offers the ability to switch between states 0 and 1 with the !CommandMeasure SetRepeat n instruction. I personally find this problematic because I prefer to keep the repeat setting to cycling through all of my music, rather than just repeating a single song. If I wish to toggle this, for whatever reason, I can then turn repeat off, but I can't set it back to the way it was (even when trying to use toggle, "-1").

I would like to request the addition of an additional state (using state "2" seems to make sense here, at least to me) to allow us to properly cycle through the options available, when more than two repeat states exist.
Minimalist Enthusiast
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: iTunes Repeat States/NowPlaying Plugin

Post by CyberTheWorm »

I think you can do this

Code: Select all

[MeasureRepeat]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=[MeasurePlayer]
PlayerType=Repeat
Substitute="0":"repeatoff","1":"repeatone","2":"repeatall"
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
Aethrios
Posts: 50
Joined: February 25th, 2014, 1:45 am

Re: iTunes Repeat States/NowPlaying Plugin

Post by Aethrios »

Unless I'm missing something, I don't believe that will work.

As it stands, Repeat has only two available states, 0 and 1. I'm requesting the addition of another state, 2, in order to allow for the distinction between repeating a single song and repeating a playlist or a larger grouping of songs.

Passing a 2 (or even -1, the toggle command) back to the measure either throws a blank, or in the case of -1, cycles back and forth between not repeating or repeating a single song.

Edit: to justify, when I look at the About screen for the skin that calls NowPlaying, and manually cycle through the different repeat values in iTunes, they currently report as follows:

No Repeat = 0
Repeat All = 1
Repeat One = 1

Since both repeats return the same value, there's not currently a way to distinguish between them. Now, if the problem is with iTunes then I guess we're all SOL, but I'm inclined to believe it has to do with how Rainmeter is currently interpreting the state provided by iTunes, rather than the state not being passed correctly in the first place.
Minimalist Enthusiast