- Moderator
- #51
i have tested 10-30 min yesterday no error in log
but tested quickly
but tested quickly
Need to figure out these conflicts
protected virtual void SetView(int selectedViewId)
{
bool isVideoWindow = (this.GetID == (int)Window.WINDOW_VIDEOS || this.GetID == (int)Window.WINDOW_VIDEO_TITLE);
/* FIXME Move this logic to Videos / Music for their parts, leave rest here
switch (selectedViewId)
{
case 0: // Shares
{
int nNewWindow;
if (isVideoWindow)
{
nNewWindow = (int)Window.WINDOW_VIDEOS;
}
else
{
nNewWindow = (int)Window.WINDOW_MUSIC_FILES;
}
StateBase.StartWindow = nNewWindow;
if (nNewWindow != GetID)
{
if (isVideoWindow)
{
MediaPortal.GUI.Video.GUIVideoFiles.Reset();
}
GUIWindowManager.ReplaceWindow(nNewWindow);
}
}
break;
case 4540: // Now playing
{
int nPlayingNowWindow = (int)Window.WINDOW_MUSIC_PLAYING_NOW;
MediaPortal.GUI.Music.GUIMusicPlayingNow guiPlayingNow =
(MediaPortal.GUI.Music.GUIMusicPlayingNow)GUIWindowManager.GetWindow(nPlayingNowWindow);
if (guiPlayingNow != null)
{
guiPlayingNow.MusicWindow = (MediaPortal.GUI.Music.GUIMusicBaseWindow)this;
GUIWindowManager.ActivateWindow(nPlayingNowWindow);
}
}
break;
default: // a db view
{
ViewDefinition selectedView = (ViewDefinition)handler.Views[selectedViewId - 1];
handler.CurrentView = selectedView.Name;
StateBase.View = selectedView.Name;
int nNewWindow;
if (isVideoWindow)
{
nNewWindow = (int)Window.WINDOW_VIDEO_TITLE;
// Reset search variables
if (GUIVideoTitle.CurrentViewHistory != handler.CurrentLevelWhere)
{
GUIVideoTitle.IsActorSearch = false;
GUIVideoTitle.IsMovieSearch = false;
GUIVideoTitle.ActorSearchString = string.Empty;
GUIVideoTitle.MovieSearchString = string.Empty;
GUIVideoTitle.MovieSearchDbFieldString = string.Empty;
}
}
else
{
nNewWindow = (int)Window.WINDOW_MUSIC_GENRE;
}
if (GetID != nNewWindow)
{
StateBase.StartWindow = nNewWindow;
if (nNewWindow != GetID)
{
GUIWindowManager.ReplaceWindow(nNewWindow);
}
}
else
{
LoadDirectory(string.Empty);
if (facadeLayout.Count <= 0)
{
GUIControl.FocusControl(GetID, btnLayouts.GetID);
}
}
}
break;
}
*/
}
Not sure, I tried to stay out of it when they refactored everything to create this windowpluginbase class.I really need your help to figure out commented code in here:
Can you tell me how all of this should be done without breaking anything? WindowPluginBase.cs cannot reference anymore to Videos or MyMusic since it should not know anything about plugins.