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 1
Support
Electronic Program Guide
WebEPG
XMLTV grabber for Belgium
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="Blizz" data-source="post: 13050" data-attributes="member: 12225"><p>I'll try to explain all again as I did it yesterday (no guarantee that this is the best method, but it works for 0.1.0.10), using IceFreds explanation as a base, so all credits go to him really:</p><p></p><p><u>Remarks:</u> </p><p>- I use Windows XP Pro as OS.</p><p>- <strong><python></strong> is the directory where python is installed (ie C:\Python24)</p><p>- <strong><mp></strong> is the root directory where MediaPortal is installed</p><p></p><p>- Download and install <a href="http://www.python.org/download/" target="_blank">python</a>.</p><p>- Grab the <strong>lib</strong> (0.5.1) and <strong>be_tvb</strong> (dutch) or <strong>be_tlm</strong> installers (0.5.0) <a href="http://sourceforge.net/projects/pytvgrab/" target="_blank">here</a> and install them both.</p><p></p><p>Since windows does not have an environment string called "HOME" by default which the scripts use to store the config, we'll edit the grab.py file so that it (the configfile) gets placed in a good location:</p><p>- Edit <strong><Python></strong>\Lib\site-packages\tvgrab\grab.py</p><p>- Find the line that says:</p><p> [code]fname = "%s.conf" % os.path.basename( sys.argv[ 0 ] )[/code]</p><p> (it's in the __init__ function of the Grab_C class (line 429 here)</p><p>- Replace it by:</p><p> [code]fname = '%s/%s.conf' % (os.environ['USERPROFILE'], os.path.basename(sys.argv[0]))[/code]</p><p> (this places the config in your user-profile, usually C:\Documents and Settings\<username>\tv_grab_be_t??.conf)</p><p> (I deviated from what IceFred stated because I personally don't want it in the "My Documents" folder for one, and secondly, not everybody has that folder, on a Dutch XP eg)</p><p>- Save the file.</p><p></p><p>Now we're gonna run it for the first time so it can create the configuration:</p><p>(Note: the <-[ codes are ANSI codes for color, since that doesn't work in a default XP dos box, you'll have to ignore them)</p><p>- Open a commandprompt and go to the folder <strong><Python></strong>\Scripts\</p><p>- Type in:</p><p> [code]..\Python tv_grab_be_tvb[/code] (for dutch) or</p><p> [code]..\Python tv_grab_be_tlm[/code] (for french)</p><p>- The script will show you the location for the configfile, if you are okay with it, just hit enter.</p><p>- Next, it'll show you all detected channels, one by one. Pick the ones you need. (Remember: the more you answer yes to, the longer it'll take to update the listing, but that's your choice).</p><p>- After the channel selection is done, the script starts to fetch all data, but I just Control+C it, since we don't need it yet.</p><p></p><p>Next step in the line: create the batch file that will update the tv-listing xml.</p><p>- Create a batch file in <strong><mp></strong>\xmltv (eg tvguide.bat)</p><p>- The following is the contents for it:</p><p> [code]@echo off</p><p></p><p>:start</p><p>del tvguidenew.xml 2> NUL</p><p>del tvguideold.xml 2> NUL</p><p>sleep 10</p><p><Python>\Python <Python>\Scripts\tv_grab_be_tvb --output=tvguidenew.xml --quiet</p><p>if errorlevel 10 goto start</p><p></p><p>ren tvguide.xml tvguideold.xml 2> NUL</p><p>ren tvguidenew.xml tvguide.xml 2> NUL</p><p></p><p>..\TVGuideScheduler.exe /file tvguide.xml</p><p>[/code]</p><p>-> Remember to change <Python> to the Python installation directory</p><p>-> Sleep.exe is not a default part of the Windows distribution but can be downloaded <a href="ftp://ftp.microsoft.com/Services/TechNet/samples/ps/win98/reskit/scrpting/" target="_blank">here</a> (place it in your windows directory or somehting).</p><p></p><p>If you want to see the script running for the first time, just remove the <em>--quiet</em> at the end of the grab line and save the file. The script output's all fetched data on screen and afterwards writes the tvguidenew.xml file. (it can take a while, don't be impatient!). I prefer not having to follow all the text, hence the quiet option.</p><p></p><p>If, after running the batch file, you have a tvguide.xml file in your <strong><mp></strong>\xmltv directory, all went well.</p><p></p><p>Now we only have a few simple things left to do:</p><p>- Open the MP Configuration</p><p>- Below Television\Program Guide, make sure that the xmltv directory is correct, and, on the "Sheduler"-tab, you select the "TVGuide.xml file"</p><p></p><p>Since the sheduler doesn't know about our own tvguide.bat file, we can't use the built in sheduler.</p><p>Instead go Start\All Programs\Accessoires\System Tools\Sheduled Tasks and add a sheduled task there, your tvguide.bat</p><p>You decide on the shedule. If you simply want it to run at boottime, add a shortcut to the Startup Folder, you decide.</p><p></p><p>Note:</p><p>- Reordering the channel listing? In the config-program below Television/Channels. Just use Up and Down to get the order you want. Uncheck a channel to exclude it from the guide (it will still be fetched!).</p><p></p><p>Hopefully that works for you belgian people, it does for me <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p><p></p><p><em>edit:</em> Added TVGuideScheduler call. This will update the TV Database since we arent using the MP built in schedule command (at least i'm not) <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p></blockquote><p></p>
[QUOTE="Blizz, post: 13050, member: 12225"] I'll try to explain all again as I did it yesterday (no guarantee that this is the best method, but it works for 0.1.0.10), using IceFreds explanation as a base, so all credits go to him really: [u]Remarks:[/u] - I use Windows XP Pro as OS. - [b]<python>[/b] is the directory where python is installed (ie C:\Python24) - [b]<mp>[/b] is the root directory where MediaPortal is installed - Download and install [url=http://www.python.org/download/]python[/url]. - Grab the [b]lib[/b] (0.5.1) and [b]be_tvb[/b] (dutch) or [b]be_tlm[/b] installers (0.5.0) [url=http://sourceforge.net/projects/pytvgrab/]here[/url] and install them both. Since windows does not have an environment string called "HOME" by default which the scripts use to store the config, we'll edit the grab.py file so that it (the configfile) gets placed in a good location: - Edit [b]<Python>[/b]\Lib\site-packages\tvgrab\grab.py - Find the line that says: [code]fname = "%s.conf" % os.path.basename( sys.argv[ 0 ] )[/code] (it's in the __init__ function of the Grab_C class (line 429 here) - Replace it by: [code]fname = '%s/%s.conf' % (os.environ['USERPROFILE'], os.path.basename(sys.argv[0]))[/code] (this places the config in your user-profile, usually C:\Documents and Settings\<username>\tv_grab_be_t??.conf) (I deviated from what IceFred stated because I personally don't want it in the "My Documents" folder for one, and secondly, not everybody has that folder, on a Dutch XP eg) - Save the file. Now we're gonna run it for the first time so it can create the configuration: (Note: the <-[ codes are ANSI codes for color, since that doesn't work in a default XP dos box, you'll have to ignore them) - Open a commandprompt and go to the folder [b]<Python>[/b]\Scripts\ - Type in: [code]..\Python tv_grab_be_tvb[/code] (for dutch) or [code]..\Python tv_grab_be_tlm[/code] (for french) - The script will show you the location for the configfile, if you are okay with it, just hit enter. - Next, it'll show you all detected channels, one by one. Pick the ones you need. (Remember: the more you answer yes to, the longer it'll take to update the listing, but that's your choice). - After the channel selection is done, the script starts to fetch all data, but I just Control+C it, since we don't need it yet. Next step in the line: create the batch file that will update the tv-listing xml. - Create a batch file in [b]<mp>[/b]\xmltv (eg tvguide.bat) - The following is the contents for it: [code]@echo off :start del tvguidenew.xml 2> NUL del tvguideold.xml 2> NUL sleep 10 <Python>\Python <Python>\Scripts\tv_grab_be_tvb --output=tvguidenew.xml --quiet if errorlevel 10 goto start ren tvguide.xml tvguideold.xml 2> NUL ren tvguidenew.xml tvguide.xml 2> NUL ..\TVGuideScheduler.exe /file tvguide.xml [/code] -> Remember to change <Python> to the Python installation directory -> Sleep.exe is not a default part of the Windows distribution but can be downloaded [url=ftp://ftp.microsoft.com/Services/TechNet/samples/ps/win98/reskit/scrpting/]here[/url] (place it in your windows directory or somehting). If you want to see the script running for the first time, just remove the [i]--quiet[/i] at the end of the grab line and save the file. The script output's all fetched data on screen and afterwards writes the tvguidenew.xml file. (it can take a while, don't be impatient!). I prefer not having to follow all the text, hence the quiet option. If, after running the batch file, you have a tvguide.xml file in your [b]<mp>[/b]\xmltv directory, all went well. Now we only have a few simple things left to do: - Open the MP Configuration - Below Television\Program Guide, make sure that the xmltv directory is correct, and, on the "Sheduler"-tab, you select the "TVGuide.xml file" Since the sheduler doesn't know about our own tvguide.bat file, we can't use the built in sheduler. Instead go Start\All Programs\Accessoires\System Tools\Sheduled Tasks and add a sheduled task there, your tvguide.bat You decide on the shedule. If you simply want it to run at boottime, add a shortcut to the Startup Folder, you decide. Note: - Reordering the channel listing? In the config-program below Television/Channels. Just use Up and Down to get the order you want. Uncheck a channel to exclude it from the guide (it will still be fetched!). Hopefully that works for you belgian people, it does for me ;) [i]edit:[/i] Added TVGuideScheduler call. This will update the TV Database since we arent using the MP built in schedule command (at least i'm not) ;) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Electronic Program Guide
WebEPG
XMLTV grabber for Belgium
Contact us
RSS
Top
Bottom