home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
General
Timeshifting in XMLTV
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="PN23" data-source="post: 1278275" data-attributes="member: 164523"><p>Hey [USER=166641]@Ravstar[/USER],</p><p></p><p>I'll try to help, but I have never used an enigma box personally so am unsure of exactly what the directory structure would be, but you should be able to get everything done that you need at the command line in a quick shell script which can then be scheduled to run automatically using cron.</p><p></p><p>This is how I would do it:-</p><ul> <li data-xf-list-type="ul">In the terminal, create a staging directory to work in. This only needs to be done once. <em>mkdir /media/hdd/epg/staging</em></li> <li data-xf-list-type="ul">Start your preferred text editor (vi, vim, nano etc) then add each of the following lines</li> <li data-xf-list-type="ul"><em>cp /media/hdd/epg/filename.xml.gz /media/hdd/epg/staging/filename.xml.gz </em>- This will copy the gzipped xml to the staging directory</li> <li data-xf-list-type="ul"><em>gunzip</em> <em>/media/hdd/epg/staging/filename.xml.gz</em> - This will unzip the xml file. If gunzip is not available you could use <em>gzip -d </em> <em>/media/hdd/epg/staging/filename.xml.gz </em>instead</li> <li data-xf-list-type="ul"><em>sed -i 's/+0530/+0000/g' /media/hdd/epg/staging/filename.xml</em> - This will use the SED stream editor to find every reference to +0530 and replace it with +0000 which will result in the start and end times for all programmes being timeshifted from +0530 to +0000</li> <li data-xf-list-type="ul"><em>gzip -c /media/hdd/epg/staging/filename.xml > /media/hdd/epg/staging/filename.xml.gz - </em>This will gzip the edited XML file to filename.xml.gz</li> <li data-xf-list-type="ul"><em>rm /media/hdd/epg/staging/filename.xml </em>- This will delete the temporary XML to cleanup</li> <li data-xf-list-type="ul"><em>rm /media/hdd/epg/filename.xml.gz</em> - This will delete the original XMLTV file</li> <li data-xf-list-type="ul"><em>mv /media/hdd/epg/staging/filename.xml.gz /media/hdd/epg </em>- This will move the edited and gzipped XMLTV file back to the epg directory</li> <li data-xf-list-type="ul">Save this as xmltv.sh and quit the text editor</li> <li data-xf-list-type="ul">Back at the terminal, make this shell script executable to be able to run it - <em>chmod +x /media/hdd/epg/staging.xmltv.sh</em></li> </ul><p>Once done, the shell script will be executable and can be scheduled to run as a cron job, or run at any time manually.</p><p></p><p>Before doing this though, manually run each line yourself to make sure it is working as you expect and tweak if necessary, then make those changes to the shell script and schedule it.</p></blockquote><p></p>
[QUOTE="PN23, post: 1278275, member: 164523"] Hey [USER=166641]@Ravstar[/USER], I'll try to help, but I have never used an enigma box personally so am unsure of exactly what the directory structure would be, but you should be able to get everything done that you need at the command line in a quick shell script which can then be scheduled to run automatically using cron. This is how I would do it:- [LIST] [*]In the terminal, create a staging directory to work in. This only needs to be done once. [I]mkdir /media/hdd/epg/staging[/I] [*]Start your preferred text editor (vi, vim, nano etc) then add each of the following lines [*][I]cp /media/hdd/epg/filename.xml.gz /media/hdd/epg/staging/filename.xml.gz [/I]- This will copy the gzipped xml to the staging directory [*][I]gunzip[/I] [I]/media/hdd/epg/staging/filename.xml.gz[/I] - This will unzip the xml file. If gunzip is not available you could use [I]gzip -d [/I] [I]/media/hdd/epg/staging/filename.xml.gz [/I]instead [*][I]sed -i 's/+0530/+0000/g' /media/hdd/epg/staging/filename.xml[/I] - This will use the SED stream editor to find every reference to +0530 and replace it with +0000 which will result in the start and end times for all programmes being timeshifted from +0530 to +0000 [*][I]gzip -c /media/hdd/epg/staging/filename.xml > /media/hdd/epg/staging/filename.xml.gz - [/I]This will gzip the edited XML file to filename.xml.gz [*][I]rm /media/hdd/epg/staging/filename.xml [/I]- This will delete the temporary XML to cleanup [*][I]rm /media/hdd/epg/filename.xml.gz[/I] - This will delete the original XMLTV file [*][I]mv /media/hdd/epg/staging/filename.xml.gz /media/hdd/epg [/I]- This will move the edited and gzipped XMLTV file back to the epg directory [*]Save this as xmltv.sh and quit the text editor [*]Back at the terminal, make this shell script executable to be able to run it - [I]chmod +x /media/hdd/epg/staging.xmltv.sh[/I] [/LIST] Once done, the shell script will be executable and can be scheduled to run as a cron job, or run at any time manually. Before doing this though, manually run each line yourself to make sure it is working as you expect and tweak if necessary, then make those changes to the shell script and schedule it. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
General
Timeshifting in XMLTV
Contact us
RSS
Top
Bottom