Skip to content

Commit

Permalink
MP1-5235: TvLibrary: Add x64 compatibility to TvMovie plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
epbk committed Feb 6, 2025
1 parent 4d6b455 commit fac6cdd
Show file tree
Hide file tree
Showing 10 changed files with 697 additions and 238 deletions.
13 changes: 9 additions & 4 deletions TvEngine3/TVLibrary/Plugins/TvMovie/TvMovie.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ private static string GetRegistryValueFromValueName(string valueName)
{
string virtualStoreSubKey = Check64bit() ? _virtualStoreRegSubKey64b : _virtualStoreRegSubKey32b;

Log.Debug("TVMovie: Looking for registry setting {0} in {1}", valueName, virtualStoreSubKey);

foreach (String userKeyName in Registry.Users.GetSubKeyNames())
{
using (
Expand All @@ -83,13 +85,13 @@ private static string GetRegistryValueFromValueName(string valueName)
}
catch (Exception ex)
{
Log.Error("TVMovie: Registry lookup for {1} failed: {0}", valueName, ex.Message);
Log.Error("TVMovie: Registry lookup for {0} failed: {1}", valueName, ex.Message);
}

if (string.IsNullOrEmpty(value))
{
Log.Info("TVMovie: Registry setting {1} has no value", valueName);
}
Log.Debug("TVMovie: Registry setting {0} has no value", valueName);
else
Log.Debug("TVMovie: Registry setting {0} has value {1}", valueName, value);

return value;
}
Expand Down Expand Up @@ -155,6 +157,9 @@ [Out] out bool lpSystemInfo

public static bool Check64bit()
{
if (IntPtr.Size > 4) //64bit process
return true;

//IsWow64Process is not supported under Windows2000
if (!OSInfo.OSInfo.XpOrLater())
{
Expand Down
1 change: 1 addition & 0 deletions TvEngine3/TVLibrary/Plugins/TvMovie/TvMovie.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<Compile Include="TvMovie.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TvMovieDatabase.cs" />
<Compile Include="TvMovieDatabaseConnection.cs" />
<Compile Include="TvMovieSetup.cs">
<SubType>UserControl</SubType>
</Compile>
Expand Down
Loading

0 comments on commit fac6cdd

Please sign in to comment.