[OLD/CLOSED] PseudoTV Live - Set-Top box solution
(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 Smile (a little quick reading misunderstanding Wink )

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...
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?


Messages In This Thread
RE: [FORK] - by jcaa6479 - 2013-07-16, 23:25
Re: RE: - by bry - 2013-07-19, 08:42
Audio Muting Consistently ? - by gjwAudio - 2013-08-18, 08:25
PTVL Anomalies... - by gjwAudio - 2013-08-25, 01:15
Help Find The BAD Channel... - by gjwAudio - 2013-08-27, 02:12
RE: - by DLWhittet - 2013-10-13, 02:48
Problems with Pseudo TV Live - by media-mogul - 2013-11-07, 22:45
Setup wifi cam stream - by rebelmaveric19 - 2013-12-12, 00:54
Black Screen - by Antisthenes - 2014-03-03, 02:06
RE: [FORK] - by Lunatixz - 2014-03-25, 18:21
Re: RE: - by Lunatixz - 2014-04-26, 17:10
Update breaks autostart? - by grumpygamer - 2014-07-12, 11:48
Re: RE: Update breaks autostart? - by bry - 2014-07-12, 13:44
PseudoTV Live + HDHomerun Tutorial - by bry - 2014-07-25, 23:17
RE: [FORK] - by tromy - 2014-09-22, 19:14
Re: RE: [FORK] "PseudoTV Live" w/ LiveTV, InternetTV and added Strm Support - by Lunatixz - 2014-10-16, 21:38
Custom Live Channel - by GavinCampbell - 2014-11-01, 18:20
Options menu? - by Pendragon445 - 2014-11-02, 20:23
Prevent Stop Button - by GavinCampbell - 2014-11-13, 22:45
RE: [FORK] - by herpkektop - 2015-02-11, 11:22
RE: [FORK] - by herpkektop - 2015-02-11, 17:55
PseudoTv issue - by adamp237 - 2015-03-02, 03:41
No Guide - Android Arm - by MoRbIdBoY - 2015-03-14, 20:26
Chanel Issues - by BlueKalel - 2015-05-03, 07:23
RE: donation - by gkithes - 2015-06-11, 02:27
RE: donation - by bornagainpenguin - 2015-06-11, 03:55
Channel Sharing Feature Freezing - by RORO-RR - 2015-07-11, 18:48
Logout Mark Read Team Forum Stats Members Help
[OLD/CLOSED] PseudoTV Live - Set-Top box solution45