Skip to content

Commit

Permalink
Renamings: Recording
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheusxx committed Oct 1, 2012
1 parent 997dd72 commit 47a057f
Show file tree
Hide file tree
Showing 24 changed files with 290 additions and 290 deletions.
Expand Up @@ -152,27 +152,27 @@ private static void ComSkipLauncher_OnTvServerEvent(object sender, EventArgs eve
var recording = RecordingManagement.GetRecording(tvEvent.Recording);
if (tvEvent.EventType == TvServerEventType.RecordingStarted && _runAtStart)
{
if (recording.idChannel.HasValue)
if (recording.IdChannel.HasValue)
{
Channel channel = ChannelManagement.GetChannel(recording.idChannel.GetValueOrDefault());
Channel channel = ChannelManagement.GetChannel(recording.IdChannel.GetValueOrDefault());

string parameters = ProcessParameters(_parameters, recording.fileName, channel.DisplayName);
string parameters = ProcessParameters(_parameters, recording.FileName, channel.DisplayName);

Log.Info("ComSkipLauncher: Recording started ({0} on {1}), launching program ({2} {3}) ...",
recording.fileName, channel.DisplayName, _program, parameters);
recording.FileName, channel.DisplayName, _program, parameters);

LaunchProcess(_program, parameters, Path.GetDirectoryName(_program), ProcessWindowStyle.Hidden);
}
}
else if (tvEvent.EventType == TvServerEventType.RecordingEnded && !_runAtStart)
{
if (recording.idChannel.HasValue)
if (recording.IdChannel.HasValue)
{
Channel channel = ChannelManagement.GetChannel(recording.idChannel.GetValueOrDefault());
string parameters = ProcessParameters(_parameters, recording.fileName, channel.DisplayName);
Channel channel = ChannelManagement.GetChannel(recording.IdChannel.GetValueOrDefault());
string parameters = ProcessParameters(_parameters, recording.FileName, channel.DisplayName);

Log.Info("ComSkipLauncher: Recording ended ({0} on {1}), launching program ({2} {3}) ...",
recording.fileName, channel.DisplayName, _program, parameters);
recording.FileName, channel.DisplayName, _program, parameters);

LaunchProcess(_program, parameters, Path.GetDirectoryName(_program), ProcessWindowStyle.Hidden);
}
Expand Down
Expand Up @@ -279,7 +279,7 @@ private void btnCombine_Click(object sender, EventArgs e)
dlg.WaitForDisplay();
foreach (Recording recording in selectedChannel2.Recordings)
{
recording.idChannel = selectedChannel.IdChannel;
recording.IdChannel = selectedChannel.IdChannel;
ServiceAgents.Instance.RecordingServiceAgent.SaveRecording(recording);
}
dlg.Close();
Expand Down
30 changes: 15 additions & 15 deletions TvEngine3/Mediaportal/TV/Server/SetupTv/Sections/TvRecording.cs
Expand Up @@ -787,8 +787,8 @@ private void AddTagFiles(Dictionary<string, MatroskaTagInfo> FoundTags)
Recording currentDbRec = dbRec.Tag as Recording;
if (currentDbRec != null)
{
if (Path.GetFileNameWithoutExtension(currentDbRec.fileName) ==
Path.GetFileNameWithoutExtension(TagRec.fileName))
if (Path.GetFileNameWithoutExtension(currentDbRec.FileName) ==
Path.GetFileNameWithoutExtension(TagRec.FileName))
{
RecFileFound = true;
break;
Expand All @@ -798,9 +798,9 @@ private void AddTagFiles(Dictionary<string, MatroskaTagInfo> FoundTags)
if (!RecFileFound)
{
// only add those tags which specify a still valid filename
if (File.Exists(TagRec.fileName))
if (File.Exists(TagRec.FileName))
{
if (TagRec.idChannel == -1)
if (TagRec.IdChannel == -1)
{
TagNode.ForeColor = SystemColors.GrayText;
TagNode.Checked = false;
Expand Down Expand Up @@ -845,8 +845,8 @@ private static TreeNode BuildNodeFromRecording(Recording aRec)
{
Channel lookupChannel;
string channelName = "unknown";
string startTime = SqlDateTime.MinValue.Value == aRec.startTime ? "unknown" : aRec.startTime.ToString();
string endTime = SqlDateTime.MinValue.Value == aRec.endTime ? "unknown" : aRec.endTime.ToString();
string startTime = SqlDateTime.MinValue.Value == aRec.StartTime ? "unknown" : aRec.StartTime.ToString();
string endTime = SqlDateTime.MinValue.Value == aRec.EndTime ? "unknown" : aRec.EndTime.ToString();
try
{
lookupChannel = aRec.Channel;
Expand Down Expand Up @@ -876,10 +876,10 @@ private static TreeNode BuildNodeFromRecording(Recording aRec)

string NodeTitle;
if (startTime != "unknown" && endTime != "unknown")
NodeTitle = string.Format("Title: {0} / Channel: {1} / Time: {2}-{3}", aRec.title, channelName, startTime,
NodeTitle = string.Format("Title: {0} / Channel: {1} / Time: {2}-{3}", aRec.Title, channelName, startTime,
endTime);
else
NodeTitle = string.Format("Title: {0} / Channel: {1} / Time: {2}", aRec.title, channelName, startTime);
NodeTitle = string.Format("Title: {0} / Channel: {1} / Time: {2}", aRec.Title, channelName, startTime);

TreeNode recItem = new TreeNode(NodeTitle);
recItem.Tag = aRec;
Expand All @@ -888,7 +888,7 @@ private static TreeNode BuildNodeFromRecording(Recording aRec)
}
catch (Exception ex)
{
MessageBox.Show(string.Format("Could not build TreeNode from recording: {0}\n{1}", aRec.title, ex.Message));
MessageBox.Show(string.Format("Could not build TreeNode from recording: {0}\n{1}", aRec.Title, ex.Message));
return null;
}
}
Expand Down Expand Up @@ -952,7 +952,7 @@ private static Recording BuildRecordingFromTag(string aFileName, MatroskaTagInfo
aTag.episodeNum,
aTag.episodePart);

tagRec.mediaType = Convert.ToInt32(aTag.mediaType);
tagRec.MediaType = Convert.ToInt32(aTag.mediaType);
tagRec.Channel = channel;
}
catch (Exception ex)
Expand Down Expand Up @@ -1059,7 +1059,7 @@ private void buttonChangeChannel_Click(object sender, EventArgs e)
{
try
{
currentTagRec.idChannel = newId;
currentTagRec.IdChannel = newId;
ServiceAgents.Instance.RecordingServiceAgent.SaveRecording(currentTagRec);
}
catch (Exception ex)
Expand Down Expand Up @@ -1093,7 +1093,7 @@ private void btnImport_Click(object sender, EventArgs e)
if (tagRec.Checked) // only import the recordings which the user has selected
{
Recording currentTagRec = tagRec.Tag as Recording;
if (currentTagRec != null && currentTagRec.idChannel != -1)
if (currentTagRec != null && currentTagRec.IdChannel != -1)
{
//if (MessageBox.Show(this, string.Format("Import {0} now? \n{1}", currentTagRec.title, currentTagRec.FileName), "Recording not found in DB", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
//{
Expand Down Expand Up @@ -1126,17 +1126,17 @@ private void btnRemoveInvalidFiles_Click(object sender, EventArgs e)
Recording currentDbRec = dbRec.Tag as Recording;
if (currentDbRec != null)
{
if (!File.Exists(currentDbRec.fileName))
if (!File.Exists(currentDbRec.FileName))
{
if (
MessageBox.Show(this,
string.Format("Delete entry {0} now? \n{1}", currentDbRec.title, currentDbRec.fileName),
string.Format("Delete entry {0} now? \n{1}", currentDbRec.Title, currentDbRec.FileName),
"Recording not found on disk!", MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button2) == DialogResult.Yes)
{
try
{
ServiceAgents.Instance.RecordingServiceAgent.DeleteRecording(currentDbRec.idRecording);
ServiceAgents.Instance.RecordingServiceAgent.DeleteRecording(currentDbRec.IdRecording);
}
catch (Exception ex)
{
Expand Down
Expand Up @@ -16,22 +16,22 @@ public static class RecordingFactory
{
var recording = new Recording
{
idChannel = idChannel,
idSchedule = idSchedule,
isRecording = isRecording,
startTime = startTime,
endTime = endTime,
title = title,
description = description,
IdChannel = idChannel,
IdSchedule = idSchedule,
IsRecording = isRecording,
StartTime = startTime,
EndTime = endTime,
Title = title,
Description = description,
ProgramCategory = programCategory,
fileName = fileName,
keepUntil = keepUntil,
keepUntilDate = keepUntilDate,
timesWatched = timesWatched,
episodeName = episodeName,
seriesNum = seriesNum,
episodeNum = episodeNum,
episodePart = episodePart
FileName = fileName,
KeepUntil = keepUntil,
KeepUntilDate = keepUntilDate,
TimesWatched = timesWatched,
EpisodeName = episodeName,
SeriesNum = seriesNum,
EpisodeNum = episodeNum,
EpisodePart = episodePart

};
return recording;
Expand Down
50 changes: 25 additions & 25 deletions TvEngine3/Mediaportal/TV/Server/TVDatabase/Entities/Recording.cs
Expand Up @@ -27,7 +27,7 @@ public partial class Recording: IObjectWithChangeTracker, INotifyPropertyChanged
#region Primitive Properties

[DataMember]
public int idRecording
public int IdRecording
{
get { return _idRecording; }
set
Expand All @@ -46,7 +46,7 @@ public int idRecording
private int _idRecording;

[DataMember]
public Nullable<int> idChannel
public Nullable<int> IdChannel
{
get { return _idChannel; }
set
Expand All @@ -69,7 +69,7 @@ public Nullable<int> idChannel
private Nullable<int> _idChannel;

[DataMember]
public System.DateTime startTime
public System.DateTime StartTime
{
get { return _startTime; }
set
Expand All @@ -84,7 +84,7 @@ public System.DateTime startTime
private System.DateTime _startTime;

[DataMember]
public System.DateTime endTime
public System.DateTime EndTime
{
get { return _endTime; }
set
Expand All @@ -99,7 +99,7 @@ public System.DateTime endTime
private System.DateTime _endTime;

[DataMember]
public string title
public string Title
{
get { return _title; }
set
Expand All @@ -114,7 +114,7 @@ public string title
private string _title;

[DataMember]
public string description
public string Description
{
get { return _description; }
set
Expand All @@ -129,7 +129,7 @@ public string description
private string _description;

[DataMember]
public string fileName
public string FileName
{
get { return _fileName; }
set
Expand All @@ -144,7 +144,7 @@ public string fileName
private string _fileName;

[DataMember]
public int keepUntil
public int KeepUntil
{
get { return _keepUntil; }
set
Expand All @@ -159,7 +159,7 @@ public int keepUntil
private int _keepUntil;

[DataMember]
public Nullable<System.DateTime> keepUntilDate
public Nullable<System.DateTime> KeepUntilDate
{
get { return _keepUntilDate; }
set
Expand All @@ -174,7 +174,7 @@ public Nullable<System.DateTime> keepUntilDate
private Nullable<System.DateTime> _keepUntilDate;

[DataMember]
public int timesWatched
public int TimesWatched
{
get { return _timesWatched; }
set
Expand All @@ -189,7 +189,7 @@ public int timesWatched
private int _timesWatched;

[DataMember]
public int stopTime
public int StopTime
{
get { return _stopTime; }
set
Expand All @@ -204,7 +204,7 @@ public int stopTime
private int _stopTime;

[DataMember]
public string episodeName
public string EpisodeName
{
get { return _episodeName; }
set
Expand All @@ -219,7 +219,7 @@ public string episodeName
private string _episodeName;

[DataMember]
public string seriesNum
public string SeriesNum
{
get { return _seriesNum; }
set
Expand All @@ -234,7 +234,7 @@ public string seriesNum
private string _seriesNum;

[DataMember]
public string episodeNum
public string EpisodeNum
{
get { return _episodeNum; }
set
Expand All @@ -249,7 +249,7 @@ public string episodeNum
private string _episodeNum;

[DataMember]
public string episodePart
public string EpisodePart
{
get { return _episodePart; }
set
Expand All @@ -264,7 +264,7 @@ public string episodePart
private string _episodePart;

[DataMember]
public bool isRecording
public bool IsRecording
{
get { return _isRecording; }
set
Expand All @@ -279,7 +279,7 @@ public bool isRecording
private bool _isRecording;

[DataMember]
public Nullable<int> idSchedule
public Nullable<int> IdSchedule
{
get { return _idSchedule; }
set
Expand All @@ -302,7 +302,7 @@ public Nullable<int> idSchedule
private Nullable<int> _idSchedule;

[DataMember]
public int mediaType
public int MediaType
{
get { return _mediaType; }
set
Expand All @@ -317,7 +317,7 @@ public int mediaType
private int _mediaType;

[DataMember]
public Nullable<int> idProgramCategory
public Nullable<int> IdProgramCategory
{
get { return _idProgramCategory; }
set
Expand Down Expand Up @@ -546,11 +546,11 @@ private void FixupChannel(Channel previousValue, bool skipKeys = false)
Channel.Recordings.Add(this);
}

idChannel = Channel.IdChannel;
IdChannel = Channel.IdChannel;
}
else if (!skipKeys)
{
idChannel = null;
IdChannel = null;
}

if (ChangeTracker.ChangeTrackingEnabled)
Expand Down Expand Up @@ -590,11 +590,11 @@ private void FixupSchedule(Schedule previousValue, bool skipKeys = false)
Schedule.Recordings.Add(this);
}

idSchedule = Schedule.id_Schedule;
IdSchedule = Schedule.id_Schedule;
}
else if (!skipKeys)
{
idSchedule = null;
IdSchedule = null;
}

if (ChangeTracker.ChangeTrackingEnabled)
Expand Down Expand Up @@ -634,11 +634,11 @@ private void FixupProgramCategory(ProgramCategory previousValue, bool skipKeys =
ProgramCategory.Recordings.Add(this);
}

idProgramCategory = ProgramCategory.IdProgramCategory;
IdProgramCategory = ProgramCategory.IdProgramCategory;
}
else if (!skipKeys)
{
idProgramCategory = null;
IdProgramCategory = null;
}

if (ChangeTracker.ChangeTrackingEnabled)
Expand Down

0 comments on commit 47a057f

Please sign in to comment.