The handy part with the Free*EPG file was they handled all the location set-up and provided a single file for download (EyeTV only accepts a single xmltv file). The other choice for downloading xmltv files was OzTiVo , but this required updating the Applescript to do all the file handling and aggregating. This turned out to be a bit of work and some of the bugs I had to fix took a week to appear which slowed things down a bit.
Version 2.0 of my xmltv Applescript can be downloaded here (168 K). I also included instructions on its set-up. Apart from choosing which channels (e.g. ABC-NSW) to download on first run, it is basically the same as for version 1.0.
UPDATE 12 Oct 2009: All the Australian free to air networks now publish up to date EPG data for about 7 days over DVB (thanks to the Anonymous comment on my original post). I highly recommend using this data instead of my Applescript (which will now no longer be updated). To change to DVB go to each channel and change EPG to DVB, then right click on the Program Guide item and select "Clear EPG Database", then right click again on Programs and select "Update DVB Program Guide".


20 comments:
Hey Ben,
It's Eli from work. My iceTV account expired and I stumbled across your script looking for a free alternative. Pretty freaky coincidence! Anyway, thanks for sharing it, it works perfectly and saved me a $100/year subscription on iceTV.
Absolutely love it!!. Very cool and comprehensive script.
Just one tiny thing that I did to make it more useful was add a line to quit EyeTV before it updates. It wasn't updating with the new xmltv file if EyeTV was open when the script ran.
Also if any users have trouble with EyeTV requiring admin permission to quit, you need to allow the user to write to the /Library/Preferences directory.
Thanks for such a useful script.
G'Day Anonymous!
Glad you like the script. I have not had the problem with EyeTV not updating when open so I never needed to add quitting.
great script. any chance you could amend it for NZ?
I have an older applescript but it doesn't work anymore for 3.1.
The NZ data is here: http://epg.pvr.geek.nz/epg/listings-freeview.xml.gz
any help greatly appreciated. Oh, and here's the old script if it helps any...
on run
--based on a script from http://flolog.de/osx/?p=39
--or you can replace this with your local xmltv provider, remember to keep in the quotes \"
set theURL to "\"http://epg.pvr.geek.nz/epg/listings-freeview.xml.gz\""
tell application "Finder" to get folder of (path to me) as Unicode text
set theDir to "\"" & POSIX path of result & "\""
set theCmd to "curl "
set theDownload to theCmd & theURL & " > " & theDir & "listings-freeview.xml.gz"
set LogMsg to "xmltv file downloaded ok"
try
do shell script theDownload
try
-- do shell script "unzip -o" & theDir & "listings-freeview.xml.gz"
do shell script "gunzip -d " & theDir & "listings-freeview.xml.gz" --& " -d " & theDir
try
do shell script "open -a EyeTV.app " & theDir & "listings-freeview.xml"
on error errTxt
set LogMsg to "Error in opening xmltv file: " & errTxt
end try
on error errTxt
set LogMsg to "Error in Unziping file: " & theDir & "listings-freeview.xml.gz" & errTxt
end try
on error errTxt
set LogMsg to "Error downloading file: " & errTxt
end try
--disable this if you do not want a logfile written
write_to_file(((the current date) as string) & ": " & LogMsg & (ASCII character 13), (path to "logs" as string) & "EyeTV xmltv Download.log", true)
end run
on write_to_file(this_data, target_file, append_data)
--from http://www.apple.com/applescript/sbrt/sbrt-09.html
try
set the target_file to the target_file as string
set the open_target_file to open for access file target_file with write permission
if append_data is false then set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
close access the open_target_file
return true
on error
try
close access file target_file
end try
return false
end try
end write_to_file
I tried your posted Applescript and it worked ok with 3.1. What error are you getting with this?
Thanks for coming up with this script. Do you know if it would work for me in the United States?
Cheers!
This script should work anywhere, provided that the xmltv site provides:
- separate files for each channel and day
- a separate channel file
- a file with the list of dates on each of the files
You should be able to modify the properties in the Applescipt to link to the correct named files. Let me know if you have any hassles with this.
Thanks so much for writing this script, it's brilliant.
There's a couple of issues I have with it at the moment:
1) it seems to take a very, very long time to run. I can live with this, but...
2) it opens script editor in the foreground (on top of EyeTV). Is there any way to make this a silent process? I'm not that great with Applescript, but I thought compiled scripts could run silently in the background.
3) Are you having any issues with the xmltv content only filling some channels for a week, but others only for that day?
When I set this up with iCal on MacOS X 10.5 the script runs without launching Script Editor.
I have found that the EPG can be lacking for some HD channels, but the regular channels are ok.
Hi, thank you so much for this script!! One issue that I am having though, I can download the scheduling fine on my laptop but it errors out on my mini for some reason. What do you think could be the problem?
Aubrey, I have no idea why it would not work on your Mac Mini. I run mine on a Mac Mini and it runs fine. You can you tell me what the error message is?
Hi Benb,
I know, it's the weirdest thing. There has to be some sort of difference for this to happen right? The error is exactly this.
"Applescript Error - Can't make some data into the expected type."
thanks for your help.
Aubrey, if the script works ok on your laptop, can you copy the entire folder (including the Applescript and all the xml files) onto the Mac Mini and see if that runs ok? Also are they running different MacOS versions?
Hi benb, I have done that a couple times before to the same results. I have 10.5.7 on both machines as well. What I have to do now is run the script on the laptop, throw the files on the mini then launch eyetv with the xml every time I want to update, not that big of a deal but it would be nice to have automated I dont have to worry about it. Puzzling
Thanks Ben, very much appreciate you making this available. Have had horrific experiences in the past with win mce and icetv - so was keen to avoid them with the new mac mini.
I also have the same issue on the Mac Mini (OSX 10.4 Tiger, EyeTv 3.01 Diversity.)
Script runs; downloads the channels manifest, allows me to select channels to write the channels_for_epg.xml file but then fails with
system events got an error:Can't make every XMl element of XML element 1 of contents of XML file "Macintosh.Applications.Applescript:datalist.xml whose name = channel" and ID = SevenHD" into type reference
any ideas?
@robot: I tried setting up new channels this morning including Seven HD (on 10.5.7) and it worked ok for me. Does this error occur if you don't select Seven HD?
Probably best to email me your channels_for_epg.xml file (email address in the Read Me.rtfd file) and I will see if I can work out what is wrong.
Thanks for posting this script
I have:
EyeTv 3.2, Mac OS X 10.6.1, EyeTV Hybrid
The error I get is "System events got an error: some data was the wrong type.
@Creative Tips: I have been unable to reproduce this error message in the past. If you are in Australia I highly recommend you use the DVB guide which is now more accurate.
Hi Ben,
Just set up my mini with EyeTV+IceTV and was disappointed to see no EPG for Win WA. Your script solved the problem.. brilliant. Thanks for making the effort and providing it to all!
Post a Comment