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 12-16-2009, 06:08 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Safe to edit UID Prefix?

Gents,

I just found a bug in an STVi that I am developing and think I know why it happened and how to solve it, but since this is new territory for me I have some questions.

To create my current STVi I exported some code from an existing STVi and then imported it into my working STV. So far so good.

When I import my current STVi and the STVi I exported the code from the new STVi ends up referencing the old code. I think this is caused because when I exported the code the UIDs remained the same so I end up having two STVi's with widgets with the same UIDs. Does this sound correct?

I think I can fix the problem by editing the UID prefix but am unsure of this is a safe practice. Will the world explode if I edit the UID prefix of the offending widgets in my new STVi? Does it matter what prefix I use or do I just make one up? The current widgets use "VBIWS".

Thanks,

Tom

Edit: The title of this thread should be "Safe to Edit" and not "Save to edit". How do I change that?
__________________

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 12-17-2009, 12:39 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
You should be able to do what you are suggesting: edit the xml file in a text editor to make the UID changes.

- 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
  #3  
Old 12-17-2009, 06:55 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Thanks Andy.
__________________

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
  #4  
Old 12-19-2009, 06:45 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
I finally got this to work but I had to edit the UID prefix for ALL of the widgets in my STVi. I have certainly learned my lesson to change the UID prefix BEFORE starting on a new project. If you do not edit the UID prefix, and Studio happens to pick a UID that is the same as the UID in another STVi, bad things happen when you try to import both STVi's.

Is this a well known fact that my feeble little brain just figured out?

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
  #5  
Old 12-19-2009, 12:29 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
The UID prefix in your properties file should be unique to each Studio installation. By default Sage assigns a new, random prefix to each new installation, so unless you've been copying properties files from one machine to another (or are extremely unlucky), you shouldn't get any UID collisions that way. You can edit this prefix if you like to make it more meaningful, so long as you're careful to keep it unique.

However it sounds like what you did was to create a new STVI by essentially cloning someone else's code, including widget UIDs. In that case, yes, Sage will get confused when it sees two copies of the same widget with the same UID. The best thing to do in this situation is to export the code you want to duplicate and then use a text editor to strip out all the existing UIDs before re-importing it, so that Sage will assign new, unique UIDs to the untagged widgets.
__________________
-- Greg
Reply With Quote
  #6  
Old 12-19-2009, 02:09 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by GKusnick View Post
However it sounds like what you did was to create a new STVI by essentially cloning someone else's code, including widget UIDs. In that case, yes, Sage will get confused when it sees two copies of the same widget with the same UID.
Yes, this is the case. I was actually cloning my own code which is why the UID prefix was not unique and collided. Now I know to change the UID prefix to something unique for each project I undertake.

I learn something new every day.
__________________

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 12-19-2009, 02:24 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by tmiranda View Post
Yes, this is the case. I was actually cloning my own code which is why the UID prefix was not unique and collided. Now I know to change the UID prefix to something unique for each project I undertake.
Cloning anybody's code will cause a collision, regardless of whether you change the prefix in the properties file. That prefix is relevant only for newly created widgets and has no effect on imported widgets that already have UID tags. Your problem is that you essentially imported the same widgets twice, and that's why you had a collision. Again, the solution to that is to strip out the UIDs from exported widgets you intend to clone, so that new UIDs get assigned on import. Messing with the UID prefix in the properties file should not be necessary for that; it's smart enough not to assign the same suffix twice.

As a side note, if you find yourself cloning code over and over again with each new project, you might want to consider extracting that commonly used code into a separate STVI that can be shared by several projects, so you don't have to keep cloning it.
__________________
-- Greg
Reply With Quote
  #8  
Old 12-19-2009, 07:43 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Understood. 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
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
Generate STVI under the STV UID file difference jphipps SageTV Studio 3 05-02-2009 11:49 AM
How safe is 33099??? Big Jeff SageTV Placeshifter 3 07-21-2007 04:12 AM
New Safe Way to Expand Storage spike5884 The SageTV Community 17 07-07-2007 03:12 PM
Safe to move recordings while Sage is running? AngelofDeth SageTV Software 2 03-13-2007 05:15 PM
Need help with Tv-out issues please (works in safe mode) jhughesjr Hardware Support 7 12-31-2004 02:39 PM


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


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