|
|
View previous topic :: View next topic |
Author |
Message |
mayco
Posts: 4
|
Posted: Sun May 28, 2006 10:20 pm Post subject: HOWTO: add MyEpisodes to google calendar |
|
|
okay, i got tired of waiting untill they created an iCal file, so i made an convertor myself...
you need an webserver with php for this to work...
Unrar the package, and open the myepisodes2ical.php file with notepad.
change the two config lines to match your information from http://www.myepisodes.com/rsshelp.php
you can see things like this:
?feed=[Feed]&uid=mayco&pwdmd5=1f15b47bf85ead05209ce3dba6ce51a7
change the lines like this (based on your link from http://www.myepisodes.com/rsshelp.php)
$config["myepisodes_username"] = "mayco";
$config["myepisodes_md5password"] = "1f15b47bf85ead05209ce3dba6ce51a7";
then upload all files to an FTP server, chmod the cache diretory to 777
now, go to google calendar, and click on manage calendars, click on "add calendar" at the bottom of the screen, take the tab Public Calendar Adress, and enter the full url to the uploaded myepisodes2ical.php file.
Click OK, and your MyEpisodes list is added to google calendar!
DOWNLOAD: http://users.skynet.be/bk333867/myepisodes2ical.rar
If you think this is to confusing, you should ask to add iCal support here: http://www.myepisodes.com/forum/viewtopic.php?t=196
mayco |
|
Back to top |
|
|
IceMan Founder
Posts: 611 Location: Denmark
|
Posted: Mon May 29, 2006 1:35 am Post subject: |
|
|
Hello mayco.
Great stuff, I got so happy when I saw it.
I just love when the comunity is helping itself.
PS. I am working on other stuff atm, but I can promise that the iCal is on my todo list.
- IceMan |
|
Back to top |
|
|
joesparano
Posts: 53
|
Posted: Fri Sep 15, 2006 5:46 pm Post subject: |
|
|
mayco,
I've been using your script for a few days now. It's truly killer. Thanks for working this up for us!
Joe |
|
Back to top |
|
|
mayco
Posts: 4
|
Posted: Fri Sep 15, 2006 6:01 pm Post subject: |
|
|
I'm glad to see somebody likes it
Enjoy! |
|
Back to top |
|
|
joesparano
Posts: 53
|
Posted: Fri Sep 15, 2006 7:01 pm Post subject: |
|
|
mayco,
Any chance the "&" in series titles can be correctly translated? My listings for "Brothers & Sisters" are displaying as "Brothers &, Sisters".
Joe |
|
Back to top |
|
|
THEMike
Posts: 10
|
Posted: Fri Sep 15, 2006 8:20 pm Post subject: |
|
|
Hmm not working right for me.
My RSS feed includes a variety of shows, my ical feed is only showing battle star gallactica s03e03 many times:
http://fuckingbrit.com/backend/episodes/myepisodes2ical.php
And that is not being listed in google calendar either |
|
Back to top |
|
|
joesparano
Posts: 53
|
|
Back to top |
|
|
THEMike
Posts: 10
|
Posted: Sat Sep 16, 2006 8:00 am Post subject: |
|
|
Code: |
$config["myepisodes_username"] = "THEMike";
$config["myepisodes_md5password"] = "monkey chum";
$config["myepisodes_url"] = "http://www.myepisodes.com/rss.php?feed=mylist&uid=%1&pwdmd5=%2";
|
And I'm 15/30. My RSS feed is fine, contains exactly the right stuff, with BSG S03E03 as the latest item in the feed, however, that's not what I get in the cal output, and google calendar throws an error importing what is in there.
My feed:
Code: |
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>THEMike List</title>
<link>http://www.myepisodes.com/</link>
<image>
<url>http://xtreme2000.dk/myepisodes/grafik/rsslogo.jpg</url>
<title>www.myepisodes.com</title>
<link>http://www.myepisodes.com/</link>
</image>
<description>www.myepisodes.com is a list of episodes and their airdates</description>
<language>en-us</language> <item>
<title>[ Prison Break ][ 2x3 ][ Scan ][ 04-Sep-2006 ]</title>
<link>http://www.tvrage.com/Prison_Break/episodes/437763/02x03</link>
<description><h3>Prison Break</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Scan</td></tr><tr><td><b>Episode #</b></td><td>2x3</td></tr><tr><td><b>Air Date:</b></td><td>04-Sep-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Prison_Breakepisode_listings.html%26season=0'>[Prison Break] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Prison_Break/episodes/437763/02x03'>[Scan] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Prison Break ][ 2x4 ][ First Down ][ 11-Sep-2006 ]</title>
<link>http://www.tvrage.com/Prison_Break/episodes/438592/02x04</link>
<description><h3>Prison Break</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>First Down</td></tr><tr><td><b>Episode #</b></td><td>2x4</td></tr><tr><td><b>Air Date:</b></td><td>11-Sep-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Prison_Breakepisode_listings.html%26season=0'>[Prison Break] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Prison_Break/episodes/438592/02x04'>[First Down] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Prison Break ][ 2x5 ][ Map 1213 ][ 18-Sep-2006 ]</title>
<link>http://www.tvrage.com/Prison_Break/episodes/438591/02x05</link>
<description><h3>Prison Break</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Map 1213</td></tr><tr><td><b>Episode #</b></td><td>2x5</td></tr><tr><td><b>Air Date:</b></td><td>18-Sep-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Prison_Breakepisode_listings.html%26season=0'>[Prison Break] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Prison_Break/episodes/438591/02x05'>[Map 1213] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ My Name Is Earl ][ 2x1 ][ Very Bad Things ][ 21-Sep-2006 ]</title>
<link>http://www.tvrage.com/My_Name_Is_Earl/episodes/404407/02x01</link>
<description><h3>My Name Is Earl</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Very Bad Things</td></tr><tr><td><b>Episode #</b></td><td>2x1</td></tr><tr><td><b>Air Date:</b></td><td>21-Sep-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/My_Name_Is_Earlepisode_listings.html%26season=0'>[My Name Is Earl] guide at www.tv.com</a><br><a href='http://www.tvrage.com/My_Name_Is_Earl/episodes/404407/02x01'>[Very Bad Things] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Desperate Housewives ][ 3x1 ][ Listen to the Rain on the Roof ][ 24-Sep-2006 ]</title>
<link>http://www.tvrage.com/Desperate_Housewives/episodes/409146/03x01</link>
<description><h3>Desperate Housewives</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Listen to the Rain on the Roof</td></tr><tr><td><b>Episode #</b></td><td>3x1</td></tr><tr><td><b>Air Date:</b></td><td>24-Sep-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Desperate_Housewivesepisode_listings.html%26season=0'>[Desperate Housewives] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Desperate_Housewives/episodes/409146/03x01'>[Listen to the Rain on the Roof] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Prison Break ][ 2x6 ][ Subdivision ][ 25-Sep-2006 ]</title>
<link>http://www.tvrage.com/Prison_Break/episodes/445117/02x06</link>
<description><h3>Prison Break</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Subdivision</td></tr><tr><td><b>Episode #</b></td><td>2x6</td></tr><tr><td><b>Air Date:</b></td><td>25-Sep-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Prison_Breakepisode_listings.html%26season=0'>[Prison Break] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Prison_Break/episodes/445117/02x06'>[Subdivision] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ My Name Is Earl ][ 2x2 ][ Jump For Joy ][ 28-Sep-2006 ]</title>
<link>http://www.tvrage.com/My_Name_Is_Earl/episodes/440887/02x02</link>
<description><h3>My Name Is Earl</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Jump For Joy</td></tr><tr><td><b>Episode #</b></td><td>2x2</td></tr><tr><td><b>Air Date:</b></td><td>28-Sep-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/My_Name_Is_Earlepisode_listings.html%26season=0'>[My Name Is Earl] guide at www.tv.com</a><br><a href='http://www.tvrage.com/My_Name_Is_Earl/episodes/440887/02x02'>[Jump For Joy] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Desperate Housewives ][ 3x2 ][ It Takes Two ][ 01-Oct-2006 ]</title>
<link>http://www.tvrage.com/Desperate_Housewives/episodes/415194/03x02</link>
<description><h3>Desperate Housewives</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>It Takes Two</td></tr><tr><td><b>Episode #</b></td><td>3x2</td></tr><tr><td><b>Air Date:</b></td><td>01-Oct-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Desperate_Housewivesepisode_listings.html%26season=0'>[Desperate Housewives] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Desperate_Housewives/episodes/415194/03x02'>[It Takes Two] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Lost ][ 3x1 ][ A Tale of Two Cities ][ 04-Oct-2006 ]</title>
<link>http://www.tvrage.com/Lost/episodes/386881/03x01</link>
<description><h3>Lost</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>A Tale of Two Cities</td></tr><tr><td><b>Episode #</b></td><td>3x1</td></tr><tr><td><b>Air Date:</b></td><td>04-Oct-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Lostepisode_listings.html%26season=0'>[Lost] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Lost/episodes/386881/03x01'>[A Tale of Two Cities] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Battlestar Galactica (2003) ][ 3x1 ][ Occupation ][ 06-Oct-2006 ]</title>
<link>http://www.tvrage.com/Battlestar_Galactica/episodes/334333/03x01</link>
<description><h3>Battlestar Galactica (2003)</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Occupation</td></tr><tr><td><b>Episode #</b></td><td>3x1</td></tr><tr><td><b>Air Date:</b></td><td>06-Oct-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Battlestar_Galacticaepisode_listings.html%26season=0'>[Battlestar Galactica (2003)] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Battlestar_Galactica/episodes/334333/03x01'>[Occupation] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Battlestar Galactica (2003) ][ 3x2 ][ Precipice ][ 06-Oct-2006 ]</title>
<link>http://www.tvrage.com/Battlestar_Galactica/episodes/368090/03x02</link>
<description><h3>Battlestar Galactica (2003)</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Precipice</td></tr><tr><td><b>Episode #</b></td><td>3x2</td></tr><tr><td><b>Air Date:</b></td><td>06-Oct-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Battlestar_Galacticaepisode_listings.html%26season=0'>[Battlestar Galactica (2003)] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Battlestar_Galactica/episodes/368090/03x02'>[Precipice] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Lost ][ 3x2 ][ Further Instructions ][ 11-Oct-2006 ]</title>
<link>http://www.tvrage.com/Lost/episodes/433593/03x02</link>
<description><h3>Lost</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Further Instructions</td></tr><tr><td><b>Episode #</b></td><td>3x2</td></tr><tr><td><b>Air Date:</b></td><td>11-Oct-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Lostepisode_listings.html%26season=0'>[Lost] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Lost/episodes/433593/03x02'>[Further Instructions] episode guide at www.tv.com</a></description>
</item> <item>
<title>[ Battlestar Galactica (2003) ][ 3x3 ][ Exodus #1 ][ 13-Oct-2006 ]</title>
<link>http://www.tvrage.com/Battlestar_Galactica/episodes/368091/03x03</link>
<description><h3>Battlestar Galactica (2003)</h3><table border='0'><tr><td><b>Episode Title: </b></td><td>Exodus #1</td></tr><tr><td><b>Episode #</b></td><td>3x3</td></tr><tr><td><b>Air Date:</b></td><td>13-Oct-2006</td></tr></table><p>Links:<br><a href='http://www.tv.com/Battlestar_Galacticaepisode_listings.html%26season=0'>[Battlestar Galactica (2003)] guide at www.tv.com</a><br><a href='http://www.tvrage.com/Battlestar_Galactica/episodes/368091/03x03'>[Exodus #1] episode guide at www.tv.com</a></description>
</item> </channel>
</rss>
|
I'm a PHP programmer myself, I wrote the syndication platform for Geeklog so I'll try and debug it myself later, I just don't have much time at the moment, was hoping there was something you could suggest.
By the way, myepisode.com RSS feeds are actually not valid |
|
Back to top |
|
|
chayner
Posts: 1
|
Posted: Wed Oct 04, 2006 5:10 am Post subject: |
|
|
THEMike :
I am having the same troubles as you -- everything is repeating itself.
Looking at the code, it seems as though something is being set as a reference when it shouldn't be...
Also, I noticed that this only works in PHP5 (for serialize())... What is the specific environment that you are using?
Any with success with this script: what environment are you using?
Thanks!
~chip |
|
Back to top |
|
|
THEMike
Posts: 10
|
Posted: Wed Oct 04, 2006 7:05 am Post subject: |
|
|
It's a one line fix to fix the repeating issue:
Around line 69 the original has:
Code: |
$ical->add_component($icalevent);
|
After that add:
Code: |
$icalevent = new iCalendar_event;
|
Which gives:
Code: |
$i = 0;
foreach($rs['items'] as $item) {
$i++;
// $item['title']
// $item['link']
// $item['description']
$title_data = parseTitle($item['title']);
$date1 = date("Ymd", strtotime($title_data[3]));
$date2 = date("Ymd", strtotime($title_data[3]." + 1 day"));
$date3 = date("Ymd\THis\Z", strtotime($title_data[3]));
// Start-end date
$icalevent->add_property('class', 'PUBLIC');
$icalevent->add_property('sequence', $i);
$icalevent->add_property('dtstart', $date1, array('value' => 'DATE'));
$icalevent->add_property('dtend', $date2, array('value' => 'DATE'));
$icalevent->add_property('dtstamp', $date3);
$icalevent->add_property('summary', $title_data[0]." ".$title_data[1]);
$icalevent->add_property('description', $title_data[2]);
$ical->add_component($icalevent);
$icalevent = new iCalendar_event;
}
echo $ical->serialize();
|
And then my feed looks ok, it has stopped repeating.
I'm reasonably sure that it's PHP5 of some flavour on my server, but I can't check right now. The serialize() in question is a member method of the ical class, not a PHP5 function, so you should be fine. |
|
Back to top |
|
|
THEMike
Posts: 10
|
Posted: Wed Oct 04, 2006 7:15 am Post subject: |
|
|
But I still get Google Calendar reporting "Failed to Import (url)" which is driving me up the wall. My calendar can be found here |
|
Back to top |
|
|
THEMike
Posts: 10
|
Posted: Wed Oct 04, 2006 7:37 am Post subject: |
|
|
Seems to be a common problem |
|
Back to top |
|
|
timepiece
Posts: 1
|
Posted: Wed Oct 04, 2006 5:08 pm Post subject: no server |
|
|
Any hope of a way to do this for people who don't have their own web server? |
|
Back to top |
|
|
clueo8
Posts: 6
|
Posted: Thu Oct 05, 2006 1:39 pm Post subject: |
|
|
I'm having an issue where google calendar does not refresh/update when I add or delete a show from my shows. I believe this is a google calendar issue and not a my episodes/php code issue. I did try deleting everything my the cache folder... that may have helped? Does this script clean out the cache folder when it is reaccessed? |
|
Back to top |
|
|
clueo8
Posts: 6
|
Posted: Wed Oct 11, 2006 12:34 pm Post subject: |
|
|
I'm also having an issue where special characters like a single quote ' is showing up as its counterpart "& # 3 9 ;" (minus the spaces) in google calendar. |
|
Back to top |
|
|
Spoonman
Posts: 2
|
Posted: Thu Oct 12, 2006 7:35 pm Post subject: Nothing for me |
|
|
Not getting anything at all. Running Apache 2.0.xx, PHP 5.04. I've setup the file correctly (as far as I can tell) by changing the username/password lines. I checked it in a browser, and going to my feed produces a feed, but using me2ic, I get nothing. A blank file. The directory me2ic lives in is chmoded to 777 as well. What should I look at first? |
|
Back to top |
|
|
Spoonman
Posts: 2
|
Posted: Thu Oct 12, 2006 7:52 pm Post subject: |
|
|
Wanna know the easiest way to find an answer? Post a question, it'll come to you right afterwards...I was poking around in the PHP script when I realized that a couple of the includes were in subdirectories. Wait, there's no subdirectories....
Hint for those who rarely use unrar: use the "x" switch, not "e". The items still aren't showing up in calendar, and I think that's because my webserver only serves on HTTPS with a CACert certificate, so Gcal might be ignoring it. Oh, well, I'll have to see if I can find some place else to put it.
From what I can see by manually running it, looks like the script works fantastically, thanks for writing it! |
|
Back to top |
|
|
revs
Posts: 1
|
Posted: Fri Nov 17, 2006 12:29 am Post subject: |
|
|
This is ace!
I dont have a php capable server, so what i did was use OS X built in webserver.
Install PHP
Start OS X webserver, and host files from http://localhost
pow! |
|
Back to top |
|
|
Massimo
Posts: 2 Location: Sk�vde / Sverige
|
Posted: Mon Dec 11, 2006 6:06 pm Post subject: |
|
|
this is a great script that you coded!
I was thinking about including it into my iScrybe calendar but for now I will stick to my OS X widget! But I think I�ll use your script, too!
Once again, great job.
EDIT:
I had to test this one It works just fine. Perhaps you should also mention that one also has to change the following line:
Code: | $config["myepisodes_url"] = "$config["myepisodes_url"] = "http://myepisodes.com/rss.php?feed=mylist&showignored=1&uid=YOURISERNAME&pwdmd5=THESENUMBERSABOVE";"; |
|
|
Back to top |
|
|
saxx
Posts: 1
|
Posted: Mon Feb 12, 2007 1:17 pm Post subject: |
|
|
I wrote pretty the same thing using ASP.NET 2.0 and C# for myself. If you want the (dirty, but short, only a few lines) code, just message me.
Anyway, I'm running the script on my server and I don't see any reason why I shouldn't share it with you guys (as long as my bandwidth can take it). So, if you don't have your own PHP webspace and want to import your episodes into Google Calendar, use this url (but change the two querystring variables):
http://www.sachsenhofer.com/stuff/myepisodestoical.aspx?uid=YOURUSER&pwdmd5=YOURMD5PWD
The script loads your RSS feed mylist and returns it in ICal format. I've tested it with Google Calender (I don't use any other ICal Application, so I don't know if it works with those).
ps: I'm not logging your users or hashed passwords, so don't worry |
|
Back to top |
|
|
leto
Posts: 1
|
Posted: Fri Mar 09, 2007 11:01 pm Post subject: |
|
|
Thank you mayco for your script and saxx for hosting it. Working like a charm!
So far this is the best solution I've found to have a nice google compatible merged feed of all tv shows. Thanks again! |
|
Back to top |
|
|
DaneeL
Posts: 1
|
Posted: Thu Apr 05, 2007 8:30 pm Post subject: |
|
|
Works great, thank you! |
|
Back to top |
|
|
tubb5
Posts: 1
|
Posted: Tue Apr 17, 2007 4:18 am Post subject: |
|
|
saxx wrote: | ...
The script loads your RSS feed mylist and returns it in ICal format. I've tested it with Google Calender (I don't use any other ICal Application, so I don't know if it works with those).
... |
works great in ical thanks saxx
though if my osx box works I will use mayco's so as not to leech ya
tubb5 |
|
Back to top |
|
|
nosnhojm
Posts: 2
|
Posted: Wed May 09, 2007 2:28 am Post subject: |
|
|
What did you ever find out about the "unable to fetch url" problem in gcal? I have the same problem, but i tried your calendar, and that seems to work, so I'm guessing you figured it out. |
|
Back to top |
|
|
Telecart
Posts: 9
|
Posted: Thu May 10, 2007 12:30 am Post subject: |
|
|
Using the .php (couldn't get the asp to work), I've recently been getting a lot of duplicates in Gcal. ANyone else notice this?
Opening the .php in a browser shows no duplicates, so it's not the code, but something google is doing I imagine.. Anyone know what can be done with it..? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
Main design by MW. Refitted to board by Hostile.
|