SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-14-2010, 03:34 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Two plugins editing the same widget

How can two plugins edit the same widget? In the default STV there is a conditional widget that determines if a panel in the header will be displayed. The widget looks like this:

Code:
if (NTEState != null) || (!GetProperty("jusjoken/video_lib_include_watched_videos", true)) || (AlertLevel > 0) || IsDoingLibraryImportScan() || (Size(GetCurrentlyRecordingMediaFiles()) > 0) || (Size(GetAiringsThatWontBeRecorded(false)) > 0) || (GetProperty("show_mouse_icons", true) && IsDesktopUI())
A panel widget is the child of this conditional widget.

One of my plugins and another plugin both need to add to the expression. The problem seems to be that the last plugin that is installed (in this case the CVF plugin by jusjoken) removes the expression inserted by the first plugin (mine).

So how can the second plugin add to the expression without removing what the first put in?

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #2  
Old 10-14-2010, 03:38 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
I don't believe there's a clean way to do it. The 'correct' way would be for each to add their own conditional and if they need to display the panel, the 'true' branch would point to a reference of the panel. That way, either would be able to 'get-r-done'. This works for an 'OR' type situation, where any of the multiple items can cause the panel to display. Now, on the other hand, if you need AND capabilities, it'd be more difficult.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #3  
Old 10-14-2010, 07:52 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Yeah i would just add another true branch and then my condition.
Reply With Quote
  #4  
Old 10-15-2010, 05:24 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Two approaches to consider, thanks.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #5  
Old 10-18-2010, 12:33 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
When you run into things like this, let me know.

I made a to-do item for v7.1 (no more v7.0 STV changes unless they are really needed) to add some code that will allow multiple customizations to add their own icons to the header w/o having to modify that conditional. It will probably be a LayoutStarted hook w/a variable like AddCustomHeaderIcon initially set to false & then any customizations could add a child to that widget changing it to true... I think that would solve it.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #6  
Old 10-18-2010, 12:57 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Andy,

That sounds like it will work well. I'll hold off making any changes until you implement that. Let me know if you need any help testing because I have several plugins that will need to be modified to take advantage of the change.

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #7  
Old 10-18-2010, 02:07 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 2,009
I posted a similar thread a while back.

Basically, the only other solution was to not use the built-in STVi generator from Studio, but instead build your import mostly-manually using the Studio Tools plugin. Then you could put code in the import to check for the existence of the other plug-in. You would still have to be sure that your "smarter" plug-in gets installed last.
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
Reply With Quote
  #8  
Old 10-18-2010, 02:31 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Tiki: If that is still an issue, send me a PM with the menu in question so I have an email & can look into a possible STV change later on.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #9  
Old 12-01-2010, 10:15 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by tmiranda View Post
That sounds like it will work well. I'll hold off making any changes until you implement that. Let me know if you need any help testing because I have several plugins that will need to be modified to take advantage of the change.
Please check out the STV change to support this in the v7.0.23.1, 2010120101, STV update and let me know if there are issues with this change.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do plugins get into the list of plugins? michaeldjcox SageTV v7 Customizations 4 06-12-2010 03:05 AM
How to use Video Widget cracklepopflash SageTV Studio 5 08-21-2009 03:24 PM
Weather Widget sam.griffin.bht SageTV Studio 3 06-09-2009 11:30 AM
Scaling Text widget size within image widget area Morgan111 SageTV Studio 2 12-04-2006 02:16 PM


All times are GMT -6. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.