<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
 &lt;actionScriptProperties mainApplicationPath=&quot;AirShows.mxml&quot; version=&quot;3&quot;&gt;
-&lt;compiler additionalCompilerArguments=&quot;-locale en_US&quot; copyDependentFiles=&quot;true&quot; enableModuleDebug=&quot;true&quot; generateAccessible=&quot;false&quot; htmlExpressInstall=&quot;true&quot; htmlGenerate=&quot;false&quot; htmlHistoryManagement=&quot;false&quot; htmlPlayerVersion=&quot;9.0.28&quot; htmlPlayerVersionCheck=&quot;true&quot; outputFolderPath=&quot;bin-debug&quot; sourceFolderPath=&quot;src&quot; strict=&quot;true&quot; useApolloConfig=&quot;true&quot; verifyDigests=&quot;true&quot; warn=&quot;true&quot;&gt;
+&lt;compiler additionalCompilerArguments=&quot;-locale en_US&quot; copyDependentFiles=&quot;false&quot; enableModuleDebug=&quot;true&quot; generateAccessible=&quot;false&quot; htmlExpressInstall=&quot;true&quot; htmlGenerate=&quot;false&quot; htmlHistoryManagement=&quot;false&quot; htmlPlayerVersion=&quot;9.0.28&quot; htmlPlayerVersionCheck=&quot;true&quot; outputFolderPath=&quot;bin-debug&quot; sourceFolderPath=&quot;src&quot; strict=&quot;true&quot; useApolloConfig=&quot;true&quot; verifyDigests=&quot;true&quot; warn=&quot;true&quot;&gt;
 &lt;compilerSourcePath/&gt;
 &lt;libraryPath defaultLinkType=&quot;1&quot;&gt;
 &lt;libraryPathEntry kind=&quot;4&quot; path=&quot;&quot;/&gt;</diff>
      <filename>.actionScriptProperties</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,4 @@
 bin-debug
 bin-release
+*.air
+*.airi</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-&lt;application xmlns=&quot;http://ns.adobe.com/air/application/1.0&quot;&gt;
+&lt;application xmlns=&quot;http://ns.adobe.com/air/application/1.5&quot;&gt;
 
 &lt;!-- Adobe AIR Application Descriptor File Template.
 </diff>
      <filename>src/AirShows-app.xml</filename>
    </modified>
    <modified>
      <diff>@@ -63,6 +63,10 @@
 	
 	&lt;mx:Script&gt;
 		&lt;![CDATA[
+			import mx.events.PropertyChangeEvent;
+			import mx.events.CollectionEventKind;
+			import mx.events.CollectionEvent;
+			import com.dynamicflash.airshows.data.Show;
 			import com.adobe.growl.Notification;
 			import com.adobe.growl.Application;
 			import com.adobe.growl.GrowlService;
@@ -144,6 +148,10 @@
 				iniFile.load( File.userDirectory.resolvePath( &quot;.pytvshows.cfg&quot; ) );
 			}
 			
+			private function saveSubscriptions():void {
+				iniFile.save();				
+			}
+			
 			private function getShowsGridRowColor( show:Object, color:Number ):Number {
 				return show.subscribed ? 0xA9BD63 : color;
 			}
@@ -184,6 +192,7 @@
 				var selectStatement:SQLStatement = new SQLStatement();
 				selectStatement.sqlConnection = this.db;
 				selectStatement.text = &quot;SELECT * FROM shows;&quot;;
+				selectStatement.itemClass = Show;
 				selectStatement.execute();
 				
 				this.shows.removeAll();
@@ -198,6 +207,32 @@
 				}
 
 				this.shows.source = dataSource;
+				this.shows.addEventListener( CollectionEvent.COLLECTION_CHANGE, onShowsCollectionChange );
+			}
+			
+			private function onShowsCollectionChange( event:CollectionEvent ):void {
+				if ( event.kind === CollectionEventKind.UPDATE ) {
+					
+					for each ( var changeEvent:PropertyChangeEvent in event.items ) {
+						var show:Show = changeEvent.source as Show;
+
+						if ( show.subscribed ) {
+							this.iniFile.sections[ show.id ] = new Dictionary();
+							this.iniFile.sections[ show.id ][ 'season'] = show.lastSeason;
+							this.iniFile.sections[ show.id ][ 'episode'] = show.lastEpisode;
+							this.iniFile.sections[ show.id ][ 'title'] = show.title;
+							
+							for each ( var name:String in show.extras ) {
+								this.iniFile.sections[ show.id ][ name ] = show.extras[ name ];
+							}
+						} else {
+							delete this.iniFile.sections[ show.id ];					
+						}
+					}
+					
+					this.shows.refresh();
+					this.saveSubscriptions();
+				}
 			}
 			
 			private function onSubscriptionLoadComplete( event:Event ):void {
@@ -231,7 +266,7 @@
 				var matches:Object;
 				while( matches = showRegExp.exec( loader.data ) ) {
 					// Extract fields from regex
-					var show:Object = new Object();
+					var show:Show = new Show();
 					show.id = matches[1];
 					show.title = matches[2];
 					show.subscribed = this.iniFile.sections.hasOwnProperty( show.id );</diff>
      <filename>src/AirShows.mxml</filename>
    </modified>
    <modified>
      <diff>@@ -13,5 +13,7 @@ package com.dynamicflash.airshows.data {
 		public function Show() {
 			this.extras = new Dictionary();
 		}
+		
+		
 	}
 }
\ No newline at end of file</diff>
      <filename>src/com/dynamicflash/airshows/data/Show.as</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>88e977ad8a1bb230fca888710e360b73e33c46fe</id>
    </parent>
  </parents>
  <author>
    <name>Steve Webster</name>
    <email>spjwebster@gmail.com</email>
  </author>
  <url>http://github.com/spjwebster/airshows/commit/6bc51975d7a4d702854b89707480c73a02797a0d</url>
  <id>6bc51975d7a4d702854b89707480c73a02797a0d</id>
  <committed-date>2008-11-20T14:53:50-08:00</committed-date>
  <authored-date>2008-11-20T14:53:50-08:00</authored-date>
  <message>Subscriptions are now saved when you make changes, and the project has been updated for Air 1.5 and Flex 3.2.</message>
  <tree>d330385b78f30fec3a308c25c31eb9adb3493c9e</tree>
  <committer>
    <name>Steve Webster</name>
    <email>spjwebster@gmail.com</email>
  </committer>
</commit>
