Skip to content

Commit

Permalink
Updated MPEI so works with silent switch
Browse files Browse the repository at this point in the history
Updated Skin files to display DVD cover
Undid the yellow background for missing artwork and went to highlight text in red.
Fixed clearing of missing artwork highlight, missed in some circumstances
  • Loading branch information
[email protected] committed Jan 26, 2013
1 parent 43c90da commit 8d9bd05
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 130 deletions.
44 changes: 5 additions & 39 deletions MPEI/mvCentral.xmp2
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ Click Next to continue or Cancel to exit Setup.</Value>
<Params>
<Items />
</Params>
<ExecuteLocation>AfterPanelHide</ExecuteLocation>
<ExecuteLocation>AfterPanelShow</ExecuteLocation>
</ActionItem>
</Items>
</Actions>
Expand Down Expand Up @@ -709,40 +709,6 @@ Click Next to continue or Cancel to exit Setup.</Value>
<PanelName>Tree View Selector</PanelName>
<WizardButtonsEnum>BackNextCancel</WizardButtonsEnum>
</SectionItem>
<SectionItem Guid="0e8eb28f-e6a0-424f-a982-59edcc976e38" Name="Install Section" ConditionGroup="">
<Params>
<Items>
<SectionParam Name="Header Title">
<Value>Status</Value>
<ValueType>String</ValueType>
<Description>Header title</Description>
</SectionParam>
<SectionParam Name="Header description">
<Value>Please wait while mvCentral is being installed</Value>
<ValueType>String</ValueType>
<Description>Description of section, shown in under section title</Description>
</SectionParam>
<SectionParam Name="Header image">
<Value>Resources\mvCentral-logo.png</Value>
<ValueType>File</ValueType>
<Description>Image in upper right part</Description>
</SectionParam>
</Items>
</Params>
<Actions>
<Items>
<ActionItem Name="InstallFiles" ActionType="InstallFiles" ConditionGroup="">
<Params>
<Items />
</Params>
<ExecuteLocation>AfterPanelShow</ExecuteLocation>
</ActionItem>
</Items>
</Actions>
<IncludedGroups />
<PanelName>Install Section</PanelName>
<WizardButtonsEnum>Next</WizardButtonsEnum>
</SectionItem>
<SectionItem Guid="ce4fe657-5f09-47f7-97fc-f95c2af40bef" Name="Setup Complete" ConditionGroup="">
<Params>
<Items>
Expand Down Expand Up @@ -834,7 +800,7 @@ Click Next to continue or Cancel to exit Setup.</Value>
<Major>1</Major>
<Minor>0</Minor>
<Build>4</Build>
<Revision>436</Revision>
<Revision>439</Revision>
</Version>
<ExtensionDescription>mvCentral is a plugin to catalog and play local Music Videos. Last.FM, Discogs, Allmusic.com and HTBackdrops are used to provide metadata.

Expand Down Expand Up @@ -1539,21 +1505,21 @@ Amended MPEI to allow for selection of skins and installation of play start file
<Param1 />
<UpdateOption>OverwriteIfOlder</UpdateOption>
<LocalFileName>Resources\sidepanel.png</LocalFileName>
<ZipFileName>Installer{CopyFile}\{ef4acd2c-f02b-42b0-93e3-c2a4941865ed}-sidepanel.png</ZipFileName>
<ZipFileName>Installer{CopyFile}\{e566f3e7-c415-493f-a98f-1f6fb0693f8f}-sidepanel.png</ZipFileName>
<DestinationFilename />
</FileItem>
<FileItem InstallType="CopyFile" SystemFile="true" Modified="true">
<Param1 />
<UpdateOption>OverwriteIfOlder</UpdateOption>
<LocalFileName>Resources\mvCentral-logo.png</LocalFileName>
<ZipFileName>Installer{CopyFile}\{981a1d36-6984-414d-8527-1b5403a30f34}-mvCentral-logo.png</ZipFileName>
<ZipFileName>Installer{CopyFile}\{c804f9d7-d76e-4a00-aad6-05bda5ad09a5}-mvCentral-logo.png</ZipFileName>
<DestinationFilename />
</FileItem>
<FileItem InstallType="CopyFile" SystemFile="true" Modified="true">
<Param1 />
<UpdateOption>OverwriteIfOlder</UpdateOption>
<LocalFileName>..\gfx\mvCentral-logo.png</LocalFileName>
<ZipFileName>Installer{CopyFile}\{881a1e30-d8d5-461e-bb5a-33aff9eb2313}-mvCentral-logo.png</ZipFileName>
<ZipFileName>Installer{CopyFile}\{097f54a8-d7d9-4f4d-a822-1d581b3d24db}-mvCentral-logo.png</ZipFileName>
<DestinationFilename />
</FileItem>
</Items>
Expand Down
2 changes: 1 addition & 1 deletion Skin/Default/mvCentral.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<texture flipY="true" diffuse="Thumb_Mask2.png">#selectedthumb</texture>
<animation effect="fade" time="70" reversible="false">visible</animation>
<keepaspectratio>no</keepaspectratio>
<visible>[facadeview.list|facadeview.smallicons|facadeview.largeicons]+[string.equals(#mvCentral.ArtistView,true)|string.equals(#mvCentral.GenreView,true)]</visible>
<visible>[facadeview.list|facadeview.smallicons|facadeview.largeicons]+[string.equals(#mvCentral.ArtistView,true)|string.equals(#mvCentral.GenreView,true)|string.equals(#mvCentral.DVDView,true)]</visible>
</control>
<control>
<description>Image for selected Item (Album)</description>
Expand Down
2 changes: 1 addition & 1 deletion Skin/DefaultWide/mvCentral.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<texture flipY="true" diffuse="Thumb_Mask2.png">#selectedthumb</texture>
<animation effect="fade" time="70" reversible="false">visible</animation>
<keepaspectratio>no</keepaspectratio>
<visible>[facadeview.list|facadeview.smallicons|facadeview.largeicons]+[string.equals(#mvCentral.ArtistView,true)|string.equals(#mvCentral.GenreView,true)]</visible>
<visible>[facadeview.list|facadeview.smallicons|facadeview.largeicons]+[string.equals(#mvCentral.ArtistView,true)|string.equals(#mvCentral.GenreView,true)|string.equals(#mvCentral.DVDView,true)]</visible>
</control>
<control>
<description>Image for selected Item (Album)</description>
Expand Down
2 changes: 1 addition & 1 deletion Skin/StreamedMP/mvCentral.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
<animation effect="fade" time="250" delay="0">WindowClose</animation>
<animation effect="fade" time="250" delay="0">WindowOpen</animation>
<keepaspectratio>no</keepaspectratio>
<visible>[facadeview.list|facadeview.smallicons|facadeview.largeicons]+[string.equals(#mvCentral.ArtistView,true)|string.equals(#mvCentral.AlbumView,true)|string.equals(#mvCentral.GenreView,true)]</visible>
<visible>[facadeview.list|facadeview.smallicons|facadeview.largeicons]+[string.equals(#mvCentral.ArtistView,true)|string.equals(#mvCentral.AlbumView,true)|string.equals(#mvCentral.GenreView,true)|string.equals(#mvCentral.DVDView,true)]</visible>
</control>
<control>
<id>0</id>
Expand Down
2 changes: 1 addition & 1 deletion Skin/Titan/mvCentral.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<animation effect="fade" time="250" delay="0">WindowClose</animation>
<animation effect="fade" time="250" delay="0">WindowOpen</animation>
<keepaspectratio>no</keepaspectratio>
<visible>[facadeview.list|facadeview.smallicons|facadeview.largeicons]+[string.equals(#mvCentral.ArtistView,true)|string.equals(#mvCentral.AlbumView,true)|string.equals(#mvCentral.GenreView,true)]</visible>
<visible>[facadeview.list|facadeview.smallicons|facadeview.largeicons]+[string.equals(#mvCentral.ArtistView,true)|string.equals(#mvCentral.AlbumView,true)|string.equals(#mvCentral.GenreView,true)|string.equals(#mvCentral.DVDView,true)]</visible>
</control>
<control>
<id>1</id>
Expand Down
147 changes: 75 additions & 72 deletions mvCentral/Config/ConfigForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ private void AddMusicVideo(DBTrackInfo mv)
artistItem = new TreeNode(mv.ArtistInfo[0].Artist, 1, 1) {Name = mv.ArtistInfo[0].Artist};

if (mv.ArtistInfo[0].ArtFullPath.Trim() == "")
artistItem.ForeColor = Color.Blue;
artistItem.ForeColor = Color.Red;

mv.ArtistInfo[0].Changed -= new DBBasicInfo.ChangedEventHandler(basicInfoChanged);
mv.ArtistInfo[0].Changed += new DBBasicInfo.ChangedEventHandler(basicInfoChanged);
Expand Down Expand Up @@ -1295,8 +1295,8 @@ private void AddMusicVideo(DBTrackInfo mv)

if (mv.AlbumInfo[0].ArtFullPath.Trim() == "")
{
albumItem.BackColor = Color.Yellow;
if (artistItem != null) artistItem.BackColor = Color.Yellow;
albumItem.ForeColor = Color.Red;
if (artistItem != null) artistItem.ForeColor = Color.Red;
}

mv.AlbumInfo[0].Changed -= new DBBasicInfo.ChangedEventHandler(basicInfoChanged);
Expand All @@ -1312,9 +1312,9 @@ private void AddMusicVideo(DBTrackInfo mv)

if (mv.ArtFullPath.Trim() == "")
{
trackItem.BackColor = Color.Yellow;
if (albumItem != null) albumItem.BackColor = Color.Yellow;
if (artistItem != null) artistItem.BackColor = Color.Yellow;
trackItem.ForeColor = Color.Red;
if (albumItem != null) albumItem.ForeColor = Color.Red;
if (artistItem != null) artistItem.ForeColor = Color.Red;
}

mv.Changed -= new DBBasicInfo.ChangedEventHandler(basicInfoChanged);
Expand Down Expand Up @@ -3203,7 +3203,7 @@ private void tsmGetInfo_Click(object sender, EventArgs e)
if (mv == null) return;


List<DBSourceInfo> r1 = new List<DBSourceInfo>();
var r1 = new List<DBSourceInfo>();
foreach (DBSourceInfo r2 in mvCentralCore.DataProviderManager.AllSources)
{

Expand All @@ -3215,25 +3215,23 @@ private void tsmGetInfo_Click(object sender, EventArgs e)
}
}

SourcePopup sp = new SourcePopup(r1);
if (sp.ShowDialog() == DialogResult.OK)
{
mv.PrimarySource = r1[sp.listBox1.SelectedIndex];
var sp = new SourcePopup(r1);
if (sp.ShowDialog() != DialogResult.OK) return;

// the update process can take a little time, so spawn it off in another thread
ThreadStart actions = delegate
mv.PrimarySource = r1[sp.listBox1.SelectedIndex];
// the update process can take a little time, so spawn it off in another thread
ThreadStart actions = delegate
{
startArtProgressBar();
mv.PrimarySource.Provider.ProgressChanged += (s, args) => updateProgressBar(((ProgressEventArgs)args).Text);
mv.PrimarySource.Provider.GetDetails(mv);
mv.Commit();
stopArtProgressBar();
startArtProgressBar();
mv.PrimarySource.Provider.ProgressChanged += (s, args) => updateProgressBar(((ProgressEventArgs)args).Text);
mv.PrimarySource.Provider.GetDetails(mv);
mv.Commit();
stopArtProgressBar();
};

Thread thread = new Thread(actions);
thread.Name = "DetailsUpdater";
thread.Start();
}
var thread = new Thread(actions);
thread.Name = "DetailsUpdater";
thread.Start();
}
#endregion

Expand Down Expand Up @@ -3293,7 +3291,7 @@ private void cbDisableAlbumSupport_CheckedChanged(object sender, EventArgs e)
/// <param name="e"></param>
private void btLastFMSetup_Click(object sender, EventArgs e)
{
LastFMSetup lfmSetup = new LastFMSetup();
var lfmSetup = new LastFMSetup();
lfmSetup.ShowDialog();
}
/// <summary>
Expand Down Expand Up @@ -3333,56 +3331,51 @@ private void createAlbumToolStripMenuItem_Click(object sender, EventArgs e)
return;
}

DBTrackInfo activeTrack = DBTrackInfo.Get((int)selectedTrack.ID);
DBArtistInfo activeAtrist = DBArtistInfo.Get(CurrentTrack);
var activeTrack = DBTrackInfo.Get((int)selectedTrack.ID);
var activeAtrist = DBArtistInfo.Get(CurrentTrack);

CreateAlbumForTrack createAlbum = new CreateAlbumForTrack(activeTrack);
var createAlbum = new CreateAlbumForTrack(activeTrack);
createAlbum.ShowDialog();
if (createAlbum.exitStatus)
{
// Do we already have this album....
DBAlbumInfo albumCheck = DBAlbumInfo.Get(createAlbum.Album);

if (albumCheck == null)
{
// No existing album - create, lookup details and add to track
List<DBSourceInfo> sourceProviders = new List<DBSourceInfo>();
foreach (DBSourceInfo sourceProvider in mvCentralCore.DataProviderManager.AlbumDetailSources)
{
sourceProviders.Add(sourceProvider);
}
if (!createAlbum.exitStatus) return;
var albumCheck = DBAlbumInfo.Get(createAlbum.Album);

DBAlbumInfo albumToAdd = new DBAlbumInfo();
albumToAdd.Album = createAlbum.Album;
albumToAdd.MdID = createAlbum.AlbumMBID;
albumToAdd.PrimarySource = sourceProviders[0];
albumToAdd.Commit();
activeTrack.AlbumInfo.Add(albumToAdd);
activeTrack.Commit();
albumToAdd.PrimarySource = sourceProviders[0];
albumToAdd.PrimarySource.Provider.GetAlbumDetails((DBBasicInfo)albumToAdd, createAlbum.Album, createAlbum.AlbumMBID);
albumToAdd.Commit();
}
else
{
// Album already exists - add to track
activeTrack.AlbumInfo.Add(albumCheck);
activeTrack.Commit();
}
// Reload and display the library
ReloadList();
if (albumCheck == null)
{
// No existing album - create, lookup details and add to track
var sourceProviders = mvCentralCore.DataProviderManager.AlbumDetailSources.ToList();

// Select and expand the artist
foreach (TreeNode tn in mvLibraryTreeView.Nodes)
{
if (tn.Text == activeAtrist.Artist)
var albumToAdd = new DBAlbumInfo
{
mvLibraryTreeView.SelectedNode = tn;
tn.Expand();
}
}
mvLibraryTreeView.Refresh();
Album = createAlbum.Album,
MdID = createAlbum.AlbumMBID,
PrimarySource = sourceProviders[0]
};
albumToAdd.Commit();
activeTrack.AlbumInfo.Add(albumToAdd);
activeTrack.Commit();
albumToAdd.PrimarySource = sourceProviders[0];
albumToAdd.PrimarySource.Provider.GetAlbumDetails((DBBasicInfo) albumToAdd, createAlbum.Album,
createAlbum.AlbumMBID);
albumToAdd.Commit();
}
else
{
// Album already exists - add to track
activeTrack.AlbumInfo.Add(albumCheck);
activeTrack.Commit();
}
// Reload and display the library
ReloadList();

// Select and expand the artist
foreach (TreeNode tn in mvLibraryTreeView.Nodes.Cast<TreeNode>().Where(tn => tn.Text == activeAtrist.Artist))
{
mvLibraryTreeView.SelectedNode = tn;
tn.Expand();
}
mvLibraryTreeView.Refresh();
// Do we already have this album....
}
/// <summary>
/// On right click set the selected node to the nodce under the cursor
Expand Down Expand Up @@ -3423,7 +3416,7 @@ private void mvLibraryTreeView_MouseUp(object sender, MouseEventArgs e)
private void ResetMissingArtworkHighlight(TreeView treeView, string matchString)
{
// Print each node recursively.
TreeNodeCollection nodes = treeView.Nodes;
var nodes = treeView.Nodes;
foreach (TreeNode mainNode in nodes)
{
if (mainNode.Name != matchString)
Expand All @@ -3439,6 +3432,11 @@ private void ResetMissingArtworkHighlight(TreeView treeView, string matchString)
}
}
}
/// <summary>
/// Reset the Album Nodes
/// </summary>
/// <param name="treeNode"></param>
/// <param name="matchString"></param>
private void ResetAlbumNodes(TreeNode treeNode, string matchString)
{
foreach (TreeNode albumNode in treeNode.Nodes)
Expand All @@ -3456,6 +3454,11 @@ private void ResetAlbumNodes(TreeNode treeNode, string matchString)
}
}
}
/// <summary>
/// Reset the Track Nodes
/// </summary>
/// <param name="treeNode"></param>
/// <param name="matchString"></param>
private void ResetTrackNodes(TreeNode treeNode, string matchString)
{
foreach (TreeNode trackNode in treeNode.Nodes)
Expand All @@ -3474,9 +3477,9 @@ private void ResetTrackNodes(TreeNode treeNode, string matchString)
private void CheckIfAllArtworkComplete(TreeNode libraryNode)
{
var artworkMissing = false;
string artistName;
TreeNode l0Node = null;

var artistName = string.Empty;

//Find The Parant
switch (libraryNode.Level)
Expand Down Expand Up @@ -3514,16 +3517,16 @@ private void CheckIfAllArtworkComplete(TreeNode libraryNode)


if (l0Node == null || artworkMissing) return;
l0Node.BackColor = Color.White;
l0Node.ForeColor = Color.Black;
foreach (TreeNode mvNode in l0Node.Nodes)
{
mvNode.BackColor = Color.White;
mvNode.ForeColor = Color.Black;
foreach (TreeNode mvNodeAlbum in mvNode.Nodes)
{
mvNodeAlbum.BackColor = Color.White;
mvNodeAlbum.ForeColor = Color.Black;
foreach (TreeNode mvTrackNode in mvNodeAlbum.Nodes)
{
mvTrackNode.BackColor = Color.White;
mvTrackNode.ForeColor = Color.Black;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion mvCentral/Database/DatabaseMaintenanceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public static void PerformMusicVideoInformationUpgradeCheck()

#region Upgrades required for 0.7.1

if (mvCentralCore.GetDBVersionNumber() < new Version("0.7.1"))
if (mvCentralCore.GetDbVersionNumber() < new Version("0.7.1"))
{

if (mv.LocalMedia.Count > 0 && mv.LocalMedia[0].ImportPath != null) {
Expand Down
Binary file modified mvCentral/bin/Release/mvCentral.dll
Binary file not shown.
5 changes: 4 additions & 1 deletion mvCentral/mvCentral.csproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<StartAction>Program</StartAction>
<StartProgram>D:\HTPC\MediaPortal\Configuration.exe</StartProgram>
<StartProgram>S:\HTPC\MediaPortal\Configuration.exe</StartProgram>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<StartAction>Project</StartAction>
</PropertyGroup>
</Project>
Loading

0 comments on commit 8d9bd05

Please sign in to comment.