|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Sage.properties
What exactly is the logic behind not being able to make [live] changes to the Sage.properties while SageTV service is running?
Is it some kind of programmatic safety feature? |
#2
|
|||
|
|||
Quote:
Now you could create a plugin that would allow you to edit the memory properties from within SageTV but some of them are only read and referenced when SageTV is booted so any of those properties would not change anything even if you did write a plugin for this. So the best option is to exit SageTV and make your changes and then restart it.
__________________
"Keep your goals away from the trolls" |
#3
|
||||
|
||||
Couldn't SageTV just re-read the properties file into memory when it detects a change in the file? I was thinking the reason would be more elaborate ... or possibly, more simplistic.
|
#4
|
||||
|
||||
Technically it could be editable live, but it adds a new level of complexity to the code and it might be hard to tell what the intent is at times. There would be many problems to overcome.
The first one that comes to mind is if you make a change to the file, then SageTV makes a change, which one should persist? Would SageTV always read everything from the file directly and write out the file every time any changes happen? You can't go by the timing of the changes because after you opened the file, maybe some things changed that you were not editing, but when you saved it, you changed them back to their old values. How would SageTV know you didn't mean to do that? Another problem would be what if your editor is in the middle of writing the file out and several properties are missing at that moment. SageTV knows those values need to be in the file and would at the very least try to write them out or your configuration will not persist, but your editor is also writing the same file at the same time which will almost certainly corrupt the file. The API has methods to write to the properties in a much more controlled manner whereby intent should be much clearer to SageTV. A plugin could make indirect editing a possibility, but it's worth noting that a lot of the properties not exposed somewhere to the UI require restarting SageTV to take effect anyway.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
#5
|
||||
|
||||
As BobPhoenix suggested, I think a plugin (or web frontend) that modified the in-memory state of a property, would be the best option... but even with that, there are properties that likely only ever get read once, and changing it in memory wouldn't have any effect.
As I'm working on a new web frontend (very slowly ) have a "properties editor" in much the same way that BMT has it's properties editor, is on my list, since I hate having to shut down the server to tweak various logging settings, etc.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#6
|
||||
|
||||
Quote:
I guess that's the issue that would be most concerning. I suppose the on-the-fly changes would have to be limited to just properties that wouldn't require a restart. Might be a real challenge to determine which properties would apply. |
#7
|
|||
|
|||
Quote:
|
#8
|
||||
|
||||
In my simple non-programmer mind, it leads me to think there could be a Sage.Properties1 and a Sage.Properties2 file. The 1 file couldn't be edited on the fly as it would contain properties that would require a complete Sage restart, while the 2 file would have properties that could be altered on the fly.
Because we're here in the V9 development forum, I was thinking the interval for reading the 2 file might be altered to occur every time the 2 file experiences a change. I understand there is probably a more elegant way to achieve this, but not sure it's worth anyone's time with far more pressing issues. Just wondering I guess. |
#9
|
||||
|
||||
You need to describe WHAT you intend to be changing, because not all properties are handled the same. Changing the property in the file, or even directly in memory, may have zero effect on sage if sage is running, and changing this behavior would involve changing a LOT of the core code in sagetv, and each individual property would need to be looked at and changes made to handle that property explicitly. It's simply not worth the trouble and potential problems.
__________________
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 |
#10
|
||||
|
||||
Quote:
Phoenix, while it uses Sage.properties, actually wraps everything in it's own accessor methods. Phoenix also uses an xml configuration metadata (or java annotations) so that each property is not just a piece of text, but rather it has information like a description, data type, list of values, etc. Phoenix support allowing plugins to register event listeners on property changes. And because it's all defined in metadata, the UI in BMT for editing properties is completely dynamically generated based on the metadata for each property. it also supports property groups, so that things can be better organized, etc. My point in sharing this, is that, from day one, I found the Sage.properties to be somewhat limiting and in phoenix, it just extended the behaviour. BMT/Phoenix actually exposes some Sage properties via this mechanism (like the debug logging), but you still need to reboot for it to take effect, but, at least you can do it all remotely, and not have to manually edit the file. I don't think it's feasible to blindly edit the Sage.properties in memory, but I do think that properties can be classified and exposed via some other mechanism, like bmt, to make editing some properties more intuitive, and possibly the metadata could be extended to include a "need reboot" flag to indicate if changing a property would not take effect until a reboot happens. None of this really requires any programming, just some grunt work to find the interesting properties and add them to the Sage.xml configuration metadata.
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#11
|
|||
|
|||
Is there any documentation on what the various properties mean? I've found occasional references to certain ones, but nothing comprehensive.
__________________
Server: Windows 8.1 4gb RAM; 4TB SATA + others. Homebrew quad core AMD. Inputs: Haup. 980, 850 & 950Q on ATSC; Haup 1600 on ATSC & Comcast 2 DTAs with USBUIRT for NTSC. Haup 1800 on ATSC. HDHR Dual (ATSC). Sage 9.22 64 bit. |
#12
|
||||
|
||||
Likely not. I'd say the best bet is to search the forums for the property, and if you find nothing, then just ask question, hopefully someone knows
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#13
|
|||
|
|||
Though the more likely scenario is not knowing what the specific property is, but knowing that you want to change or fix something and don't know what property, if any, could be changed to accomplish that - at least that's the case for me! A list of properties and what they do might at least provide a clue where to look.
__________________
Server: Windows 8.1 4gb RAM; 4TB SATA + others. Homebrew quad core AMD. Inputs: Haup. 980, 850 & 950Q on ATSC; Haup 1600 on ATSC & Comcast 2 DTAs with USBUIRT for NTSC. Haup 1800 on ATSC. HDHR Dual (ATSC). Sage 9.22 64 bit. |
#14
|
||||
|
||||
Quote:
The first one is one that I have run into with my own software. I typed up notes about most of the properties in the program, but over time some of those have changed or been moved. I then have a problem where the notes now mention things like if you have this version, you'll see this or that version you'll see something else. I moved to making the properties described through a JSON accessed interface that has yet to actually be used because it is easier than trying to maintain some notes that will inevitably be inaccurate if I forgot to to update them. Basically sometimes properties are no longer used or have changed a little in meaning and having a document can actually make things even more confusing. The second problem is that even when properties are described, many of them are still kind of unclear without having some understanding about the code path they modify or greater understand of the bigger picture and the role of the property, so even with a very good description you might still not know if it will help you or not. Also, some properties should never be changed by hand. The third problem is kind of started by the second problem. There are so many properties you are more likely to try to search the list by key words and might never find the one that will help you out most because you don't know what the problem you're seeing is generally called which will lead back to posting in the forums and someone suggesting that you try changing a specific property somewhat negating that we have a list.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
#15
|
|||
|
|||
Quote:
Quote:
So does anyone know what seeker/disable_video_directory_verifications does, and if it would help me? Or is there another setting I should have found? (It looks just dangerous enough that I'd rather not turn it on to test.) |
#16
|
|||
|
|||
Quote:
https://github.com/google/sagetv/blo...va#L3112-L3126 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sage.Properties = SageClient.Properties? | PeteCress | SageTV Software | 10 | 01-11-2011 12:32 PM |
Difference between SageClient.properties and Sage.properties? | morfinx | SageTV Software | 1 | 12-30-2006 09:01 AM |
Sage properties | bobrap | SageTV Software | 5 | 05-22-2006 02:09 PM |
When are the Win.bin, Win.bak, Sage.properties, and Sage.properties.autobackup saved? | zubblwump | SageTV Software | 3 | 01-16-2005 08:54 AM |
BUG: Recursive Video/Library Directory set up crashes sage (sage.properties) | wayne | SageTV Software | 0 | 07-11-2003 12:59 PM |