2014-10-16, 21:38
(2014-10-16, 21:00)peglegtv Wrote:(2014-10-16, 20:49)peppy6582 Wrote:(2014-10-16, 19:34)peglegtv Wrote: ya, last night I tested swapping out the playlist and it only works if i do a "force channel reset" which is closer but I know I can get it fully automated, so now I'm trying to figure out how to use a batch file to edit the settings.xml line
Code:<setting id="ForceChannelReset" value="false" />
to
Code:<setting id="ForceChannelReset" value="true" />
so that i don't have to remember to do the reset each time
thanks for all the help
Try this:
Code:@echo OFF
@setlocal ENABLEDELAYEDEXPANSION
set fileName=settings2.xml
if exist %fileName%.tmp del /F /Q %fileName%.tmp
for /F "delims=" %%G in (%fileName%) do (
set LINE=%%G
if not "!LINE!" == "!LINE:ForceChannelReset=!" (
set LINE=!LINE:False=True!
)
>> "%fileName%.tmp" echo !LINE!
)
del /F /Q %fileName%
ren %fileName%.tmp %fileName%
@endlocal
worked great, noticed it was set to settings2.xml had to change that to settings.xml (I just figured it out with autohotkey as well but i'll stick with batch file) heres the fixed version in case someone else wants to use it
Code:@echo OFF
@setlocal ENABLEDELAYEDEXPANSION
set fileName=settings.xml
if exist %fileName%.tmp del /F /Q %fileName%.tmp
for /F "delims=" %%G in (%fileName%) do (
set LINE=%%G
if not "!LINE!" == "!LINE:ForceChannelReset=!" (
set LINE=!LINE:False=True!
)
>> "%fileName%.tmp" echo !LINE!
)
del /F /Q %fileName%
ren %fileName%.tmp %fileName%
@endlocal
Thanks for the help
Not sure this is a good move. U r forcing a rebuild of all channels just to update one? Use the advanced rule to reset the single channel.
::Edit:: Below only serves as a warning for editing settings2.xml through non official means... not settings.xml (a little quick reading misunderstanding )
Right off the bat, hah no pun intended! I don't' support any custom programs that write to the settings2.xml!! this is one of the two most important files to PseudoTV Live... It resides in memory when PTVL is running and is extremely sensitive to unplanned change... so unless you enjoy crashes or missing channels... possibly even damaging all channels...I would absolutely not do this!
I cant' stress enough how much your not even suppose to be touching settings2.xml in the first place... but my additions are currently too complex to add through the in app manager. Which is why a windows manager is being released...