Skip to content
Browse files

Merge remote-tracking branch 'remotes/origin/BUG-4110-playing_videos_…

…inside_pictures_section_is_not_working_well'
  • Loading branch information...
2 parents 4fc13e8 + 03995a3 commit b0a6a7d9086f26e30f61edbb002e4e8bba08f519 @Sebastiii Sebastiii committed Dec 28, 2012
View
17 mediaportal/Configuration/Sections/Pictures.cs
@@ -80,7 +80,8 @@ public override void LoadSettings()
checkBoxGroupDays.Checked = xmlreader.GetValueAsBool("pictures", "useDayGrouping", false);
checkBoxEnableVideo.Checked = xmlreader.GetValueAsBool("pictures", "enableVideoPlayback", false);
- checkBoxPlayVideosInSlideshow.Checked = xmlreader.GetValueAsBool("pictures", "playVideosInSlideshows", false);
+ checkBoxPlayVideosInSlideshow.Checked = xmlreader.GetValueAsBool("pictures", "playVideosInSlideshows", false);
+ UpdateVideoSettings();
}
}
@@ -411,11 +412,19 @@ private void InitializeComponent()
this.ResumeLayout(false);
}
- #endregion
+ #endregion
+
+ /// <summary>
+ /// sets useability of select video config depending
+ /// </summary>
+ public void UpdateVideoSettings()
+ {
+ checkBoxPlayVideosInSlideshow.Enabled = (checkBoxEnableVideo.Checked);
+ }
private void checkBoxEnableVideo_CheckedChanged(object sender, EventArgs e)
- {
- checkBoxPlayVideosInSlideshow.Enabled = (checkBoxEnableVideo.Checked);
+ {
+ UpdateVideoSettings();
}
}
}
View
32 mediaportal/Core/PlayList/PlayListPlayer.cs
@@ -16,8 +16,9 @@
// You should have received a copy of the GNU General Public License
// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>.
-#endregion
-
+#endregion
+
+using System;
using MediaPortal.GUI.Library;
namespace MediaPortal.Playlists
@@ -187,16 +188,23 @@ public void OnMessage(GUIMessage message)
switch (message.Message)
{
case GUIMessage.MessageType.GUI_MSG_PLAYBACK_STOPPED:
- {
- PlayListItem item = GetCurrentItem();
- if (item != null)
- {
- if (item.Type != PlayListItem.PlayListItemType.AudioStream)
- {
- Reset();
- _currentPlayList = PlayListType.PLAYLIST_NONE;
- }
- }
+ {
+ PlayListItem item = GetCurrentItem();
+ if (item != null)
+ {
+ if (item.Type != PlayListItem.PlayListItemType.AudioStream)
+ {
+ if (!Player.g_Player.IsPicturePlaylist)
+ {
+ Reset();
+ _currentPlayList = PlayListType.PLAYLIST_NONE;
+ }
+ else
+ {
+ Player.g_Player.IsPicturePlaylist = false;
+ }
+ }
+ }
GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS, 0, 0, 0, -1, 0, null);
GUIGraphicsContext.SendMessage(msg);
}
View
40 mediaportal/Core/Player/g_player.cs
@@ -91,6 +91,8 @@ public enum DriveType
private static bool driveSpeedReduced = false;
private static bool driveSpeedControlEnabled = false;
private static string _currentTitle = ""; //actual program metadata - usefull for tv - avoids extra DB lookups
+ private static bool _pictureSlideShow = false;
+ private static bool _picturePlaylist = false;
private static string _currentDescription = "";
//actual program metadata - usefull for tv - avoids extra DB Lookups.
@@ -1237,18 +1239,18 @@ public static bool Play(string strFile)
public static bool Play(string strFile, MediaType type)
{
- return Play(strFile, type, (TextReader)null);
+ return Play(strFile, type, (TextReader)null, false);
}
public static bool Play(string strFile, MediaType type, string chapters)
{
using (var stream = String.IsNullOrEmpty(chapters) ? null : new StringReader(chapters))
{
- return Play(strFile, type, stream);
+ return Play(strFile, type, stream, false);
}
}
- public static bool Play(string strFile, MediaType type, TextReader chapters)
+ public static bool Play(string strFile, MediaType type, TextReader chapters, bool fromPictures)
{
try
{
@@ -1258,6 +1260,7 @@ public static bool Play(string strFile, MediaType type, TextReader chapters)
return false;
}
+ IsPicture = false;
bool playingRemoteUrl = Util.Utils.IsRemoteUrl(strFile);
string extension = Util.Utils.GetFileExtension(strFile).ToLower();
bool isImageFile = !playingRemoteUrl && Util.VirtualDirectory.IsImageFile(extension);
@@ -1440,6 +1443,13 @@ public static bool Play(string strFile, MediaType type, TextReader chapters)
}
OnStarted();
}
+
+ // Set bool to know if video if played from MyPictures
+ if (fromPictures)
+ {
+ IsPicture = true;
+ }
+
return bResult;
}
}
@@ -1487,6 +1497,30 @@ public static bool IsMusic
}
}
+ public static bool IsPicture
+ {
+ get
+ {
+ return _pictureSlideShow;
+ }
+ set
+ {
+ _pictureSlideShow = value;
+ }
+ }
+
+ public static bool IsPicturePlaylist
+ {
+ get
+ {
+ return _picturePlaylist;
+ }
+ set
+ {
+ _picturePlaylist = value;
+ }
+ }
+
public static bool Playing
{
get
View
6 mediaportal/Core/Util/Util.cs
@@ -640,7 +640,8 @@ public static void SetThumbnails(ref GUIListItem item)
{
if (item == null || String.IsNullOrEmpty(item.Path))
{
- Log.Debug("SetThumbnails: nothing to do.");
+ //Disable verbose logging
+ //Log.Debug("SetThumbnails: nothing to do.");
return;
}
@@ -650,7 +651,8 @@ public static void SetThumbnails(ref GUIListItem item)
{
if (!IsVideo(item.Path))
{
- Log.Debug("SetThumbnails: nothing to do.");
+ //Disable verbose logging
+ //Log.Debug("SetThumbnails: nothing to do.");
return;
}
View
27 mediaportal/Databases/Pictures/ADO/PictureDatabaseADO.cs
@@ -22,7 +22,8 @@
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
-using System.Globalization;
+using System.Globalization;
+using System.IO;
using MediaPortal.Configuration;
using MediaPortal.Database;
using MediaPortal.GUI.Library;
@@ -69,7 +70,11 @@ public void Dispose()
}
public int AddPicture(string strPicture, int iRotation)
- {
+ {
+ // Continue only if it's a picture files
+ if (!Util.Utils.IsPicture(strPicture))
+ return -1;
+
if (strPicture == null)
{
return -1;
@@ -133,7 +138,11 @@ public int AddPicture(string strPicture, int iRotation)
}
public void DeletePicture(string strPicture)
- {
+ {
+ // Continue only if it's a picture files
+ if (!Util.Utils.IsPicture(strPicture))
+ return;
+
string strSQL = "";
try
{
@@ -150,7 +159,11 @@ public void DeletePicture(string strPicture)
}
public int GetRotation(string strPicture)
- {
+ {
+ // Continue only if it's a picture files
+ if (!Util.Utils.IsPicture(strPicture))
+ return -1;
+
string strSQL = "";
try
{
@@ -190,7 +203,11 @@ public int GetRotation(string strPicture)
}
public void SetRotation(string strPicture, int iRotation)
- {
+ {
+ // Continue only if it's a picture files
+ if (!Util.Utils.IsPicture(strPicture))
+ return;
+
string strSQL = "";
try
{
View
30 mediaportal/Databases/Pictures/SqlLite/PictureDatabaseSqlLite.cs
@@ -112,7 +112,11 @@ private bool CreateTables()
[MethodImpl(MethodImplOptions.Synchronized)]
public int AddPicture(string strPicture, int iRotation)
- {
+ {
+ // Continue only if it's a picture files
+ if (!Util.Utils.IsPicture(strPicture))
+ return -1;
+
if (String.IsNullOrEmpty(strPicture))
{
return -1;
@@ -203,7 +207,11 @@ public int AddPicture(string strPicture, int iRotation)
}
private bool GetExifDetails(string strPicture, ref int iRotation, ref string strDateTaken)
- {
+ {
+ // Continue only if it's a picture files
+ if (!Util.Utils.IsPicture(strPicture))
+ return false;
+
using (ExifMetadata extractor = new ExifMetadata())
{
ExifMetadata.Metadata metaData = extractor.GetExifMetadata(strPicture);
@@ -280,7 +288,11 @@ private bool GetPicasaRotation(string strPic, ref int iRotation)
public void DeletePicture(string strPicture)
{
lock (typeof (PictureDatabase))
- {
+ {
+ // Continue only if it's a picture files
+ if (!Util.Utils.IsPicture(strPicture))
+ return;
+
if (m_db == null)
{
return;
@@ -306,7 +318,11 @@ public void DeletePicture(string strPicture)
[MethodImpl(MethodImplOptions.Synchronized)]
public int GetRotation(string strPicture)
- {
+ {
+ // Continue only if it's a picture files
+ if (!Util.Utils.IsPicture(strPicture))
+ return -1;
+
if (m_db == null)
{
return -1;
@@ -339,7 +355,11 @@ public int GetRotation(string strPicture)
[MethodImpl(MethodImplOptions.Synchronized)]
public void SetRotation(string strPicture, int iRotation)
- {
+ {
+ // Continue only if it's a picture files
+ if (!Util.Utils.IsPicture(strPicture))
+ return;
+
if (m_db == null)
{
return;
View
72 mediaportal/MediaPortal.Application/MediaPortal.cs
@@ -40,7 +40,8 @@
using MediaPortal.Configuration;
using MediaPortal.Database;
using MediaPortal.Dialogs;
-using MediaPortal.GUI.Library;
+using MediaPortal.GUI.Library;
+using MediaPortal.GUI.Pictures;
using MediaPortal.InputDevices;
using MediaPortal.IR;
using MediaPortal.Player;
@@ -2480,7 +2481,13 @@ private void OnAction(Action action)
}
}
homeMsg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_GOTO_WINDOW, 0, 0, 0, (int)newHome, 0, null);
- GUIWindowManager.SendThreadMessage(homeMsg);
+ GUIWindowManager.SendThreadMessage(homeMsg);
+ // Stop Video for MyPictures when going to home
+ if (g_Player.IsPicture)
+ {
+ GUISlideShow._slideDirection = 0;
+ g_Player.Stop();
+ }
return;
case Action.ActionType.ACTION_MPRESTORE:
@@ -2701,11 +2708,20 @@ private void OnAction(Action action)
action = new Action(Action.ActionType.ACTION_PREV_CHAPTER, 0, 0);
g_Player.OnAction(action);
return;
- }
-
+ }
+ //When MyPictures Plugin shows the pictures/videos we don't want to change music track
if (!ActionTranslator.HasKeyMapped(GUIWindowManager.ActiveWindowEx, action.m_key))
- {
- playlistPlayer.PlayPrevious();
+ {
+ if (
+ (GUIWindow.Window)(Enum.Parse(typeof(GUIWindow.Window), GUIWindowManager.ActiveWindow.ToString())) ==
+ GUIWindow.Window.WINDOW_SLIDESHOW || g_Player.IsPicture)
+ {
+ break;
+ }
+ else
+ {
+ playlistPlayer.PlayPrevious();
+ }
}
break;
@@ -2718,11 +2734,20 @@ private void OnAction(Action action)
action = new Action(Action.ActionType.ACTION_NEXT_CHAPTER, 0, 0);
g_Player.OnAction(action);
return;
- }
-
+ }
+ //When MyPictures Plugin shows the pictures/videos we don't want to change music track
if (!ActionTranslator.HasKeyMapped(GUIWindowManager.ActiveWindowEx, action.m_key))
- {
- playlistPlayer.PlayNext();
+ {
+ if (
+ (GUIWindow.Window)(Enum.Parse(typeof(GUIWindow.Window), GUIWindowManager.ActiveWindow.ToString())) ==
+ GUIWindow.Window.WINDOW_SLIDESHOW || g_Player.IsPicture)
+ {
+ break;
+ }
+ else
+ {
+ playlistPlayer.PlayNext();
+ }
}
break;
@@ -2735,14 +2760,25 @@ private void OnAction(Action action)
GUIWindow.Window.WINDOW_SLIDESHOW)
{
break;
- }
-
- if (!g_Player.IsTV || !GUIGraphicsContext.IsFullScreenVideo)
- {
- Log.Info("Main: Stopping media");
- g_Player.Stop();
- return;
- }
+ }
+
+ if (
+ (GUIWindow.Window)(Enum.Parse(typeof(GUIWindow.Window), GUIWindowManager.ActiveWindow.ToString())) ==
+ GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO && g_Player.IsPicture)
+ {
+ break;
+ }
+
+ if (!g_Player.IsTV || !GUIGraphicsContext.IsFullScreenVideo)
+ {
+ Log.Info("Main: Stopping media");
+ if (g_Player.IsPicture)
+ {
+ GUISlideShow._slideDirection = 0;
+ }
+ g_Player.Stop();
+ return;
+ }
break;
//Jump to Music Now Playing
View
744 mediaportal/MediaPortal.Application/MediaPortal.csproj
@@ -1,371 +1,375 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Optimize>true</Optimize>
- <DebugType>
- </DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'UseCaptureCardDefinitions|x86' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\UseCaptureCardDefinitions\</OutputPath>
- <DefineConstants>DEBUG;TRACE;UseCaptureCardDefinitions</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DebugType>full</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'UseCaptureDefintionsRelease|x86' ">
- <OutputPath>bin\UseCaptureDefintionsRelease\</OutputPath>
- <DefineConstants>TRACE;UseCaptureCardDefinitions</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Optimize>true</Optimize>
- <DebugType>
- </DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup>
- <ProjectType>Local</ProjectType>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{CBDFAA0E-01F5-4331-AB55-18A4A037B5AE}</ProjectGuid>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon>mp.ico</ApplicationIcon>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>MediaPortal</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <OutputType>WinExe</OutputType>
- <RootNamespace>MediaPortal</RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <StartupObject>MediaPortalApp</StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>3.5</OldToolsVersion>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- <ApplicationManifest>MediaPortal.exe.manifest</ApplicationManifest>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>TRACE</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>true</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <PlatformTarget>AnyCPU</PlatformTarget>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'UseCaptureCardDefinitions|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>DEBUG;TRACE;UseCaptureCardDefinitions</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'UseCaptureDefintionsRelease|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>TRACE;UseCaptureCardDefinitions</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>true</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DebugType>full</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <Optimize>false</Optimize>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
- <SpecificVersion>True</SpecificVersion>
- </Reference>
- <Reference Include="Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
- <SpecificVersion>True</SpecificVersion>
- </Reference>
- <Reference Include="Microsoft.DirectX.Direct3DX, Version=1.0.2911.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
- <SpecificVersion>True</SpecificVersion>
- </Reference>
- <Reference Include="Microsoft.DirectX.DirectDraw, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
- <SpecificVersion>True</SpecificVersion>
- </Reference>
- <Reference Include="Microsoft.DirectX.DirectInput, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
- <SpecificVersion>True</SpecificVersion>
- </Reference>
- <Reference Include="System">
- <Name>system</Name>
- </Reference>
- <Reference Include="System.configuration" />
- <Reference Include="System.Configuration.Install">
- <Name>System.Configuration.Install</Name>
- </Reference>
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
- </Reference>
- <Reference Include="System.Management">
- <Name>System.Management</Name>
- </Reference>
- <Reference Include="System.Runtime.Serialization.Formatters.Soap">
- <Name>System.Runtime.Serialization.Formatters.Soap</Name>
- </Reference>
- <Reference Include="System.ServiceProcess" />
- <Reference Include="System.Windows.Forms">
- <Name>System.Windows.Forms</Name>
- </Reference>
- <Reference Include="System.Xml">
- <Name>System.XML</Name>
- </Reference>
- <ProjectReference Include="..\..\Common-MP-TVE3\Common.Utils\Common.Utils.csproj">
- <Project>{F6EDA1F3-3DCD-43F4-8A90-E32DA70C8227}</Project>
- <Name>Common.Utils</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Common-MP-TVE3\DirectShowLib\DirectShowLib.csproj">
- <Project>{CE009BFA-5EF6-4153-B2A1-2FA79698A9AE}</Project>
- <Name>DirectShowLib</Name>
- </ProjectReference>
- <ProjectReference Include="..\Core\Core.csproj">
- <Name>Core</Name>
- <Project>{02FFFC1F-2555-4B99-8B01-3432D0673855}</Project>
- <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
- </ProjectReference>
- <ProjectReference Include="..\Databases\Databases.csproj">
- <Name>Databases</Name>
- <Project>{C1BCEC3E-6074-4328-B5D9-391A457C8FFB}</Project>
- <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
- </ProjectReference>
- <ProjectReference Include="..\Dialogs\Dialogs.csproj">
- <Name>Dialogs</Name>
- <Project>{396C5208-5D46-4A11-92C1-FD0F2F42D7DD}</Project>
- <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
- </ProjectReference>
- <ProjectReference Include="..\MediaPortal.Support\MediaPortal.Support.csproj">
- <Project>{BD4A3413-C9F9-4299-BB52-ED45027EE7CC}</Project>
- <Name>MediaPortal.Support</Name>
- </ProjectReference>
- <ProjectReference Include="..\RemotePlugins\RemotePlugins.csproj">
- <Name>RemotePlugins</Name>
- <Project>{0A234721-1F13-4DF8-9B1E-64D9E3111203}</Project>
- <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
- </ProjectReference>
- <ProjectReference Include="..\Utils\Utils.csproj">
- <Project>{6DA0E4DF-6230-4642-98B5-E690BB6942BB}</Project>
- <Name>Utils</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- <None Include="MediaPortal.exe.manifest" />
- <None Include="PostBuild.bat" />
- <Compile Include="..\..\Common-MP-TVE3\SolutionInfo.cs">
- <Link>SolutionInfo.cs</Link>
- </Compile>
- <Compile Include="CodecsForm.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="d3dapp.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="d3denumeration.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="D3DSettingsForm.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="d3dutil.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="FullScreenSplashScreen.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="FullScreenSplashScreen.Designer.cs">
- <DependentUpon>FullScreenSplashScreen.cs</DependentUpon>
- </Compile>
- <Compile Include="Direct3D.cs" />
- <Compile Include="MediaPortal.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <Compile Include="SplashScreen.cs" />
- <Compile Include="ThreadMessageFilter.cs" />
- <Compile Include="WorkingSet.cs" />
- <EmbeddedResource Include="CodecsForm.resx">
- <DependentUpon>CodecsForm.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="d3dapp.resx">
- <DependentUpon>d3dapp.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="D3DSettingsForm.resx">
- <DependentUpon>D3DSettingsForm.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="FullScreenSplashScreen.resx">
- <SubType>Designer</SubType>
- <DependentUpon>FullScreenSplashScreen.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="MediaPortal.resx">
- <DependentUpon>MediaPortal.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="Properties\Resources.resx">
- <SubType>Designer</SubType>
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- </EmbeddedResource>
- <EmbeddedResource Include="SplashScreen.resx">
- <DependentUpon>SplashScreen.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <Content Include="mp.ico" />
- <Content Include="mplogo.png" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
- <PostBuildEvent>"$(ProjectDir)PostBuild.bat" "$(SolutionDir)" $(ConfigurationName)</PostBuildEvent>
- </PropertyGroup>
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'UseCaptureCardDefinitions|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\UseCaptureCardDefinitions\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;UseCaptureCardDefinitions</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'UseCaptureDefintionsRelease|x86' ">
+ <OutputPath>bin\UseCaptureDefintionsRelease\</OutputPath>
+ <DefineConstants>TRACE;UseCaptureCardDefinitions</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Optimize>true</Optimize>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{CBDFAA0E-01F5-4331-AB55-18A4A037B5AE}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ApplicationIcon>mp.ico</ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>MediaPortal</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>WinExe</OutputType>
+ <RootNamespace>MediaPortal</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>MediaPortalApp</StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <ApplicationManifest>MediaPortal.exe.manifest</ApplicationManifest>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <OutputPath>bin\Debug\</OutputPath>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>true</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>false</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>full</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <OutputPath>bin\Release\</OutputPath>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>false</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>true</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>none</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'UseCaptureCardDefinitions|AnyCPU' ">
+ <OutputPath>bin\Debug\</OutputPath>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>DEBUG;TRACE;UseCaptureCardDefinitions</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>true</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>false</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>full</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'UseCaptureDefintionsRelease|AnyCPU' ">
+ <OutputPath>bin\Release\</OutputPath>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE;UseCaptureCardDefinitions</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>false</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>true</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>none</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <Optimize>false</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\WindowPlugins\WindowPlugins.csproj">
+ <Project>{B282C55B-A37B-4CEC-A4FC-00791069BF00}</Project>
+ <Name>WindowPlugins</Name>
+ </ProjectReference>
+ <Reference Include="Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
+ <SpecificVersion>True</SpecificVersion>
+ </Reference>
+ <Reference Include="Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
+ <SpecificVersion>True</SpecificVersion>
+ </Reference>
+ <Reference Include="Microsoft.DirectX.Direct3DX, Version=1.0.2911.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
+ <SpecificVersion>True</SpecificVersion>
+ </Reference>
+ <Reference Include="Microsoft.DirectX.DirectDraw, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
+ <SpecificVersion>True</SpecificVersion>
+ </Reference>
+ <Reference Include="Microsoft.DirectX.DirectInput, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
+ <SpecificVersion>True</SpecificVersion>
+ </Reference>
+ <Reference Include="System">
+ <Name>system</Name>
+ </Reference>
+ <Reference Include="System.configuration" />
+ <Reference Include="System.Configuration.Install">
+ <Name>System.Configuration.Install</Name>
+ </Reference>
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data">
+ <Name>System.Data</Name>
+ </Reference>
+ <Reference Include="System.Drawing">
+ <Name>System.Drawing</Name>
+ </Reference>
+ <Reference Include="System.Management">
+ <Name>System.Management</Name>
+ </Reference>
+ <Reference Include="System.Runtime.Serialization.Formatters.Soap">
+ <Name>System.Runtime.Serialization.Formatters.Soap</Name>
+ </Reference>
+ <Reference Include="System.ServiceProcess" />
+ <Reference Include="System.Windows.Forms">
+ <Name>System.Windows.Forms</Name>
+ </Reference>
+ <Reference Include="System.Xml">
+ <Name>System.XML</Name>
+ </Reference>
+ <ProjectReference Include="..\..\Common-MP-TVE3\Common.Utils\Common.Utils.csproj">
+ <Project>{F6EDA1F3-3DCD-43F4-8A90-E32DA70C8227}</Project>
+ <Name>Common.Utils</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Common-MP-TVE3\DirectShowLib\DirectShowLib.csproj">
+ <Project>{CE009BFA-5EF6-4153-B2A1-2FA79698A9AE}</Project>
+ <Name>DirectShowLib</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Core\Core.csproj">
+ <Name>Core</Name>
+ <Project>{02FFFC1F-2555-4B99-8B01-3432D0673855}</Project>
+ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ </ProjectReference>
+ <ProjectReference Include="..\Databases\Databases.csproj">
+ <Name>Databases</Name>
+ <Project>{C1BCEC3E-6074-4328-B5D9-391A457C8FFB}</Project>
+ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ </ProjectReference>
+ <ProjectReference Include="..\Dialogs\Dialogs.csproj">
+ <Name>Dialogs</Name>
+ <Project>{396C5208-5D46-4A11-92C1-FD0F2F42D7DD}</Project>
+ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ </ProjectReference>
+ <ProjectReference Include="..\MediaPortal.Support\MediaPortal.Support.csproj">
+ <Project>{BD4A3413-C9F9-4299-BB52-ED45027EE7CC}</Project>
+ <Name>MediaPortal.Support</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\RemotePlugins\RemotePlugins.csproj">
+ <Name>RemotePlugins</Name>
+ <Project>{0A234721-1F13-4DF8-9B1E-64D9E3111203}</Project>
+ <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
+ </ProjectReference>
+ <ProjectReference Include="..\Utils\Utils.csproj">
+ <Project>{6DA0E4DF-6230-4642-98B5-E690BB6942BB}</Project>
+ <Name>Utils</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ <None Include="MediaPortal.exe.manifest" />
+ <None Include="PostBuild.bat" />
+ <Compile Include="..\..\Common-MP-TVE3\SolutionInfo.cs">
+ <Link>SolutionInfo.cs</Link>
+ </Compile>
+ <Compile Include="CodecsForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="d3dapp.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="d3denumeration.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="D3DSettingsForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="d3dutil.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="FullScreenSplashScreen.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="FullScreenSplashScreen.Designer.cs">
+ <DependentUpon>FullScreenSplashScreen.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Direct3D.cs" />
+ <Compile Include="MediaPortal.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="SplashScreen.cs" />
+ <Compile Include="ThreadMessageFilter.cs" />
+ <Compile Include="WorkingSet.cs" />
+ <EmbeddedResource Include="CodecsForm.resx">
+ <DependentUpon>CodecsForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="d3dapp.resx">
+ <DependentUpon>d3dapp.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="D3DSettingsForm.resx">
+ <DependentUpon>D3DSettingsForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="FullScreenSplashScreen.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>FullScreenSplashScreen.cs</DependentUpon>
+ </EmbeddedResource>
+ <EmbeddedResource Include="MediaPortal.resx">
+ <DependentUpon>MediaPortal.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <SubType>Designer</SubType>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <EmbeddedResource Include="SplashScreen.resx">
+ <DependentUpon>SplashScreen.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <Content Include="mp.ico" />
+ <Content Include="mplogo.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>"$(ProjectDir)PostBuild.bat" "$(SolutionDir)" $(ConfigurationName)</PostBuildEvent>
+ </PropertyGroup>
</Project>
View
1 mediaportal/MediaPortal.Base/skin/Default/DialogNotify.xml
@@ -93,6 +93,7 @@
<onup>4</onup>
<ondown>4</ondown>
<label>-</label>
+ <font>font9</font>
</control>
</control>
</controls>
View
1 mediaportal/MediaPortal.Base/skin/DefaultWide/DialogNotify.xml
@@ -92,6 +92,7 @@
<onup>4</onup>
<ondown>4</ondown>
<label>-</label>
+ <font>font9</font>
</control>
</control>
</controls>
View
462 mediaportal/WindowPlugins/GUIPictures/GUIPictures.cs
@@ -33,7 +33,9 @@
using MediaPortal.Database;
using MediaPortal.Dialogs;
using MediaPortal.GUI.Library;
-using MediaPortal.Picture.Database;
+using MediaPortal.Picture.Database;
+using MediaPortal.Playlists;
+using MediaPortal.Profile;
using MediaPortal.Services;
using MediaPortal.Threading;
using MediaPortal.Util;
@@ -309,13 +311,16 @@ private enum Display
private string fileMenuPinCode = string.Empty;
private bool _autocreateLargeThumbs = true;
private bool _useDayGrouping = false;
- private bool _enableVideoPlayback = false;
- private bool _playVideosInSlideshows = false;
+ private bool _enableVideoPlayback = false;
+ public bool _playVideosInSlideshows = false;
+ public bool _tempLeaveThumbsInFolder = false;
//bool _hideExtensions = true;
private Display disp = Display.Files;
private bool _switchRemovableDrives;
- private int CountOfNonImageItems = 0; // stores the count of items in a folder that are no images (folders etc...)
-
+ private int CountOfNonImageItems = 0; // stores the count of items in a folder that are no images (folders etc...)
+ public static string fileNameCheck = string.Empty;
+ protected PictureSort.SortMethod currentSortMethod = PictureSort.SortMethod.Name;
+
#endregion
#region ctor/dtor
@@ -519,75 +524,102 @@ public override void OnAction(Action action)
OnDeleteItem(item);
}
}
- }
-
+ }
+
base.OnAction(action);
- }
-
- protected override void OnPageLoad()
- {
- if (!KeepVirtualDirectory(PreviousWindowId))
- {
- virtualDirectory.Reset();
- }
- base.OnPageLoad();
- InitViewSelections();
- UpdateButtonStates();
-
- GUITextureManager.CleanupThumbs();
- // LoadSettings();
- LoadFolderSettings(currentFolder);
- ShowThumbPanel();
- LoadDirectory(currentFolder);
- if (selectedItemIndex >= 0)
- {
- GUISlideShow SlideShow = (GUISlideShow)GUIWindowManager.GetWindow((int)Window.WINDOW_SLIDESHOW);
- Log.Debug("GUIPictures: currentSlideIndex {0}", SlideShow._currentSlideIndex);
+ }
+
+ protected override void OnPageLoad()
+ {
+ using (Profile.Settings xmlreader = new Profile.MPSettings())
+ {
+ _tempLeaveThumbsInFolder = xmlreader.GetValueAsBool("thumbnails", "tvrecordedsharepreview", false);
+ xmlreader.SetValueAsBool("thumbnails", "tvrecordedsharepreview", false);
+ }
+ if (!KeepVirtualDirectory(PreviousWindowId))
+ {
+ virtualDirectory.Reset();
+ }
+ base.OnPageLoad();
+ InitViewSelections();
+ UpdateButtonStates();
+
+ GUITextureManager.CleanupThumbs();
+ // LoadSettings();
+ LoadFolderSettings(currentFolder);
+ ShowThumbPanel();
+ LoadDirectory(currentFolder);
+ if (selectedItemIndex >= 0)
+ {
+ GUISlideShow SlideShow = (GUISlideShow) GUIWindowManager.GetWindow((int) Window.WINDOW_SLIDESHOW);
+ Log.Debug("GUIPictures: currentSlideIndex {0}", SlideShow._currentSlideIndex);
/*if (SlideShow._currentSlideIndex != -1)
- selectedItemIndex += SlideShow._currentSlideIndex+1;*/
- int direction = GUISlideShow.SlideDirection;
- GUISlideShow.SlideDirection = 0;
-
- //forward
- if (direction == 1)
- {
- selectedItemIndex++;
- }
- //Backward
- if (direction == -1)
- {
- selectedItemIndex--;
- }
- GUIControl.SelectItemControl(GetID, facadeLayout.GetID, selectedItemIndex);
-
- //Slide Show
- if (SlideShow._isSlideShow)
- {
- if (SlideShow._returnedFromVideoPlayback)
- {
- SlideShow._returnedFromVideoPlayback = false;
- }
- OnSlideShow(selectedItemIndex);
- }
- //OnClick
- else if (direction != 0)
- {
- if (SlideShow._returnedFromVideoPlayback)
- {
- SlideShow._returnedFromVideoPlayback = false;
- }
- OnClick(selectedItemIndex);
- }
- }
-
- btnSortBy.SortChanged += new SortEventHandler(SortChanged);
- }
-
+ selectedItemIndex += SlideShow._currentSlideIndex+1;*/
+ int direction = GUISlideShow.SlideDirection;
+ GUISlideShow.SlideDirection = 0;
+ g_Player.IsPicture = false;
+
+ if (SlideShow._returnedFromVideoPlayback && !SlideShow._loadVideoPlayback)
+ {
+ if (direction == 0)
+ {
+ SlideShow._returnedFromVideoPlayback = false;
+ SlideShow.Reset();
+ }
+ }
+
+ //forward
+ if (direction == 1)
+ {
+ selectedItemIndex++;
+ }
+ //Backward
+ if (direction == -1)
+ {
+ selectedItemIndex--;
+ }
+
+ //Slide Show
+ if (SlideShow._isSlideShow)
+ {
+ if (SlideShow._returnedFromVideoPlayback)
+ {
+ SlideShow._returnedFromVideoPlayback = false;
+ }
+ OnClickSlideShow(selectedItemIndex);
+ }
+ //OnClick
+ else if (direction != 0)
+ {
+ if (SlideShow._returnedFromVideoPlayback)
+ {
+ SlideShow._returnedFromVideoPlayback = false;
+ }
+ OnClickSlide(selectedItemIndex);
+ }
+ if (SlideShow.pausedMusic)
+ {
+ SlideShow.resumePausedMusic();
+ }
+
+ if (SlideShow._showRecursive)
+ {
+ SlideShow._showRecursive = false;
+ }
+ }
+ btnSortBy.SortChanged += new SortEventHandler(SortChanged);
+ }
+
protected override void OnPageDestroy(int newWindowId)
{
selectedItemIndex = GetSelectedItemNo();
SaveSettings();
- SaveFolderSettings(currentFolder);
+ SaveFolderSettings(currentFolder);
+ // set back tvrecordedsharepreview value
+ using (Profile.Settings xmlwriter = new Profile.MPSettings())
+ {
+ xmlwriter.SetValueAsBool("thumbnails", "tvrecordedsharepreview", _tempLeaveThumbsInFolder);
+ }
base.OnPageDestroy(newWindowId);
}
@@ -634,9 +666,9 @@ public override bool OnMessage(GUIMessage message)
string strUrl = message.Label;
LoadDirectory(strUrl);
OnSlideShow();
- break;
-
- case GUIMessage.MessageType.GUI_MSG_AUTOPLAY_VOLUME:
+ break;
+
+ case GUIMessage.MessageType.GUI_MSG_AUTOPLAY_VOLUME:
currentFolder = message.Label;
OnSlideShowRecursive();
break;
@@ -698,7 +730,7 @@ public override bool OnMessage(GUIMessage message)
SetView(btnViews.SelectedItemValue);
GUIControl.FocusControl(GetID, btnViews.GetID);
}
- break;
+ break;
}
return base.OnMessage(message);
}
@@ -804,8 +836,8 @@ protected override void OnShowContextMenu()
OnClick(itemNo);
break;
- case 108: // start slideshow
- OnSlideShow(itemNo);
+ case 108: // start slideshow
+ OnClickSlideShow(itemNo);
break;
case 940: // properties
@@ -865,6 +897,12 @@ protected override void OnShowContextMenu()
}
break;
}
+ }
+
+ protected virtual PictureSort.SortMethod CurrentSortMethod
+ {
+ get { return currentSortMethod; }
+ set { currentSortMethod = value; }
}
#endregion
@@ -1391,18 +1429,68 @@ public static void DoRotatePicture(string aPicturePath, int degrees)
{
Log.Error("GUIPictures: Error recreating thumbnails after rotation of {0} - {1}", aPicturePath, ex.ToString());
}
+ }
+
+ protected void OnClickSlide(int itemIndex)
+ {
+ if ((itemIndex < 0) || (itemIndex > GetSelectedItemNo()))
+ {
+ itemIndex = 0;
+ }
+ int i = itemIndex;
+
+ GUIListItem item = GetItem(i);
+
+ if (item == null)
+ {
+ return;
+ }
+ if (item.IsFolder)
+ {
+ selectedItemIndex = GetSelectedItemNo();
+ OnShowPicture(item.Path);
+ }
+ else
+ {
+ if (virtualDirectory.IsRemote(item.Path))
+ {
+ if (!virtualDirectory.IsRemoteFileDownloaded(item.Path, item.FileInfo.Length))
+ {
+ if (!virtualDirectory.ShouldWeDownloadFile(item.Path))
+ {
+ return;
+ }
+ if (!virtualDirectory.DownloadRemoteFile(item.Path, item.FileInfo.Length))
+ {
+ //show message that we are unable to download the file
+ GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_SHOW_WARNING, 0, 0, 0, 0, 0, 0);
+ msg.Param1 = 916;
+ msg.Param2 = 920;
+ msg.Param3 = 0;
+ msg.Param4 = 0;
+ GUIWindowManager.SendMessage(msg);
+
+ return;
+ }
+ }
+ return;
+ }
+
+ selectedItemIndex = GetSelectedItemNo();
+ OnShowPicture(item.Path);
+ }
}
protected override void OnClick(int itemIndex)
- {
+ {
GUIListItem item = GetSelectedItem();
if (item == null)
{
return;
}
if (item.IsFolder)
- {
- selectedItemIndex = -1;
+ {
+ selectedItemIndex = -1;
LoadDirectory(item.Path);
}
else
@@ -1434,6 +1522,57 @@ protected override void OnClick(int itemIndex)
selectedItemIndex = GetSelectedItemNo();
OnShowPicture(item.Path);
}
+ }
+
+ protected void OnClickSlideShow(int itemIndex)
+ {
+ if ((itemIndex < 0) || (itemIndex > GetSelectedItemNo()))
+ {
+ itemIndex = 0;
+ }
+ int i = itemIndex;
+
+ GUIListItem item = GetItem(i);
+
+ if (item == null)
+ {
+ return;
+ }
+ if (item.IsFolder)
+ {
+ i++;
+ GUIListItem itemSelect = GetItem(i);
+ selectedItemIndex = i;
+ OnSlideShow(itemSelect.Path);
+ }
+ else
+ {
+ if (virtualDirectory.IsRemote(item.Path))
+ {
+ if (!virtualDirectory.IsRemoteFileDownloaded(item.Path, item.FileInfo.Length))
+ {
+ if (!virtualDirectory.ShouldWeDownloadFile(item.Path))
+ {
+ return;
+ }
+ if (!virtualDirectory.DownloadRemoteFile(item.Path, item.FileInfo.Length))
+ {
+ //show message that we are unable to download the file
+ GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_SHOW_WARNING, 0, 0, 0, 0, 0, 0);
+ msg.Param1 = 916;
+ msg.Param2 = 920;
+ msg.Param3 = 0;
+ msg.Param4 = 0;
+ GUIWindowManager.SendMessage(msg);
+
+ return;
+ }
+ }
+ return;
+ }
+ selectedItemIndex = GetSelectedItemNo();
+ OnSlideShow(item.Path);
+ }
}
private void OnShowPicture(string strFile)
@@ -1442,6 +1581,10 @@ private void OnShowPicture(string strFile)
if (SlideShow == null)
{
return;
+ }
+ if (SlideShow._returnedFromVideoPlayback)
+ {
+ SlideShow._returnedFromVideoPlayback = false;
}
SlideShow.Reset();
@@ -1459,32 +1602,26 @@ private void OnShowPicture(string strFile)
}
if (SlideShow.Count > 0)
{
- if (Util.Utils.IsVideo(strFile))
- {
- g_Player.Play(strFile, g_Player.MediaType.Video);
- g_Player.ShowFullScreenWindow();
- }
- else
- {
- GUIWindowManager.ActivateWindow((int)Window.WINDOW_SLIDESHOW);
- SlideShow.Select(strFile);
- }
+ GUIWindowManager.ActivateWindow((int)Window.WINDOW_SLIDESHOW);
+ SlideShow.Select(strFile);
}
- }
-
- private void AddDir(GUISlideShow SlideShow, string strDir)
+ }
+
+ public void AddDir(GUISlideShow SlideShow, string strDir)
{
- List<GUIListItem> itemlist = virtualDirectory.GetDirectoryExt(strDir);
+ List<GUIListItem> itemlist = virtualDirectory.GetDirectoryExt(strDir);
+ itemlist.Sort(new PictureSort(CurrentSortMethod, CurrentSortAsc));
Filter(ref itemlist);
foreach (GUIListItem item in itemlist)
- {
- if (item.IsFolder)
- {
- if (item.Label != "..")
- {
- AddDir(SlideShow, item.Path);
- }
- }
+ {
+ if (item.IsFolder)
+ {
+ if (item.Label != ".." && !SlideShow._slideFolder.Contains(item.Label))
+ {
+ SlideShow._slideFolder.Add(item.Path);
+ SlideShow.Add(item.Path);
+ }
+ }
else if (!item.IsRemote)
{
SlideShow.Add(item.Path);
@@ -1498,9 +1635,10 @@ private void OnSlideShowRecursive()
if (SlideShow == null)
{
return;
- }
-
- SlideShow.Reset();
+ }
+
+ SlideShow.Reset();
+ SlideShow._showRecursive = true;
if (disp == Display.Files)
{
AddDir(SlideShow, currentFolder);
@@ -1513,60 +1651,70 @@ private void OnSlideShowRecursive()
{
SlideShow.Add(pic);
}
- }
- if (SlideShow.Count > 0)
- {
- SlideShow.StartSlideShow(currentFolder);
- GUIWindowManager.ActivateWindow((int)Window.WINDOW_SLIDESHOW);
+ }
+ if (SlideShow.Count > 0 || SlideShow._slideFolder.Count > 0)
+ {
+ GUIWindowManager.ActivateWindow((int)Window.WINDOW_SLIDESHOW);
+ SlideShow.StartSlideShow();
}
}
private void OnSlideShow()
- {
- OnSlideShow(0);
- }
-
- private void OnSlideShow(int iStartItem)
- {
- GUISlideShow SlideShow = (GUISlideShow)GUIWindowManager.GetWindow((int)Window.WINDOW_SLIDESHOW);
- if (SlideShow == null)
- {
- return;
- }
-
- SlideShow.Reset();
-
- if ((iStartItem < 0) || (iStartItem > GetItemCount()))
- {
- iStartItem = 0;
- }
- int i = iStartItem;
- do
- {
- GUIListItem item = GetItem(i);
- if (!item.IsFolder && !item.IsRemote)
- {
- if (!_playVideosInSlideshows)
- {
- if (!Util.Utils.IsVideo(item.Path))
- SlideShow.Add(item.Path);
- }
- else
- SlideShow.Add(item.Path);
- }
-
- i++;
- if (i >= GetItemCount())
- {
- i = 0;
- }
- } while (i != iStartItem);
-
- if (SlideShow.Count > 0)
- {
- SlideShow.StartSlideShow(currentFolder);
- GUIWindowManager.ActivateWindow((int)Window.WINDOW_SLIDESHOW);
- }
+ {
+ OnClickSlideShow(0);
+ }
+
+ private void OnSlideShowRecursive(string strFile)
+ {
+ GUISlideShow SlideShow = (GUISlideShow)GUIWindowManager.GetWindow((int)Window.WINDOW_SLIDESHOW);
+ if (SlideShow == null)
+ {
+ return;
+ }
+ if (SlideShow._returnedFromVideoPlayback)
+ {
+ SlideShow._returnedFromVideoPlayback = false;
+ }
+
+ if (SlideShow.Count > 0)
+ {
+ GUIWindowManager.ActivateWindow((int)Window.WINDOW_SLIDESHOW);
+ SlideShow.SelectShowRecursive(strFile);
+ SlideShow.StartSlideShow();
+ }
+ }
+
+ private void OnSlideShow (string strFile)
+ {
+ GUISlideShow SlideShow = (GUISlideShow)GUIWindowManager.GetWindow((int)Window.WINDOW_SLIDESHOW);
+ if (SlideShow == null)
+ {
+ return;
+ }
+ if (SlideShow._returnedFromVideoPlayback)
+ {
+ SlideShow._returnedFromVideoPlayback = false;
+ }
+
+ SlideShow.Reset();
+ for (int i = 0; i < GetItemCount(); ++i)
+ {
+ GUIListItem item = GetItem(i);
+ if (!item.IsFolder)
+ {
+ if (item.IsRemote)
+ {
+ continue;
+ }
+ SlideShow.Add(item.Path);
+ }
+ }
+ if (SlideShow.Count > 0)
+ {
+ GUIWindowManager.ActivateWindow((int)Window.WINDOW_SLIDESHOW);
+ SlideShow.Select(strFile);
+ SlideShow.StartSlideShow();
+ }
}
private void CreateAllThumbs(string strDir, bool Regenerate, bool Recursive)
@@ -1730,12 +1878,12 @@ public static void Filter(ref List<GUIListItem> itemlist)
}
protected override void LoadDirectory(string strNewDirectory)
- {
+ {
List<GUIListItem> itemlist;
string objectCount = string.Empty;
- GUIWaitCursor.Show();
-
+ GUIWaitCursor.Show();
+
GUIListItem SelectedItem = GetSelectedItem();
if (SelectedItem != null)
{
@@ -1786,10 +1934,10 @@ protected override void LoadDirectory(string strNewDirectory)
}
int totalItemCount = facadeLayout.Count;
- string strSelectedItem = folderHistory.Get(currentFolder);
+ string strSelectedItem = folderHistory.Get(currentFolder);
GUIControl.SelectItemControl(GetID, facadeLayout.GetID, 0);
for (int i = 0; i < totalItemCount; i++)
- {
+ {
if (facadeLayout[i].Label == strSelectedItem)
{
GUIControl.SelectItemControl(GetID, facadeLayout.GetID, i);
View
11 mediaportal/WindowPlugins/GUIPictures/GUISlidePicture.cs
@@ -35,7 +35,7 @@ internal class SlidePicture
private int _height = 0;
private int _rotation = 0;
- private string _filePath;
+ public string _filePath;
private bool _useActualSizeTexture;
public Texture Texture
@@ -84,7 +84,14 @@ public SlidePicture(string strFilePath, bool useActualSizeTexture)
iMaxHeight = MAX_PICTURE_HEIGHT;
}
- _texture = Picture.Load(strFilePath, _rotation, iMaxWidth, iMaxHeight, true, false, true, out _width, out _height);
+ if (!MediaPortal.Util.Utils.IsPicture(strFilePath))
+ {
+ return;
+ }
+ else
+ {
+ _texture = Picture.Load(strFilePath, _rotation, iMaxWidth, iMaxHeight, true, false, true, out _width, out _height);
+ }
}
~SlidePicture()
View
5,558 mediaportal/WindowPlugins/GUIPictures/GUISlideShow.cs
2,837 additions, 2,721 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
395 mediaportal/WindowPlugins/GUIPictures/PictureSort.cs
@@ -0,0 +1,395 @@
+#region Copyright (C) 2005-2011 Team MediaPortal
+
+// Copyright (C) 2005-2011 Team MediaPortal
+// http://www.team-mediaportal.com
+//
+// MediaPortal is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// MediaPortal is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with MediaPortal. If not, see <http://www.gnu.org/licenses/>.
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using MediaPortal.GUI.Library;
+using MediaPortal.Profile;
+//using MediaPortal.Video.Database;
+
+namespace MediaPortal.GUI.Pictures
+{
+ /// <summary>
+ /// Summary description for PictureSort.
+ /// </summary>
+ public class PictureSort : IComparer<GUIListItem>
+ {
+ public enum SortMethod
+ {
+ Name = 0,
+ NameAll = 1,
+ Date = 2,
+ Size = 3,
+ Watched = 4,
+ Year = 5,
+ Rating = 6,
+ Label = 7,
+ Modified = 8,
+ Created = 9,
+ }
+
+ protected SortMethod CurrentSortMethod;
+ protected bool SortAscending;
+ protected bool KeepFoldersTogether;
+ protected bool UseSortTitle;
+
+ public PictureSort(SortMethod sortMethod, bool ascending)
+ {
+ CurrentSortMethod = sortMethod;
+ SortAscending = ascending;
+
+ using (Profile.Settings xmlreader = new MPSettings())
+ {
+ KeepFoldersTogether = xmlreader.GetValueAsBool("movies", "keepfolderstogether", false);
+ UseSortTitle = xmlreader.GetValueAsBool("moviedatabase", "usesorttitle", false);
+ }
+ }
+
+ public int Compare(GUIListItem item1, GUIListItem item2)
+ {
+ if (item1 == item2)
+ {
+ return 0;
+ }
+ if (item1 == null)
+ {
+ return -1;
+ }
+ if (item2 == null)
+ {
+ return -1;
+ }
+ if (item1.IsFolder && item1.Label == "..")
+ {
+ return -1;
+ }
+ if (item2.IsFolder && item2.Label == "..")
+ {
+ return -1;
+ }
+ if (item1.IsFolder && !item2.IsFolder && CurrentSortMethod != SortMethod.NameAll)
+ {
+ return -1;
+ }
+ if (!item1.IsFolder && item2.IsFolder && CurrentSortMethod != SortMethod.NameAll)
+ {
+ return 1;
+ }
+
+ switch (CurrentSortMethod)
+ {
+ case SortMethod.Year:
+ {
+ if (SortAscending)
+ {
+ if (item1.Year > item2.Year)
+ {
+ return 1;
+ }
+ if (item1.Year < item2.Year)
+ {
+ return -1;
+ }
+ }
+ else
+ {
+ if (item1.Year > item2.Year)
+ {
+ return -1;
+ }
+ if (item1.Year < item2.Year)
+ {
+ return 1;
+ }
+ }
+ return 0;
+ }
+ case SortMethod.Rating:
+ {
+ if (SortAscending)
+ {
+ if (item1.Rating > item2.Rating)
+ {
+ return 1;
+ }
+ if (item1.Rating < item2.Rating)
+ {
+ return -1;
+ }
+ }
+ else
+ {
+ if (item1.Rating > item2.Rating)
+ {
+ return -1;
+ }
+ if (item1.Rating < item2.Rating)
+ {
+ return 1;
+ }
+ }
+ return 0;
+ }
+
+ case SortMethod.Name:
+ case SortMethod.NameAll:
+
+ if (SortAscending)
+ {
+ if (!UseSortTitle)
+ {
+ return String.Compare(item1.Label, item2.Label, true);
+ }
+ else
+ {
+ {
+ return String.Compare(item1.Label, item2.Label, true);
+ }
+ }
+ }
+ else
+ {
+ if (!UseSortTitle)
+ {
+ return String.Compare(item2.Label, item1.Label, true);
+ }
+ else
+ {
+ {
+ return String.Compare(item2.Label, item1.Label, true);
+ }
+ }
+ }
+
+ case SortMethod.Date: // Only recently added/watched->database view + date used for sort for title
+
+ if (item1.FileInfo == null)
+ {
+ if (!this.TryGetFileInfo(ref item1))
+ {
+ return -1;
+ }
+ }
+
+ if (item2.FileInfo == null)
+ {
+ if (!this.TryGetFileInfo(ref item2))
+ {
+ return -1;
+ }
+ }
+
+ item1.Label2 = item1.FileInfo.CreationTime.ToShortDateString() + " " +
+ item1.FileInfo.CreationTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat);
+ item2.Label2 = item2.FileInfo.CreationTime.ToShortDateString() + " " +
+ item2.FileInfo.CreationTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat);
+
+ if (item1.Label2 == string.Empty || item2.Label2 == string.Empty)
+ {
+ return -1;
+ }
+
+ if (SortAscending)
+ {
+ return DateTime.Compare(Convert.ToDateTime(item1.Label2), Convert.ToDateTime(item2.Label2));
+ }
+ else
+ {
+ return DateTime.Compare(Convert.ToDateTime(item2.Label2), Convert.ToDateTime(item1.Label2));
+ }
+
+ case SortMethod.Label:
+ if (SortAscending)
+ {
+ return String.Compare(item1.DVDLabel, item2.DVDLabel, true);
+ }
+ else
+ {
+ return String.Compare(item2.DVDLabel, item1.DVDLabel, true);
+ }
+ case SortMethod.Size:
+ if (item1.FileInfo == null || item2.FileInfo == null)
+ {
+ if (SortAscending)
+ {
+ return (int)(item1.Duration - item2.Duration);
+ }
+ else
+ {
+ return (int)(item2.Duration - item1.Duration);
+ }
+ }
+ else
+ {
+ if (SortAscending)
+ {
+ long compare = (item1.FileInfo.Length - item2.FileInfo.Length);
+ return compare == 0 ? 0 : compare < 0 ? -1 : 1;
+ }
+ else
+ {
+ long compare = (item2.FileInfo.Length - item1.FileInfo.Length);
+ return compare == 0 ? 0 : compare < 0 ? -1 : 1;
+ }
+ }
+
+ case SortMethod.Created:
+
+ if (item1.FileInfo == null)
+ {
+ if (!this.TryGetFileInfo(ref item1))
+ {
+ return -1;
+ }
+ }
+
+ if (item2.FileInfo == null)
+ {
+ if (!this.TryGetFileInfo(ref item2))
+ {
+ return -1;
+ }
+ }
+
+ item1.Label2 = item1.FileInfo.CreationTime.ToShortDateString() + " " +
+ item1.FileInfo.CreationTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat);
+ item2.Label2 = item2.FileInfo.CreationTime.ToShortDateString() + " " +
+ item2.FileInfo.CreationTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat);
+
+ if (SortAscending)
+ {
+ return DateTime.Compare(item1.FileInfo.CreationTime, item2.FileInfo.CreationTime);
+ }
+ else
+ {
+ return DateTime.Compare(item2.FileInfo.CreationTime, item1.FileInfo.CreationTime);
+ }
+
+ case SortMethod.Modified:
+
+ if (item1.FileInfo == null)
+ {
+ if (!this.TryGetFileInfo(ref item1))
+ {
+ return -1;
+ }
+ }
+
+ if (item2.FileInfo == null)
+ {
+ if (!this.TryGetFileInfo(ref item2))
+ {
+ return -1;
+ }
+ }
+
+ item1.Label2 = item1.FileInfo.ModificationTime.ToShortDateString() + " " +
+ item1.FileInfo.ModificationTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat);
+ item2.Label2 = item2.FileInfo.ModificationTime.ToShortDateString() + " " +
+ item2.FileInfo.ModificationTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat);
+
+ if (SortAscending)
+ {
+ return DateTime.Compare(item1.FileInfo.ModificationTime, item2.FileInfo.ModificationTime);
+ }
+ else
+ {
+ return DateTime.Compare(item2.FileInfo.ModificationTime, item1.FileInfo.ModificationTime);
+ }
+
+ case SortMethod.Watched:
+ {
+ int ret = 0;
+
+ if (item1.IsPlayed && !item2.IsPlayed)
+ {
+ ret = -1;
+ if (!SortAscending) ret = 1;
+ }
+ else if (!item1.IsPlayed && item2.IsPlayed)
+ {
+ ret = 1;
+ if (!SortAscending) ret = -1;
+ }
+ else
+ {
+ if (SortAscending)
+ {
+ if (!UseSortTitle)
+ {
+ return String.Compare(item1.Label, item2.Label, true);
+ }
+ else
+ {
+ {
+ return String.Compare(item1.Label, item2.Label, true);
+ }
+ }
+ }
+ else
+ {
+ if (!UseSortTitle)
+ {
+ return String.Compare(item2.Label, item1.Label, true);
+ }
+ else
+ {
+ {
+ return String.Compare(item2.Label, item1.Label, true);
+ }
+ }
+ }
+ }
+ return ret;
+ }
+ }
+ return 0;
+ }
+
+ /// <summary>
+ /// In database view the file info isn't set.
+ /// This function trys to get the files from database and then creates the file info for it.
+ /// </summary>
+ /// <param name="item">Item to store the file info</param>
+ /// <returns>True if FileInformation was created otherwise false</returns>
+ private bool TryGetFileInfo(ref GUIListItem item)
+ {
+ if (item == null)
+ return false;
+
+ try
+ {
+ {
+ item.FileInfo = new Util.FileInformation();
+ DateTime dateAddedWatched;
+ DateTime.TryParseExact(item.Label2, "yyyy-MM-dd HH:mm:ss", CultureInfo.CurrentCulture, DateTimeStyles.None, out dateAddedWatched);
+ item.FileInfo.CreationTime = dateAddedWatched;
+ }
+ }
+ catch (Exception exp)
+ {
+ Log.Error("VideoSort::TryGetFileInfo -> Exception: {0}", exp.Message);
+ }
+
+ return item.FileInfo != null;
+ }
+ }
+}
View
5 mediaportal/WindowPlugins/GUIVideoFiles/GUIVideoFiles.cs
@@ -1715,8 +1715,9 @@ public static void PlayMovieFromPlayList(bool askForResumeMovie, int iMovieIndex
}
}
- if (g_Player.Playing && !g_Player.IsDVD)
- g_Player.Stop();
+ // TODO Handle STP when it comes from MyMusic otherwise Video Playlist will not work
+ //if (g_Player.Playing && !g_Player.IsDVD)
+ // g_Player.Stop();
string currentFile = g_Player.CurrentFile;
if (Util.Utils.IsISOImage(currentFile))
View
117 mediaportal/WindowPlugins/GUIVideoFiles/GUIVideoFullscreen.cs
@@ -24,7 +24,8 @@
using System.Drawing;
using System.Windows.Forms;
using MediaPortal.Dialogs;
-using MediaPortal.GUI.Library;
+using MediaPortal.GUI.Library;
+using MediaPortal.GUI.Pictures;
using MediaPortal.Player;
using MediaPortal.Playlists;
using MediaPortal.Video.Database;
@@ -355,7 +356,7 @@ public override void OnAction(Action action)
}
}
return;
- }
+ }
}
if (action.wID == Action.ActionType.ACTION_SHOW_VOLUME)
{
@@ -417,24 +418,48 @@ public override void OnAction(Action action)
}
switch (action.wID)
- {
- // previous : play previous song from playlist
- case Action.ActionType.ACTION_PREV_ITEM:
- {
- //g_playlistPlayer.PlayPrevious();
- }
+ {
+ // previous : play previous song from playlist or previous item from MyPictures
+ case Action.ActionType.ACTION_PREV_CHAPTER:
+ case Action.ActionType.ACTION_PREV_ITEM:
+ {
+ if (g_Player.IsPicture)
+ {