From: <nor...@us...> - 2007-06-14 16:34:41
|
Revision: 549 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=549&view=rev Author: northern_sky Date: 2007-06-14 09:34:39 -0700 (Thu, 14 Jun 2007) Log Message: ----------- small cleanup + fixed gameurl for new items too Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-14 13:04:07 UTC (rev 548) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/FileItem.cs 2007-06-14 16:34:39 UTC (rev 549) @@ -577,76 +577,59 @@ string strSQL = String.Format( @" INSERT INTO - tblFileItem ( - fileid, - appid, - title, - filename, - filepath, - imagefile, - mainGenre, - subGenre, - country, - manufacturer, - year, - rating, - overview, - system, - manualfilename, - lastTimeLaunched, - launchcount, - isfolder, - external_id, - uppertitle, - tagdata, - categorydata - ) + tblFileItem + ( + fileid, + appid, + title, + filename, + filepath, + imagefile, + mainGenre, + subGenre, + country, + manufacturer, + year, + rating, + overview, + system, + manualfilename, + lastTimeLaunched, + launchcount, + isfolder, + external_id, + uppertitle, + tagdata, + categorydata, + gameInfoUrl + ) - VALUES ( - null, - '{0}', - '{1}', - '{2}', - '{3}', - '{4}', - '{5}', - '{6}', - '{7}', - '{8}', - '{9}', - '{10}', - '{11}', - '{12}', - '{13}', - '{14}', - '{15}', - '{16}', - '{17}', - '{18}', - '{19}', - '{20}' - )", - AppID, - ProgramUtils.Encode(Title), - ProgramUtils.Encode(Filename), - ProgramUtils.Encode(Filepath), - ProgramUtils.Encode(Imagefile), - ProgramUtils.Encode(MainGenre), - ProgramUtils.Encode(SubGenre), - Country, - ProgramUtils.Encode(Manufacturer), - strYear, - Rating, - ProgramUtils.Encode(Overview), - ProgramUtils.Encode(System_), - ProgramUtils.Encode(ManualFilename), - strLastLaunch, - strLaunchCount, - ProgramUtils.BooleanToStr(IsFolder), - ExtFileID, - ProgramUtils.Encode(Title.ToUpper()), - ProgramUtils.Encode(TagData), - ProgramUtils.Encode(CategoryData)); + VALUES + ( + null, + '" + AppID + @"', + '" + ProgramUtils.Encode(Title)+ @"', + '" + ProgramUtils.Encode(Filename)+ @"', + '" + ProgramUtils.Encode(Filepath)+ @"', + '" + ProgramUtils.Encode(Imagefile)+ @"', + '" + ProgramUtils.Encode(MainGenre)+ @"', + '" + ProgramUtils.Encode(SubGenre)+ @"', + '" + Country+ @"', + '" + ProgramUtils.Encode(Manufacturer)+ @"', + '" + strYear+ @"', + '" + Rating+ @"', + '" + ProgramUtils.Encode(Overview)+ @"', + '" + ProgramUtils.Encode(System_)+ @"', + '" + ProgramUtils.Encode(ManualFilename)+ @"', + '" + strLastLaunch+ @"', + '" + strLaunchCount+ @"', + '" + ProgramUtils.BooleanToStr(IsFolder)+ @"', + '" + ExtFileID+ @"', + '" + ProgramUtils.Encode(Title.ToUpper())+ @"', + '" + ProgramUtils.Encode(TagData)+ @"', + '" + ProgramUtils.Encode(CategoryData))+ @"', + '" + ProgramUtils.Encode(GameInfoURL)+ @"' + )"; // Log.Info("dw sql\n{0}", strSQL); sqlDB.Execute(strSQL); } @@ -656,118 +639,7 @@ } } - /* private void Insert() - { - string strLastLaunch = ""; - string strLaunchCount = ""; - string strYear = ""; - if (LastTimeLaunched != DateTime.MinValue) - { - strLastLaunch = String.Format("{0}", LastTimeLaunched); - } - if (LaunchCount > 0) - { - strLaunchCount = String.Format("{0}", LaunchCount); // poor man's inttostr :-) - } - if (Year > 0) - { - strYear = String.Format("{0}", Year); - } - - try - { - string strSQL = String.Format( - @" - INSERT INTO - tblFileItem ( - fileid, - appid, - title, - filename, - filepath, - imagefile, - genre, - genre2, - genre3, - genre4, - genre5, - country, - manufacturer, - year, - rating, - overview, - system, - manualfilename, - lastTimeLaunched, - launchcount, - isfolder, - external_id, - uppertitle, - tagdata, - categorydata - ) - - VALUES ( - null, - '{0}', - '{1}', - '{2}', - '{3}', - '{4}', - '{5}', - '{6}', - '{7}', - '{8}', - '{9}', - '{10}', - '{11}', - '{12}', - '{13}', - '{14}', - '{15}', - '{16}', - '{17}', - '{18}', - '{19}', - '{20}', - '{21}', - '{22}', - '{23}' - )", - AppID, - ProgramUtils.Encode(Title), - ProgramUtils.Encode(Filename), - ProgramUtils.Encode(Filepath), - ProgramUtils.Encode(Imagefile), - ProgramUtils.Encode(Genre), - ProgramUtils.Encode(Genre2), - ProgramUtils.Encode(Genre3), - ProgramUtils.Encode(Genre4), - ProgramUtils.Encode(Genre5), - Country, - ProgramUtils.Encode(Manufacturer), - strYear, - Rating, - ProgramUtils.Encode(Overview), - ProgramUtils.Encode(System_), - ProgramUtils.Encode(ManualFilename), - strLastLaunch, - strLaunchCount, - ProgramUtils.BooleanToStr(IsFolder), - ExtFileID, - ProgramUtils.Encode(Title.ToUpper()), - ProgramUtils.Encode(TagData), - ProgramUtils.Encode(CategoryData)); - // Log.Info("dw sql\n{0}", strSQL); - sqlDB.Execute(strSQL); - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - - */ + private void Update() { string strYear = ""; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |