Quick record and advanced record dont work (1 Viewer)

adagio

Portal Pro
April 5, 2009
68
1
Home Country
United States of America United States of America
TV-Server Version: 1.0.2.22555
MediaPortal Version: 1.0.2.22555
MediaPortal Skin: standard
Windows Version: Windows XP SP3
CPU Type: Pentium Dual E2200, 2.20 ghz
HDD: ST3500418AS
Memory: 3 gig
Motherboard: Dell Vostro 220
Video Card: ATI Radeon HD3450
Video Card Driver: 8.490
Sound Card: Realtek
Sound Card AC3: no AC3
Sound Card Driver: 6.0.1.5678
1. TV Card: FusionHDTV 7 RT Gold
1. TV Card Type: DVB-T
1. TV Card Driver: 6.2.0.2
2. TV Card:
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec:
MPEG2 Audio Codec:
h.264 Video Codec:
Satelite/CableTV Provider: Time Warner cable
HTPC Case: Dell VOstro 220
Cooling:
Power Supply: Dell
Remote: none
TV: Westinghouse
TV - HTPC Connection: Composite


I can no longer manually set a recording time using either the quick record or advanced record. When I click on either of those buttons, nothing happens. It's not locked up or anything, but the wizard never shows. It use to work. I added another tuner card to the system and cleaned up some bad channels in the database recently. I don't remember the last time I used the quick record so I'm not sure when it started to fail. Setting a recording via TVGuide still works. Any thoughts?
 

adagio

Portal Pro
April 5, 2009
68
1
Home Country
United States of America United States of America
So I found this code for Quick record. Can anybody give me a hint why it might be kicking out before it gets to the end? I think has something to do with how the channel ids or groups are set up. I took out my analog group, but still no good. Thanks.

private void OnQuickRecord()
{
WeekEndTool weekEndTool = Setting.GetWeekEndTool();
GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU);
if (dlg == null)
{
return;
}
dlg.Reset();
dlg.SetHeading(GUILocalizeStrings.Get(891)); //Select TV Channel
IList<GroupMap> channels = TVHome.Navigator.CurrentGroup.ReferringGroupMap();
foreach (GroupMap chan in channels)
{
GUIListItem item = new GUIListItem(chan.ReferencedChannel().DisplayName);
string strLogo = Utils.GetCoverArt(Thumbs.TVChannel, chan.ReferencedChannel().DisplayName);
if (!File.Exists(strLogo))
{
strLogo = "defaultVideoBig.png";
}
item.ThumbnailImage = strLogo;
item.IconImageBig = strLogo;
item.IconImage = strLogo;
dlg.Add(item);
}
dlg.DoModal(GetID);
if (dlg.SelectedLabel < 0)
{
return;
}

Channel selectedChannel = (channels[dlg.SelectedLabel]).ReferencedChannel();
dlg.Reset();
dlg.SetHeading(616); //select recording type
for (int i = 611; i <= 615; ++i)
{
dlg.Add(GUILocalizeStrings.Get(i));
}
dlg.Add(GUILocalizeStrings.Get(weekEndTool.GetText(DayType.Record_WorkingDays)));
dlg.Add(GUILocalizeStrings.Get(weekEndTool.GetText(DayType.Record_WeekendDays)));

Schedule rec = new Schedule(selectedChannel.IdChannel, "", Schedule.MinSchedule, Schedule.MinSchedule);

TvBusinessLayer layer = new TvBusinessLayer();
rec.PreRecordInterval = Int32.Parse(layer.GetSetting("preRecordInterval", "5").Value);
rec.PostRecordInterval = Int32.Parse(layer.GetSetting("postRecordInterval", "5").Value);
rec.ScheduleType = (int) ScheduleRecordingType.Once;

DateTime dtNow = DateTime.Now;
int day;
day = 0;

dlg.Reset();
dlg.SetHeading(142); //select time
dlg.ShowQuickNumbers = false;
//time
//int no = 0;
int hour, minute, steps;
steps = 15;
dlg.Add("00:00");
for (hour = 0; hour <= 23; hour++)
{
for (minute = 0; minute < 60; minute += steps)
{
if (hour == 0 && minute == 0)
{
continue;
}
string time;
if (hour < 10)
{
time = "0" + hour;
}
else
{
time = hour.ToString();
}
time += ":";
if (minute < 10)
{
time = time + "0" + minute;
}
else
{
time += minute.ToString();
}

//if (hour < 1) time = String.Format("{0} {1}", minute, GUILocalizeStrings.Get(3004));
dlg.Add(time);
}
}
// pre-select the current time
dlg.SelectedLabel = (DateTime.Now.Hour*(60/steps)) + (Convert.ToInt16(DateTime.Now.Minute/steps));
dlg.DoModal(GetID);
if (dlg.SelectedLabel == -1)
{
return;
}

int mins = (dlg.SelectedLabel)*steps;
hour = (mins)/60;
minute = ((mins)%60);


dlg.Reset();
dlg.SetHeading(180); //select time
dlg.ShowQuickNumbers = false;
//duration
for (float hours = 0.5f; hours <= 24f; hours += 0.5f)
{
dlg.Add(String.Format("{0} {1}", hours.ToString("f2"), GUILocalizeStrings.Get(3002)));
}
dlg.DoModal(GetID);
if (dlg.SelectedLabel == -1)
{
return;
}
int duration = (dlg.SelectedLabel + 1)*30;


dtNow = DateTime.Now.AddDays(day);
rec.StartTime = new DateTime(dtNow.Year, dtNow.Month, dtNow.Day, hour, minute, 0, 0);
rec.EndTime = rec.StartTime.AddMinutes(duration);
rec.ProgramName = GUILocalizeStrings.Get(413) + " (" + rec.ReferencedChannel().DisplayName + ")";
rec.Persist();
TvServer server = new TvServer();
server.OnNewSchedule();
GUIWindowManager.ShowPreviousWindow();
}

I'm new to this, so I just found the logs. her's what it says when I try ti do a Quick Record -

2009-09-10 20:54:12.765625 [Info.][MPMain]: OnMessage exception:Error: UnexpectedRowCountUnclassified
Gentle.Common.GentleException: The number of returned rows 0 did not match the expected count of 1.
If concurrency control is enabled this may indicate that the record was updated or deleted by another process.
at Gentle.Common.Check.FailWith(Severity severity, Error error, Exception e, String msg)
at Gentle.Common.Check.Fail(Exception e, Error error, Object[] args)
at Gentle.Common.Check.Verify(Boolean condition, Error error, Object[] args)
at Gentle.Framework.ObjectFactory.GetInstance(Type type, SqlResult sr, Key key)
at Gentle.Framework.PersistenceBroker.RetrieveInstance(Type type, Key key, IDbConnection conn, IDbTransaction tr)
at Gentle.Framework.PersistenceBroker.RetrieveInstance[T](Key key)
at Gentle.Framework.Broker.RetrieveInstance[T](Key key)
at TvDatabase.Channel.Retrieve(Int32 id)
at TvDatabase.GroupMap.ReferencedChannel()
at TvPlugin.TvNewScheduleSearchType.OnQuickRecord()
at TvPlugin.TvNewScheduleSearchType.OnClicked(Int32 controlId, GUIControl control, ActionType actionType)
at MediaPortal.GUI.Library.GUIWindow.OnMessage(GUIMessage message)

Thanks.
 

adagio

Portal Pro
April 5, 2009
68
1
Home Country
United States of America United States of America
Found it.

If there are any channelID's referenced in the GroupMap table that don't exist in the Channel table, apparently it errors out. I cleaned out some junk channels and missed removing them from the channel map. Once I deleted those it came right up!

Back and running!!!
 

Users who are viewing this thread

Top Bottom