| |||||||
| Development You want to code something for the TV-Server? Share it in here! |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| MP Donator ![]() Join Date: Jun 2007 Location: Berg, Switzerland Age: 35
Posts: 644
Thanks: 4
Thanked 41 Times in 10 Posts
Country: | Hi i have started to delvelop a plugin witch checks the recording (schedule) table and if the recording time has changed will the plugin change the schedule time to a new one. the goal is that no more recordings g to manual recordings I have now a few probs... 1. How do i am using the gentle.config to receive the connection string? 2. how do i am fire the schedule update to the TVServer, im just change the SQL table entry? the solution has a test form for testing purpose. thanks for any feedback MoPhat ![]() Last edited by MoPhat; 2008-03-21 at 21:29. |
| | |
| | #3 (permalink) |
| Portal Developer Join Date: Oct 2006 Age: 32
Posts: 1,233
Thanks: 22
Thanked 184 Times in 97 Posts
Country: | 1) Have a look at "SetupDatabaseForm.cs" and there at the function "public bool TestConnection()" starting at line 167 and "LoadConnectionDetails" but you said you intend to write a plugin (i think for TvServer) because then you don't need to bother with the connection details. TvServer establishes the connection upon starting up. You can just use the DB wrapper classes 2) Just call "RemoteControl.Instance.OnNewSchedule();". Hope this helps. I like your idea very much ![]()
__________________ ACCENT HT-100 | 2x16 VFD | ADM Athlon 64 3500+ | Win XP SP2 | SkyStar 2 DVB-S PCI | TT connect S2-3600 |
| | |
| | #4 (permalink) |
| MP Donator ![]() Join Date: Jun 2007 Location: Berg, Switzerland Age: 35
Posts: 644
Thanks: 4
Thanked 41 Times in 10 Posts
Country: | Thank you gemx I hate that if the recordings going to "manual", my wife asks me everytime: where is my recording??? In my code i have normaly sql statements like this: Code: public static void update_ScheduleEntry(cProgram schedule)
{
SqlConnection SqlCon = new SqlConnection(myConnection);
try
{
SqlCon.Open();
SqlCommand SqlCmd = new SqlCommand("UPDATE Schedule SET startTime = @startTime, endTime = @endTime WHERE id_Schedule = @id_Schedule", SqlCon);
SqlCmd.Parameters.AddWithValue("@id_Schedule", schedule.id_Schedule);
SqlCmd.Parameters.AddWithValue("@startTime", schedule.startTime);
SqlCmd.Parameters.AddWithValue("@endTime", schedule.endTime);
SqlCmd.ExecuteNonQuery();
}
catch (Exception exp)
{
Log.Error(exp.Message, new object[0]);
}
finally
{
if (SqlCon.State == ConnectionState.Open)
{
SqlCon.Close();
}
}
}
Do i get with "LoadConnectionDetails" a SqlConnection object? Can i fire at last the method RemoteControl.Instance.OnNewSchedule();" or on every table change? P.S. I have a idea for documentations: Everyone ho create/change a interface / namespace / method etc. must update/create a wiki entry for this piece of code. Without that, the code/patch etc. is not inserted in the SVN! Then we had a well docu of all this classes What do you think about that? thank you for your help MoPhat |
| | |
| | #7 (permalink) |
| Portal Member | Have you considered using TV Scheduler? Rule-based TvScheduler service It does exactly what you want, and so much more... ![]() |
| | |
![]() |
| Bookmarks |
| Tags |
| automaticly, corrector, plugin, schedule |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Set automaticly the Folder-Views | noxx2 | General Support | 1 | 2007-10-30 13:54 |
| View multi-file movies as one, and/or automaticly play all | Al_Capone | Improvement Suggestions | 4 | 2007-10-18 17:02 |
| MP is downloading album art automaticly , how do i stop it. | ohdarklord | General Support | 8 | 2007-09-28 11:21 |
| TV-Engine 0230-RC1 MP Plugin starts automaticly timeshift | grobi | Get Support | 2 | 2007-06-24 12:32 |
| How to start WebEPG automaticly? | Steffen | WebEPG | 9 | 2006-10-08 16:02 |