Author Topic: My Virtual Tags Stopped Working in Theater Mode  (Read 454 times)

frankz

  • Sr. Member
  • ****
  • Posts: 3876
Version: 3.5.8856 P
then
Version: 3.6.8858 P
My mb_TheaterModePlugin.dll is "Date Modified" right now.

I may have missed the description of an update along the way, but the following code worked fine up until at least a month or two ago.  Now it does not.  I don't use Theater Mode all of the time, so I can't pinpoint when it stopped working.
Code
<element type="Field" name="#Virtual1" id="Virtual1" xAnchor="#Cover.Right" align="Left" yAnchor="Panel.Bottom" y="-220" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Sans" style="Bold" size="17" fg="220,220,220" ></element> 	
<element type="Field" id="Artist" xAnchor="#Cover.Right" align="Left" yAnchor="#Virtual1.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Sans" style="Regular" size="16" fg="200,200,200" ></element>
<element type="Field" id="Album"  xAnchor="#Cover.Right" align="Left" yAnchor="Artist.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Sans" style="Regular" size="16" fg="200,200,200" ></element>
<element type="Field" id="Virtual2"  xAnchor="#Cover.Right" align="Left" yAnchor="Album.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Mono" style="Regular" size="14" fg="200,200,200" ></element>
<element type="Field" id="Virtual3"  xAnchor="#Cover.Right" align="Left" yAnchor="Virtual2.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Mono" style="Regular" size="14" fg="200,200,200" ></element>
<element type="Field" id="Virtual4"  xAnchor="#Cover.Right" align="Left" yAnchor="Virtual3.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Mono" style="Regular" size="14" fg="200,200,200" ></element>
<element type="Field" id="Rating" visible="MusicBeeSetting" xAnchor="#Cover.Right" align="Left" yAnchor="Virtual4.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Mono" style="Regular" size="16" fg="200,200,200" ></element>
Artist and Album display fine, but none of the Virtual Tags or Rating do.

I added all of the virtual tags to Tracks View to test that they're working fine, and they are.

What did I miss here?


hiccup

  • Sr. Member
  • ****
  • Posts: 7904
I may have missed the description of an update along the way, but the following code worked fine up until at least a month or two ago.  Now it does not.  I don't use Theater Mode all of the time, so I can't pinpoint when it stopped working.
I am guessing it is intentional, but I thought to mention it anywayz:
That code that you posted is not a complete xml, so it will not function.
For example, it is missing an xml header?
Code
<?xml version="1.0" encoding="utf-8"?>
<root>
Last Edit: April 05, 2024, 08:47:36 AM by hiccup

frankz

  • Sr. Member
  • ****
  • Posts: 3876
Virtual1 should have been working but not others
this should work
https://mega.nz/file/Uo8FjZrD#jjC7S4AaYczxVWf40-0KOR9IrPH9IcjQQheU7O6hXbU

Unfortunately, it does not, although I now see the Rating stars at the top (might have been there last night and I just missed it).
I am guessing it is intentional, but I thought to mention it anywayz:
That code that you posted is not a complete xml, so it will not function.
For example, it is missing an xml header?
Code
<?xml version="1.0" encoding="utf-8"?>
<root>
In my head I wrote "following section of code..." but my head forgot to tell my fingers.

Yes it was intentional.  I "created" it several years ago by hacking up someone else's existing Theater Mode (I don't even remember which to give proper credit) and I didn't want anyone mistaking it for something functional or aesthetically pleasing and trying to use it themselves.  It gives me the information I like to see, but I doubt anyone else would find it useful.

I can post the whole thing, though, if it would help pinpoint where it's going wrong.

Code
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--Contributers: Albert Nisbet, Eeyore, albr0x, Jubs. Feel free to use, distribute and modify.-->
<!--Modified by: krissasaur.-->
<settings enableScaling="true" />
<settings backgroundImage="" />
<settings rotationPeriod="300" />
<theaterMode>
  <settings bdr="0,0,0" />
</theaterMode>
<screenSaver>
  <settings idlePeriod="0" />
  <settings monitor="1" otherMonitors="blackout" />
</screenSaver>

<!-- Background gallery -->
<element type="BackgroundAlbumCover" refreshInterval="30"></element>
<!-- <element type="Gallery" x="150" y="1" widthDock="Panel.Right" heightDock="Panel" height="-250" aspectRatio="zoomKeep" interval="60" tags="artist" ></element>-->
<element type="Gallery" x="125" y="1" widthDock="Panel.Center" heightDock="Panel" height="-225" interval="60" width="-450" aspectRatio="zoomKeep" tags="artist" bg="100,10,10,10"></element>
<!-- Lyrics -->
<element name="#RightSidebar" type="Block" xAnchor="Panel.Right" x="-425" y="1" width="425" heightDock="Panel" height="-2" bg="70,10,10,10"></element>

<!-- <element type="Text" xAnchor="Panel.Right" x="-277" y="26" width="260" font="Arial" style="Bold" size="16" fg="190,190,190" >Lyrics</element> -->

<element type="Lyrics" xAnchor="Panel.Right" x="-425" y="35" width="425" heightDock="Y:Panel.Bottom" height="-150" font="Liberation Sans" style="Regular" size="13" fg="230,230,230" fg2="255,140,0" ></element>
<element type="Time" xAnchor="Lyrics.Right" x="-170" y="5" width="170" align="Right" font="Roboto" style="Liberation Sans" size="20" fg="255,190,190,190" ></element>
  
<!-- Overlay -->
<element name="Darker" type="Block" x="1" y="1" widthDock="Panel" width="-2" heightDock="Panel" height="-2" bg="120,20,20,20"></element>

<!-- Spectrum visualisation at bottom of screen -->
<!-- element type="SpectrumVisualiser" name="Visualizer" x="50" y="-304" yAnchor="panel.center" align="middle.left" widthDock="X:Panel.Right" width="-330" height="320" min="150" fg="255,255,255,255" bdr="255,255,255,255"></element-->

<!-- Progress bar below track info -->
<element name="#BarBg" type="Block" xAnchor="Panel.Left" yAnchor="panel.bottom" x="25" y="-38" widthDock="X:Panel.Right" width="-130" height="2" bg="20,220,220,220"></element>
<element type="ProgressBar" name="#ProgressBar" xAnchor="Panel.Left" yAnchor="panel.bottom" x="50" y="-38" widthDock="X:Panel.Right" width="-130" height="2" fg="210,210,210" ></element>
<element type="ProgressPosition" xAnchor="ProgressBar.Left" x="0" yAnchor="ProgressBar.Top" y="7" widthDock="X:#BarBg.Right" width="0" align="Right" font="Roboto" style="Regular" size="12" fg="215,215,215" ></element>

<!-- Main section -->
<element name="#Cover" type="AlbumCover" x="5" yAnchor="Panel.Bottom" y="-575" width="550" height="550" min="125" max="550" brightness="1.0" ></element>


<!-- Controls below track info -->
<element type="PlayerBar" x="-1" xAnchor="AlbumCover.Left" yAnchor="#Cover.Bottom" y="0" align="left" widthDock="#Cover" width="2" height="23" bg="80,0,0,0" fg="245,245,245" fg2="200,200,200" ></element>
<!-- Queue elements -->

<element type="Field" name="#Virtual1" id="Virtual1" xAnchor="#Cover.Right" align="Left" yAnchor="Panel.Bottom" y="-220" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Sans" style="Bold" size="17" fg="220,220,220" ></element>
<element type="Field" id="Artist" xAnchor="#Cover.Right" align="Left" yAnchor="#Virtual1.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Sans" style="Regular" size="16" fg="200,200,200" ></element>
<element type="Field" id="Album"  xAnchor="#Cover.Right" align="Left" yAnchor="Artist.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Sans" style="Regular" size="16" fg="200,200,200" ></element>
<element type="Field" id="Virtual2"  xAnchor="#Cover.Right" align="Left" yAnchor="Album.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Mono" style="Regular" size="14" fg="200,200,200" ></element>
<element type="Field" id="Virtual3"  xAnchor="#Cover.Right" align="Left" yAnchor="Virtual2.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Mono" style="Regular" size="14" fg="200,200,200" ></element>
<element type="Field" id="Virtual4"  xAnchor="#Cover.Right" align="Left" yAnchor="Virtual3.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Mono" style="Regular" size="14" fg="200,200,200" ></element>
<element type="Field" id="Rating" visible="MusicBeeSetting" xAnchor="#Cover.Right" align="Left" yAnchor="Virtual4.Bottom" y="2" widthDock="X:#RightSidebar.Left" width="-2" font="Liberation Mono" style="Regular" size="16" fg="200,200,200" ></element>
<element name="QueueBG" type="Block" widthDock="Panel" bg="0,0,0,0" yAnchor="Panel.Top" height="100" min="0" max="100"></element>
<element name="#Queue" type="Text" xAnchor="Panel.Left" x="15" yAnchor="QueueBG.Top" y="15" widthDock="X:#BarBg.Right" width="0" font="Liberation Sans" align="Left" style="Regular" size="13" fg="190,190,190" >Upcoming...</element>

<element name="#Cover_1" type="AlbumCover" id="Tracks[1]" xAnchor="#B1.50" x="0" yAnchor="#B1.1" y="0" align="Top.Center" widthDock="#B1.Width.90" width="0" heightDock="#B1.Width.90" height="0" brightness="1" ></element>
<element type="Field" id="Tracks[1]" xAnchor="#BarBg.Left" x="5" yAnchor="#Queue.Bottom" y="5" widthDock="X:#BarBg.Right" width="0" font="Liberation Sans" style="Bold" size="13" fg="200,200,200" >
  <child id="Title" ></child>
  <child font="Liberation Sans" style="Regular" size="13"> • </child>
  <child font="Liberation Sans" style="Regular" size="13" id="Artist" />
  <child font="Liberation Sans" style="Regular" size="13"> • </child>
  <child font="Liberation Sans" style="Regular" size="13" fg="200,200,200" id="Duration" />
</element>

<element type="Field" id="Tracks[2]" xAnchor="#BarBg.Left" x="5" yAnchor="#Queue.Bottom" y="30" widthDock="X:#BarBg.Right" width="0" font="Liberation Sans" style="Bold" size="13" fg="200,200,200" >
  <child id="Title" ></child>
  <child font="Liberation Sans" style="Regular" size="13"> • </child>
  <child font="Liberation Sans" style="Regular" size="13" id="Artist" />
  <child font="Liberation Sans" style="Regular" size="13"> • </child>
  <child font="Liberation Sans" style="Regular" size="13" fg="200,200,200" id="Duration" />
</element>

</root>
And here's how it looks...
Last Edit: April 05, 2024, 01:00:50 PM by frankz

frankz

  • Sr. Member
  • ****
  • Posts: 3876
Here are the virtual tags:
Code
<Title>$If(<Occasion>="Explicit"," [E]",)  (<Year>)$If($Contains(<Genre>,Hit)," *",)

Code
$If($Or(<Bit Depth>>16,<Sample Rate>>44100),[<Bit Depth>/<Sample Rate>"]  ",)$IsNull(<Disambiguation>,,[<Disambiguation>"] ")$If(<Kind>="FLAC audio file","FLAC  ",)<Bitrate>  <Track Gain>  <Time>

Code
Added : <Date Added>

Code
Played:$If(<Last Played>="Unknown"," Never"," "<Last Played>" "$If(<Play Count>>0," ("<Play Count>"x)",))

hiccup

  • Sr. Member
  • ****
  • Posts: 7904
Unfortunately, it does not, although I now see the Rating stars at the top (might have been there last night and I just missed it).
For me it is working?
I haven't tried it using your virtual tag formulas, so maybe the issue lies there somehow?


frankz

  • Sr. Member
  • ****
  • Posts: 3876
Nope, that's the same result I have.  

Your Virtual Tag 1 should be above the first Tindersticks (artist line) and 2, 3 and 4 followed by the rating stars should be below the second (album line).

I tested that the virtual tags give the intended results by adding them as columns in Tracks View. 

I haven't touched either the Theater Mode or the Virtual Tags in a very very long time.
Last Edit: April 05, 2024, 03:57:04 PM by frankz

hiccup

  • Sr. Member
  • ****
  • Posts: 7904
Nope, that's the same result I have.  
Ah. I'm sorry, some braincells must have had problems connecting properly.
Should I delete that comment of mine?

frankz

  • Sr. Member
  • ****
  • Posts: 3876
Should I delete that comment of mine?
No - I think any commentary forwards the conversation.  I appreciate the other set of eyes on it in any event.

frankz

  • Sr. Member
  • ****
  • Posts: 3876
Just for a laugh I went and grabbed the mb_TheaterModePlugin.dll from the "old" 3.5 patch on the Patches site, and it works fine.  At least you can see here what I was going for.

Seems to have gone wrong sometime between last November and now.


Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1070
  • Heal The World
Most probably an inadvertent change when support for virtual 26-50 was added:
https://getmusicbee.com/forum/index.php?topic=40701.0
I already spend hours on end on social media. Might as well spare a few of those to a greater purpose here.


frankz

  • Sr. Member
  • ****
  • Posts: 3876
Works great now.  Thanks! 

At the very least, this finally got me over to 3.6.