Problems with Export to iCal

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.

BBCode ist eingeschaltet
[img] ist eingeschaltet
[url] ist eingeschaltet
Smileys sind ausgeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Ansicht erweitern Die letzten Beiträge des Themas: Problems with Export to iCal

Re: Problems with Export to iCal

von Bananeweizen » 26 Dez 2009, 09:17

BTW: I must admit that the detection of the black and white programs is completely untested because I also couldn't find any black/white program in the channels that I used for testing. So if you find some movie which _should_ be black/white, but isn't marked as such, I would appreciate your feedback about that.

Re: Problems with Export to iCal

von jdonato » 26 Dez 2009, 03:23

Bananeweizen hat geschrieben:Color codes detection in SchedulesDirect has also been added four days ago. But it will only be noticable for black&white programs, because only those get a special icon (i.e. there is no differentiation between programs with unknow color code and programs with "color" color code).
And I also added movie detection and MPAA/TV age rating codes. You may need to enable the rating codes in the program info dialog by using the "setup" button in the lower left corner of the dialog.

Nice! I have been able to see the MPAA ratings and the little movie icons. Have not seen the color code for black&white movies yet. Got to search a little bit better, holiday reunions got me running everywhere around...

Re: Problems with Export to iCal

von Bananeweizen » 25 Dez 2009, 20:13

Color codes detection in SchedulesDirect has also been added four days ago. But it will only be noticable for black&white programs, because only those get a special icon (i.e. there is no differentiation between programs with unknow color code and programs with "color" color code).
And I also added movie detection and MPAA/TV age rating codes. You may need to enable the rating codes in the program info dialog by using the "setup" button in the lower left corner of the dialog.

Re: Problems with Export to iCal

von jdonato » 25 Dez 2009, 19:35

bodo hat geschrieben:The air-dates should be available in the new data you download. I added that to the svn version a few days ago.
WOW. I am impressed and extremely grateful!!

Merry Christmas!!

Re: Problems with Export to iCal

von bodo » 25 Dez 2009, 07:35

jdonato hat geschrieben:So now, TV-Browser is mostly perfect for me. I am only missing the ability to see the original air-date of the shows, and color-coding (new vs. reruns, movies vs. sports vs. news, etc...) :wink:
The air-dates should be available in the new data you download. I added that to the svn version a few days ago.

Re: Problems with Export to iCal

von jdonato » 25 Dez 2009, 07:01

I am happy to report that I finally built the latest version with the fix to the exporting to iCal. Everything's working great.

I would like to thank bodo for his help and work towards solving this problem. Everyone building this latest version 3.0 from svn should be able to export successfully to iCal, whether in 24 hour format or AM/PM.

Thanks bodo!!!

So now, TV-Browser is mostly perfect for me. I am only missing the ability to see the original air-date of the shows, and color-coding (new vs. reruns, movies vs. sports vs. news, etc...) :wink:

Re: Problems with Export to iCal

von bodo » 24 Dez 2009, 21:03

If the build makes problems: use the Plugin TVBConsole, it has a Window that shows you the complete Log-Output and hopefully the AppleScript-error if one occured.

Re: Problems with Export to iCal

von jdonato » 24 Dez 2009, 20:20

Hi bodo

I appreciate all your efforts. I am learning a lot and, hopefully, can contribute later.

Findings:
The script runs fine!

The build is giving me problems. I will report back....

Re: Problems with Export to iCal

von bodo » 24 Dez 2009, 16:15

As a alternative, try this script:

Code: Alles auswählen

property myTVCalendar : "TV-Browser"
on stringToList from theString for myDelimiters
	tell AppleScript
		set theSavedDelimiters to AppleScript's text item delimiters
		set text item delimiters to myDelimiters
		
		set outList to text items of theString
		set text item delimiters to theSavedDelimiters
		
		return outList
	end tell
end stringToList


on getDateForISOdate(theISODate, theISOTime)
	local myDate
	-- converts an ISO format (YYYY-MM-DD) and time to a date object
	set monthConstants to {January, February, March, April, May, June, July, August, September, October, November, December}
	
	set theISODate to (stringToList from (theISODate) for "-")
	set theISOTime to (stringToList from (theISOTime) for ":")
	
	set myDate to current date
	
	tell theISODate
		set year of myDate to item 1
		set month of myDate to item (item 2) of monthConstants
		set day of myDate to item 3
	end tell
	tell theISOTime
		set hours of myDate to item 1
		set minutes of myDate to item 2
		set seconds of myDate to 0
	end tell
	
	return myDate
end getDateForISOdate


tell application "iCal"
  if (exists (calendars whose title is myTVCalendar)) then
    set TVBrowserCalendar to first item of (calendars whose title is myTVCalendar)
  else
    set TVBrowserCalendar to make new calendar with properties {title:myTVCalendar}
  end if

  set startDate to my getDateForISOdate("2009-12-24", "16:05")
  set endDate to my getDateForISOdate("2009-12-24", "18:40")

  set props to {start date:startDate, end date:endDate, summary:"RTL - Der große Comedy Adventskalender 2009", description:"RTL - Der große Comedy Adventskalender 2009 24.12.2009 16:05-18:40    "}
  set theEvent to make new event at end of (events of TVBrowserCalendar) with properties props
  make new display alarm at beginning of theEvent with properties {trigger interval:-0}
end tell

Re: Problems with Export to iCal

von bodo » 24 Dez 2009, 16:14

Okay, i tried to fix this. If you build from svn and check it please? I hope it's working now.

Re: Problems with Export to iCal

von bodo » 24 Dez 2009, 15:36

But how do I do this? I hate AppleScript for Quirks like this :(

Re: Problems with Export to iCal

von jdonato » 24 Dez 2009, 15:20

Hi bodo

I think your script will show the answer

I tried to run it and got an error:

error "Invalid date and time date 22:10 of «script»." number -30720

iCal opened but nothing else happened...

My time formats are not 24 hour time, so I changed the script to read:

set startDate to my getDateForISOdate("2009-12-24", "8:10 PM")
set endDate to my getDateForISOdate("2009-12-24", "8:10 PM")


And it worked!!!

So I think what needs to be done is make sure the script works for 24 hour format and AM/PM format?

Re: Problems with Export to iCal

von bodo » 24 Dez 2009, 08:34

Could you try to execute this Applescript:

Code: Alles auswählen

property myTVCalendar : "TV-Browser"
on stringToList from theString for myDelimiters
	tell AppleScript
		set theSavedDelimiters to AppleScript's text item delimiters
		set text item delimiters to myDelimiters
		
		set outList to text items of theString
		set text item delimiters to theSavedDelimiters
		
		return outList
	end tell
end stringToList


on getDateForISOdate(theISODate, theISOTime)
	local myDate
	-- converts an ISO format (YYYY-MM-DD) and time to a date object
	set monthConstants to {January, February, March, April, May, June, July, August, September, October, November, December}
	
	set theISODate to (stringToList from (theISODate) for "-")
	
	set myDate to date theISOTime
	
	tell theISODate
		set year of myDate to item 1
		set month of myDate to item (item 2) of monthConstants
		set day of myDate to item 3
	end tell
	
	return myDate
end getDateForISOdate


tell application "iCal"
  if (exists (calendars whose title is myTVCalendar)) then
    set TVBrowserCalendar to first item of (calendars whose title is myTVCalendar)
  else
    set TVBrowserCalendar to make new calendar with properties {title:myTVCalendar}
  end if

  set startDate to my getDateForISOdate("2009-12-24", "22:10")
  set endDate to my getDateForISOdate("2009-12-24", "22:10")

  set props to {start date:startDate, end date:endDate, summary:"ProSieben - Constantine", description:"ProSieben - Constantine 24.12.2009 22:10-22:09  John Constantine kam mit der Gabe auf die Welt, Halbblut-Engel und –Dämonen zu sehen, die als Menschen getarnt unter uns leben. Diese Visionen trieben ihn in den Selbstmord. Doch er wurde aus der  "}
  set theEvent to make new event at end of (events of TVBrowserCalendar) with properties props
  make new display alarm at beginning of theEvent with properties {trigger interval:-0}
end tell
This should create a Calendar Entry. If not it should show you an error message. I just commited a little more Log-Info into the SVN. If you build the tvbrowser now, it will log additional informations into the log file.

Re: Problems with Export to iCal

von jdonato » 24 Dez 2009, 06:05

It does not matter what show I select. I tried multiple shows from various channels without luck.
I tried using another tv schedule program (MacProgramGuide) that sends program information to iCal and it worked, so at least I know iCal can receive.
I have MenuCalendarClock iCal installed, and I thought that maybe there was something there that was messing everything, but even quitting that application did not solve my problem. I will continue searching, as this info could be helpful to others....

Re: Problems with Export to iCal

von bodo » 23 Dez 2009, 22:39

At the moment I don't know how to help. The Plugin-Dir seems to be okay, you should not need to delete the old settings directories. Strangely I have the exact same configuration (3 instead of 2 gig of ram), but it's working perfectly here.

What show from what channel did you try? Maybee I could reproduce the problem with the same show?

Nach oben