NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) GB-PVR Support (legacy) v
« Previous 1 … 155 156 157 158 159 … 1231 Next »
Need some help with a batch file for epg updates.

 
  • 0 Vote(s) - 0 Average
Need some help with a batch file for epg updates.
JP23
Offline

Senior Member

Posts: 405
Threads: 98
Joined: Oct 2007
#1
2009-03-15, 11:59 PM
Hi,

I'm using XMLTV GUI to download epg data early every morning. I find that when I've left uTorrent running overnight XMLTV doesn't seem to connect well to the radio times website, and I often get only partial epg data.

What I would like to do is write a batch file that would do the following:

Check if uTorrent is running
If it is, stop it.
Grab epg data.
If uTorrent was running, restart it.

I'm not sure if this is even possible, let alone how to do it.
Any ideas?
JonnyCam
Offline

Posting Freak

Posts: 1,153
Threads: 87
Joined: Feb 2006
#2
2009-03-16, 12:53 AM
http://forums.techguy.org/software-devel...check.html

You could write a text file to your c: drive if utorrent was running, and then check for its existence after the EPG download, and if found, start utorrent

(something like "IF EXIST C:\TORRENT.TXT C:\PRO...\UTORRENT.EXE"

You can use taskkill.exe (from MS website) to kill utorrent.
"Shut up brain, or I'll stab you with a Q-Tip!"

--= Win7, C2D 2.93 GHz, ASUS 9400GT Silent, 2GB Ram, Few HDD's, 3TB unRAID server, Samsung 50" 1080p Plasma via HDMI, 40" 1080i LCD via VGA =-- * PVR2000 Analog PCI / Avermedia DVB-S PCI / Hauppauge 2200 DVB/Analog * PCH GBPVR Client * *BD-E6500 w/ NPVR client*
JP23
Offline

Senior Member

Posts: 405
Threads: 98
Joined: Oct 2007
#3
2009-03-16, 03:11 AM
Thanks, that link was very helpful. I used the PV.exe tool mentioned there to produce a text file with a list of all running processes.

Hopefully this will be of some use to someone who needs to do something similar. This batch file looks for uTorrent.exe, and if it's there stops it, downloads epg listings and then starts it again.
If uTorrent.exe isn't running it just downloads epg listings.
In either case it pings google to check the internet connection is up before attempting to download anything.

START pv.exe

pv>C:\processes.txt

FIND "uTorrent.exe" c:\processes.txt

IF ERRORLEVEL 1 GOTO EPG

TASKKILL /F /IM uTorrent.exe

ping http://www.google.com
IF ERRORLEVEL 1 goto END

C:\XMLTVG~1\XmltvGUI.exe /grab /d14

START C:\"Program Files"\uTorrent\uTorrent.exe

GOTO END

:EPG

ping http://www.google.com
IF ERRORLEVEL 1 goto END

C:\XMLTVG~1\XmltvGUI.exe /grab /d14

:END
dennit
Offline

Posting Freak

Posts: 788
Threads: 43
Joined: Aug 2007
#4
2009-03-16, 01:17 PM
JP23 Wrote:TASKKILL /F /IM uTorrent.exe
I've used taskkill in a few batch files, but utorrent is so disk intensive I would have been at least a bit concerned to force it down that way. Have you had any problems with utorrent while running this batch file?
JonnyCam
Offline

Posting Freak

Posts: 1,153
Threads: 87
Joined: Feb 2006
#5
2009-03-16, 07:42 PM
Yeah, I had thought about that before, but because I don't run torrents on mjy PVR, I didn't really look at it.

I know on the other PC - if it shutsdown in the middle of working, then when you restart it checks all of the data before continuing.

Is there a commandline option to close utorrent? That would be a lot better.
"Shut up brain, or I'll stab you with a Q-Tip!"

--= Win7, C2D 2.93 GHz, ASUS 9400GT Silent, 2GB Ram, Few HDD's, 3TB unRAID server, Samsung 50" 1080p Plasma via HDMI, 40" 1080i LCD via VGA =-- * PVR2000 Analog PCI / Avermedia DVB-S PCI / Hauppauge 2200 DVB/Analog * PCH GBPVR Client * *BD-E6500 w/ NPVR client*
JP23
Offline

Senior Member

Posts: 405
Threads: 98
Joined: Oct 2007
#6
2009-03-17, 12:41 AM (This post was last modified: 2009-03-17, 12:53 AM by JP23.)
dennit Wrote:I've used taskkill in a few batch files, but utorrent is so disk intensive I would have been at least a bit concerned to force it down that way. Have you had any problems with utorrent while running this batch file?

I haven't been using it for long enough to tell, but not so far. I take your point though.
I managed to find this http://www.beyondlogic.org/solutions/pro...ssutil.htm, which has an option to 'gracefully' close apps by sending a WM_CLOSE message rather than killing them outright, so I'm using that now instead of taskkill.
gEd
Offline

Posting Freak

London
Posts: 3,514
Threads: 100
Joined: Jan 2005
#7
2009-03-17, 11:01 AM
you could try tuning utorrent to use less global connections by lowering the upload speed in the speed guide. this may prevent it from overloading your pc or router.
“If this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.”
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  file types of recorded TV paul1 3 3,638 2012-09-30, 05:20 PM
Last Post: sub
  XMLTV Updates? phillyjim 1 2,671 2011-12-21, 04:46 PM
Last Post: pcostanza
  No Data In the Recorded File zb1 5 2,192 2010-08-24, 01:08 AM
Last Post: zb1
  Path to file being recorded. brianj 5 2,234 2010-08-08, 10:58 PM
Last Post: brianj
  Strange database problem -- pvrx2 not seeing updates, EWA and Config.exe are. 86atc250r 5 2,373 2010-07-26, 10:09 AM
Last Post: martint123
  error: failure playing back file yonu 4 2,001 2010-07-12, 12:52 AM
Last Post: yonu
  UK Freesat Scan.cache File jeffers 3 2,015 2010-05-25, 10:34 PM
Last Post: jeffers
  3 AC3Filter instances when playing back a still recording TS file? jksmurf 3 1,874 2010-05-17, 12:30 AM
Last Post: jksmurf
  Recording stops at 4gb file size experiencebliss 5 2,349 2010-05-04, 02:54 AM
Last Post: pBS
  Hauppage HVR-950q, no file created when recording, no pause. donbrowne 5 1,964 2010-04-08, 04:03 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode