本文整理汇总了C#中MediaPortal.Video.Database.IMDBMovie.SetDurationProperty方法的典型用法代码示例。如果您正苦于以下问题:C# IMDBMovie.SetDurationProperty方法的具体用法?C# IMDBMovie.SetDurationProperty怎么用?C# IMDBMovie.SetDurationProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.Video.Database.IMDBMovie
的用法示例。
在下文中一共展示了IMDBMovie.SetDurationProperty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnShowContextMenu
//.........这里部分代码省略.........
string message;
if (!RemovableDriveHelper.EjectDrive(item.Path, out message))
{
GUIDialogOK pDlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK);
pDlgOK.SetHeading(831);
pDlgOK.SetLine(1, GUILocalizeStrings.Get(832));
pDlgOK.SetLine(2, string.Empty);
pDlgOK.SetLine(3, message);
pDlgOK.DoModal(GUIWindowManager.ActiveWindow);
}
else
{
GUIDialogOK pDlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK);
pDlgOK.SetHeading(831);
pDlgOK.SetLine(1, GUILocalizeStrings.Get(833));
pDlgOK.DoModal(GUIWindowManager.ActiveWindow);
}
break;
case 1204: // Play all
{
if (!_virtualDirectory.RequestPin(item.Path))
{
return;
}
OnPlayAll(item.Path);
}
break;
case 1299: // Refresh current directory
{
if (facadeLayout.ListLayout.ListItems.Count > 0 && !string.IsNullOrEmpty(_currentFolder))
{
facadeLayout.SelectedListItemIndex = 0;
LoadDirectory(_currentFolder, false);
}
}
break;
case 868: // Reset V.directory
{
ResetShares();
if (_virtualDirectory.DefaultShare != null && _virtualDirectory.DefaultShare.Path != string.Empty)
{
LoadDirectory(_virtualDirectory.DefaultShare.Path, false);
}
else
{
LoadDirectory(string.Empty, false);
}
}
break;
case 1262: // Update grabber scripts
UpdateGrabberScripts(false);
break;
case 1307: // Update internal grabber scripts
UpdateGrabberScripts(true);
break;
case 1263: // Set deault grabber script
SetDefaultGrabber();
break;
case 1264: // Get media info (refresh mediainfo and duration)
if (item != null)
{
string file = item.Path;
SelectDVDHandler sdh = new SelectDVDHandler();
SelectBDHandler bdh = new SelectBDHandler();
if (sdh.IsDvdDirectory(item.Path))
{
if (File.Exists(item.Path + @"\VIDEO_TS\VIDEO_TS.IFO"))
{
file = file + @"\VIDEO_TS\VIDEO_TS.IFO";
}
}
if (bdh.IsBDDirectory(item.Path))
{
if (File.Exists(item.Path + @"\BDMV\INDEX.BDMV"))
{
file = file + @"\BDMV\INDEX.BDMV";
}
}
ArrayList files = new ArrayList();
files = AddFileToDatabase(file);
MovieDuration(files, true);
int movieId = VideoDatabase.GetMovieId(file);
IMDBMovie mInfo = new IMDBMovie();
mInfo.SetMediaInfoProperties(file, true);
mInfo.SetDurationProperty(movieId);
IMDBMovie.SetMovieData(item);
SelectCurrentItem();
}
break;
}
}
示例2: RefreshMediaInfo
private void RefreshMediaInfo(GUIListItem item)
{
if (GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.STOPPING)
{
return;
}
if (item != null)
{
string file = item.Path;
SelectDVDHandler sdh = new SelectDVDHandler();
SelectBDHandler bdh = new SelectBDHandler();
if (sdh.IsDvdDirectory(item.Path))
{
if (File.Exists(item.Path + @"\VIDEO_TS\VIDEO_TS.IFO"))
{
file = file + @"\VIDEO_TS\VIDEO_TS.IFO";
}
}
if (bdh.IsBDDirectory(item.Path))
{
if (File.Exists(item.Path + @"\BDMV\INDEX.BDMV"))
{
file = file + @"\BDMV\INDEX.BDMV";
}
}
ArrayList files = new ArrayList();
files = AddFileToDatabase(file);
MovieDuration(files, true);
int movieId = VideoDatabase.GetMovieId(file);
IMDBMovie mInfo = new IMDBMovie();
mInfo.SetMediaInfoProperties(file, true);
mInfo.SetDurationProperty(movieId);
IMDBMovie.SetMovieData(item);
GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_REFRESH_MEDIAINFO, 0, 0, 0, 0, 0, 0);
GUIWindowManager.SendMessage(msg);
}
}
示例3: RefreshMediaInfo
private void RefreshMediaInfo(GUIListItem item)
{
if (item != null)
{
string file = item.Path;
SelectDVDHandler sdh = new SelectDVDHandler();
SelectBDHandler bdh = new SelectBDHandler();
if (sdh.IsDvdDirectory(item.Path))
{
if (File.Exists(item.Path + @"\VIDEO_TS\VIDEO_TS.IFO"))
{
file = file + @"\VIDEO_TS\VIDEO_TS.IFO";
}
}
if (bdh.IsBDDirectory(item.Path))
{
if (File.Exists(item.Path + @"\BDMV\INDEX.BDMV"))
{
file = file + @"\BDMV\INDEX.BDMV";
}
}
ArrayList files = new ArrayList();
files = AddFileToDatabase(file);
MovieDuration(files, true);
int movieId = VideoDatabase.GetMovieId(file);
IMDBMovie mInfo = new IMDBMovie();
mInfo.SetMediaInfoProperties(file, true);
mInfo.SetDurationProperty(movieId);
IMDBMovie.SetMovieData(item);
SelectCurrentItem();
}
}