1,231 changes: 1,231 additions & 0 deletions mythtv/programs/mythfrontend/editvideometadata.cpp

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions mythtv/programs/mythfrontend/editvideometadata.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
#ifndef EDITVIDEOMETADATA_H_
#define EDITVIDEOMETADATA_H_

#include "mythscreentype.h"
#include "metadatacommon.h"
#include "metadatadownload.h"
#include "metadataimagedownload.h"

class VideoMetadata;
class VideoMetadataListManager;
class MythUIButtonList;
class MythUIButtonListItem;
class MythUIText;
class MythUITextEdit;
class MythUIButton;
class MythUISpinBox;
class MythUICheckBox;

class EditMetadataDialog : public MythScreenType
{
Q_OBJECT

public:
EditMetadataDialog(MythScreenStack *lparent,
QString lname,
VideoMetadata *source_metadata,
const VideoMetadataListManager &cache);
~EditMetadataDialog();

bool Create();
void customEvent(QEvent *levent);

void fillWidgets();

protected:
void createBusyDialog(QString title);

signals:
void Finished();

public slots:
void SaveAndExit();
void SetTitle();
void SetSubtitle();
void SetTagline();
void SetRating();
void SetDirector();
void SetInetRef();
void SetHomepage();
void SetPlot();
void SetYear();
void SetUserRating();
void SetLength();
void SetCategory(MythUIButtonListItem*);
void SetPlayer();
void SetSeason();
void SetEpisode();
void SetLevel(MythUIButtonListItem*);
void SetChild(MythUIButtonListItem*);
void ToggleBrowse();
void ToggleWatched();
void FindCoverArt();
void FindBanner();
void FindFanart();
void FindScreenshot();
void FindTrailer();
void NewCategoryPopup();
void AddCategory(QString category);
void SetCoverArt(QString file);
void SetBanner(QString file);
void SetFanart(QString file);
void SetScreenshot(QString file);
void SetTrailer(QString file);
void FindNetArt(VideoArtworkType type);
void FindNetCoverArt();
void FindNetBanner();
void FindNetFanart();
void FindNetScreenshot();
void OnSearchListSelection(ArtworkInfo info,
VideoArtworkType type);

private:
void OnArtworkSearchDone(MetadataLookup *lookup);
void handleDownloadedImages(MetadataLookup *lookup);

VideoMetadata *m_workingMetadata;
VideoMetadata *m_origMetadata;

//
// GUI stuff
//

MythUITextEdit *m_titleEdit;
MythUITextEdit *m_subtitleEdit;
MythUITextEdit *m_taglineEdit;
MythUITextEdit *m_playerEdit;
MythUITextEdit *m_ratingEdit;
MythUITextEdit *m_directorEdit;
MythUITextEdit *m_inetrefEdit;
MythUITextEdit *m_homepageEdit;
MythUITextEdit *m_plotEdit;

MythUISpinBox *m_seasonSpin;
MythUISpinBox *m_episodeSpin;
MythUISpinBox *m_yearSpin;
MythUISpinBox *m_userRatingSpin;
MythUISpinBox *m_lengthSpin;
MythUIButtonList *m_categoryList;
MythUIButtonList *m_levelList;
MythUIButtonList *m_childList;
MythUICheckBox *m_browseCheck;
MythUICheckBox *m_watchedCheck;
MythUIButton *m_coverartButton;
MythUIText *m_coverartText;
MythUIButton *m_screenshotButton;
MythUIText *m_screenshotText;
MythUIButton *m_bannerButton;
MythUIText *m_bannerText;
MythUIButton *m_fanartButton;
MythUIText *m_fanartText;
MythUIButton *m_trailerButton;
MythUIText *m_trailerText;
MythUIButton *m_netCoverartButton;
MythUIButton *m_netFanartButton;
MythUIButton *m_netBannerButton;
MythUIButton *m_netScreenshotButton;
MythUIImage *m_coverart;
MythUIImage *m_screenshot;
MythUIImage *m_banner;
MythUIImage *m_fanart;
MythUIButton *m_doneButton;

//
// Remember video-to-play-next index number when the user is toggling
// child videos on and off
//

int cachedChildSelection;

const VideoMetadataListManager &m_metaCache;
MetadataDownload *m_query;
MetadataImageDownload *m_imageDownload;

MythUIBusyDialog *m_busyPopup;
MythScreenStack *m_popupStack;
};

#endif
348 changes: 348 additions & 0 deletions mythtv/programs/mythfrontend/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ using namespace std;
#include "backendconnectionmanager.h"
#include "themechooser.h"

// Video
#include "cleanup.h"
#include "globals.h"
#include "videodlg.h"
#include "videoglobalsettings.h"
#include "videofileassoc.h"
#include "videoplayersettings.h"
#include "videometadatasettings.h"
#include "videolist.h"


static ExitPrompter *exitPopup = NULL;
static MythThemedMenu *menu;

Expand All @@ -84,6 +95,61 @@ static void handleExit(void);

namespace
{
class RunSettingsCompletion : public QObject
{
Q_OBJECT

public:
static void Create(bool check)
{
new RunSettingsCompletion(check);
}

private:
RunSettingsCompletion(bool check)
{
if (check)
{
connect(&m_plcc,
SIGNAL(SigResultReady(bool, ParentalLevel::Level)),
SLOT(OnPasswordResultReady(bool,
ParentalLevel::Level)));
m_plcc.Check(ParentalLevel::plMedium, ParentalLevel::plHigh);
}
else
{
OnPasswordResultReady(true, ParentalLevel::plHigh);
}
}

~RunSettingsCompletion() {}

private slots:
void OnPasswordResultReady(bool passwordValid,
ParentalLevel::Level newLevel)
{
(void) newLevel;

if (passwordValid)
{
VideoGeneralSettings settings;
settings.exec();
}
else
{
VERBOSE(VB_IMPORTANT,
QObject::tr("Aggressive Parental Controls Warning: "
"invalid password. An attempt to enter a "
"MythVideo settings screen was prevented."));
}

deleteLater();
}

public:
ParentalLevelChangeChecker m_plcc;
};

class BookmarkDialog : MythScreenType
{
public:
Expand Down Expand Up @@ -500,6 +566,200 @@ static void showStatus(void)
delete statusbox;
}

static void RunVideoScreen(VideoDialog::DialogType type, bool fromJump = false)
{
QString message = QObject::tr("Loading videos ...");

MythScreenStack *popupStack =
GetMythMainWindow()->GetStack("popup stack");

MythUIBusyDialog *busyPopup = new MythUIBusyDialog(message,
popupStack, "mythvideobusydialog");

if (busyPopup->Create())
popupStack->AddScreen(busyPopup, false);

MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();

VideoDialog::VideoListPtr video_list;
if (fromJump)
{
VideoDialog::VideoListDeathDelayPtr &saved =
VideoDialog::GetSavedVideoList();
if (!saved.isNull())
{
video_list = saved->GetSaved();
}
}

VideoDialog::BrowseType browse = static_cast<VideoDialog::BrowseType>(
gCoreContext->GetNumSetting("mythvideo.db_group_type",
VideoDialog::BRS_FOLDER));

if (!video_list)
video_list = new VideoList;

VideoDialog *mythvideo =
new VideoDialog(mainStack, "mythvideo", video_list, type, browse);

if (mythvideo->Create())
{
busyPopup->Close();
mainStack->AddScreen(mythvideo);
}
else
busyPopup->Close();
}

static void jumpScreenVideoManager() { RunVideoScreen(VideoDialog::DLG_MANAGER, true); }
static void jumpScreenVideoBrowser() { RunVideoScreen(VideoDialog::DLG_BROWSER, true); }
static void jumpScreenVideoTree() { RunVideoScreen(VideoDialog::DLG_TREE, true); }
static void jumpScreenVideoGallery() { RunVideoScreen(VideoDialog::DLG_GALLERY, true); }
static void jumpScreenVideoDefault() { RunVideoScreen(VideoDialog::DLG_DEFAULT, true); }

QString gDVDdevice;

static void playDisc()
{
//
// Get the command string to play a DVD
//

bool isBD = false;

QString command_string =
gCoreContext->GetSetting("mythdvd.DVDPlayerCommand");
QString bluray_mountpoint =
gCoreContext->GetSetting("BluRayMountpoint", "/media/cdrom");
QDir bdtest(bluray_mountpoint + "/BDMV");

if (bdtest.exists())
isBD = true;

if (isBD)
{
GetMythUI()->AddCurrentLocation("playdisc");

QString filename = QString("bd:/%1/").arg(bluray_mountpoint);

GetMythMainWindow()->HandleMedia("Internal", filename);

GetMythUI()->RemoveCurrentLocation();
}
else
{
QString dvd_device = gDVDdevice;

if (dvd_device.isEmpty())
dvd_device = MediaMonitor::defaultDVDdevice();

if (dvd_device.isEmpty())
return; // User cancelled in the Popup

GetMythUI()->AddCurrentLocation("playdisc");

if ((command_string.indexOf("internal", 0, Qt::CaseInsensitive) > -1) ||
(command_string.length() < 1))
{
#ifdef Q_OS_MAC
// Convert a BSD 'leaf' name into a raw device path
QString filename = "dvd://dev/r"; // e.g. 'dvd://dev/rdisk2'
#elif USING_MINGW
QString filename = "dvd:"; // e.g. 'dvd:E\\'
#else
QString filename = "dvd:/"; // e.g. 'dvd://dev/sda'
#endif
filename += dvd_device;

command_string = "Internal";
GetMythMainWindow()->HandleMedia(command_string, filename);
GetMythUI()->RemoveCurrentLocation();

return;
}
else
{
if (command_string.contains("%d"))
{
//
// Need to do device substitution
//
command_string =
command_string.replace(QRegExp("%d"), dvd_device);
}
sendPlaybackStart();
myth_system(command_string);
sendPlaybackEnd();
if (GetMythMainWindow())
{
GetMythMainWindow()->raise();
GetMythMainWindow()->activateWindow();
if (GetMythMainWindow()->currentWidget())
GetMythMainWindow()->currentWidget()->setFocus();
}
}
GetMythUI()->RemoveCurrentLocation();
}
}

/////////////////////////////////////////////////
//// Media handlers
/////////////////////////////////////////////////
static void handleDVDMedia(MythMediaDevice *dvd)
{
if (!dvd)
return;

QString newDevice = dvd->getDevicePath();

// Device insertion. Store it for later use
if (dvd->isUsable())
if (gDVDdevice.length() && gDVDdevice != newDevice)
{
// Multiple DVD devices. Clear the old one so the user has to
// select a disk to play (in MediaMonitor::defaultDVDdevice())

VERBOSE(VB_MEDIA, "MythVideo: Multiple DVD drives? Forgetting "
+ gDVDdevice);
gDVDdevice.clear();
}
else
{
gDVDdevice = newDevice;
VERBOSE(VB_MEDIA,
"MythVideo: Storing DVD device " + gDVDdevice);
}
else
{
// Ejected/unmounted/error.

if (gDVDdevice.length() && gDVDdevice == newDevice)
{
VERBOSE(VB_MEDIA,
"MythVideo: Forgetting existing DVD " + gDVDdevice);
gDVDdevice.clear();
}

return;
}

switch (gCoreContext->GetNumSetting("DVDOnInsertDVD", 1))
{
case 0 : // Do nothing
break;
case 1 : // Display menu (mythdvd)*/
GetMythMainWindow()->JumpTo("Main Menu");
break;
case 2 : // play DVD or Blu-ray
GetMythMainWindow()->JumpTo("Main Menu");
playDisc();
break;
default:
VERBOSE(VB_IMPORTANT, "mythdvd main.o: handleMedia() does not "
"know what to do");
}
}

static void TVMenuCallback(void *data, QString &selection)
{
(void)data;
Expand Down Expand Up @@ -689,6 +949,50 @@ static void TVMenuCallback(void *data, QString &selection)
else
delete msee;
}
else if (sel == "video_settings_general")
{
RunSettingsCompletion::Create(gCoreContext->
GetNumSetting("VideoAggressivePC", 0));
}
else if (sel == "video_settings_player")
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();

PlayerSettings *ps = new PlayerSettings(mainStack, "player settings");

if (ps->Create())
mainStack->AddScreen(ps);
}
else if (sel == "video_settings_metadata")
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();

MetadataSettings *ms = new MetadataSettings(mainStack, "metadata settings");

if (ms->Create())
mainStack->AddScreen(ms);
}
else if (sel == "video_settings_associations")
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();

FileAssocDialog *fa = new FileAssocDialog(mainStack, "fa dialog");

if (fa->Create())
mainStack->AddScreen(fa);
}
if (sel == "manager")
RunVideoScreen(VideoDialog::DLG_MANAGER);
else if (sel == "browser")
RunVideoScreen(VideoDialog::DLG_BROWSER);
else if (sel == "listing")
RunVideoScreen(VideoDialog::DLG_TREE);
else if (sel == "gallery")
RunVideoScreen(VideoDialog::DLG_GALLERY);
else if (sel == "disc_play")
{
playDisc();
}
else if (sel == "tv_status")
showStatus();
else if (sel == "exiting_app")
Expand Down Expand Up @@ -772,6 +1076,9 @@ static void WriteDefaults()
GeneralRecPrioritiesSettings grs;
grs.Load();
grs.Save();
VideoGeneralSettings vgs;
vgs.Load();
vgs.Save();
}

static int internal_play_media(const QString &mrl, const QString &plot,
Expand Down Expand Up @@ -977,6 +1284,45 @@ static void InitJumpPoints(void)
REG_JUMP(QT_TRANSLATE_NOOP("MythControls", "Previously Recorded"),
"", "", startPrevious);

// Video

REG_JUMP(JUMP_VIDEO_DEFAULT, QT_TRANSLATE_NOOP("MythControls",
"The Video default view"), "", jumpScreenVideoDefault);
REG_JUMP(JUMP_VIDEO_MANAGER, QT_TRANSLATE_NOOP("MythControls",
"The Video video manager"), "", jumpScreenVideoManager);
REG_JUMP(JUMP_VIDEO_BROWSER, QT_TRANSLATE_NOOP("MythControls",
"The Video video browser"), "", jumpScreenVideoBrowser);
REG_JUMP(JUMP_VIDEO_TREE, QT_TRANSLATE_NOOP("MythControls",
"The Video video listings"), "", jumpScreenVideoTree);
REG_JUMP(JUMP_VIDEO_GALLERY, QT_TRANSLATE_NOOP("MythControls",
"The Video video gallery"), "", jumpScreenVideoGallery);
REG_JUMP("Play Disc", QT_TRANSLATE_NOOP("MythControls",
"Play an Optical Disc"), "", playDisc);

REG_KEY("Video","PLAYALT", QT_TRANSLATE_NOOP("MythControls",
"Play selected item in alternate player"), "ALT+P");
REG_KEY("Video","FILTER", QT_TRANSLATE_NOOP("MythControls",
"Open video filter dialog"), "F");
REG_KEY("Video","BROWSE", QT_TRANSLATE_NOOP("MythControls",
"Change browsable in video manager"), "B");
REG_KEY("Video","INCPARENT", QT_TRANSLATE_NOOP("MythControls",
"Increase Parental Level"), "],},F11");
REG_KEY("Video","DECPARENT", QT_TRANSLATE_NOOP("MythControls",
"Decrease Parental Level"), "[,{,F10");
REG_KEY("Video","INCSEARCH", QT_TRANSLATE_NOOP("MythControls",
"Show Incremental Search Dialog"), "Ctrl+S");
REG_KEY("Video","DOWNLOADDATA", QT_TRANSLATE_NOOP("MythControls",
"Download metadata for current item"), "W");
REG_KEY("Video","ITEMDETAIL", QT_TRANSLATE_NOOP("MythControls",
"Display Item Detail Popup"), "");
REG_KEY("Video","HOME", QT_TRANSLATE_NOOP("MythControls",
"Go to the first video"), "Home");
REG_KEY("Video","END", QT_TRANSLATE_NOOP("MythControls",
"Go to the last video"), "End");
REG_MEDIA_HANDLER(QT_TRANSLATE_NOOP("MythControls",
"MythDVD DVD Media Handler"), "", "", handleDVDMedia,
MEDIATYPE_DVD, QString::null);

REG_JUMPEX(QT_TRANSLATE_NOOP("MythControls", "Toggle Show Widget Borders"),
"", "", setDebugShowBorders, false);
REG_JUMPEX(QT_TRANSLATE_NOOP("MythControls", "Toggle Show Widget Names"),
Expand Down Expand Up @@ -1332,4 +1678,6 @@ int main(int argc, char **argv)
return ret;

}

#include "main.moc"
/* vim: set expandtab tabstop=4 shiftwidth=4: */
14 changes: 12 additions & 2 deletions mythtv/programs/mythfrontend/mythfrontend.pro
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ HEADERS += proglist.h proglist_helpers.h
HEADERS += playbackboxhelper.h viewschedulediff.h
HEADERS += themechooser.h setupwizard_general.h
HEADERS += setupwizard_audio.h setupwizard_video.h
HEADERS += grabbersettings.h
HEADERS += grabbersettings.h editvideometadata.h
HEADERS += videofileassoc.h videometadatasettings.h
HEADERS += videoplayercommand.h videopopups.h
HEADERS += videofilter.h videolist.h
HEADERS += videoplayersettings.h videodlg.h
HEADERS += videoglobalsettings.h

SOURCES += main.cpp playbackbox.cpp viewscheduled.cpp audiogeneralsettings.cpp
SOURCES += globalsettings.cpp manualschedule.cpp programrecpriority.cpp
Expand All @@ -48,7 +53,12 @@ SOURCES += proglist.cpp proglist_helpers.cpp
SOURCES += playbackboxhelper.cpp viewschedulediff.cpp
SOURCES += themechooser.cpp setupwizard_general.cpp
SOURCES += setupwizard_audio.cpp setupwizard_video.cpp
SOURCES += grabbersettings.cpp
SOURCES += grabbersettings.cpp editvideometadata.cpp
SOURCES += videofileassoc.cpp videometadatasettings.cpp
SOURCES += videoplayercommand.cpp videopopups.cpp
SOURCES += videofilter.cpp videolist.cpp
SOURCES += videoplayersettings.cpp videodlg.cpp
SOURCES += videoglobalsettings.cpp

macx {
mac_bundle {
Expand Down
4,002 changes: 4,002 additions & 0 deletions mythtv/programs/mythfrontend/videodlg.cpp

Large diffs are not rendered by default.

230 changes: 230 additions & 0 deletions mythtv/programs/mythfrontend/videodlg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
#ifndef VIDEODLG_H_
#define VIDEODLG_H_

#include <QPointer>
#include <QStringList>

#include "mythscreentype.h"

#include "metadatacommon.h"
#include "parentalcontrols.h"
#include "quicksp.h"

class MythUIText;
class MythUIButtonList;
class MythUIButtonTree;
class MythUIButtonListItem;
class MythUIBusyDialog;
class MythUIImage;
class MythUIStateType;
class MythDialogBox;
class MythGenericTree;
class MetadataDownload;
class MetadataImageDownload;
class VideoMetadata;
class VideoScanner;

class QUrl;

enum ImageDownloadErrorState { esOK, esError, esTimeout };

class VideoDialog : public MythScreenType
{
Q_OBJECT

public:
enum DialogType { DLG_DEFAULT = 0, DLG_BROWSER = 0x1, DLG_GALLERY = 0x2,
DLG_TREE = 0x4, DLG_MANAGER = 0x8, dtLast };

enum BrowseType { BRS_FOLDER = 0, BRS_GENRE = 0x1, BRS_CATEGORY = 0x2,
BRS_YEAR = 0x4, BRS_DIRECTOR = 0x8, BRS_CAST = 0x10,
BRS_USERRATING = 0x20, BRS_INSERTDATE = 0x40,
BRS_TVMOVIE = 0x80, BRS_STUDIO = 0x100, btLast };

typedef simple_ref_ptr<class VideoList> VideoListPtr;

typedef QPointer<class VideoListDeathDelay> VideoListDeathDelayPtr;

static VideoListDeathDelayPtr &GetSavedVideoList();

public:
VideoDialog(MythScreenStack *lparent, QString lname,
VideoListPtr video_list, DialogType type,
BrowseType browse);
~VideoDialog();

bool Create();
bool keyPressEvent(QKeyEvent *levent);

private:
void searchStart();

public slots:
void searchComplete(QString string);

protected slots:
void Init(); /// Called after the screen is created by MythScreenStack

private slots:
void UpdatePosition();
void UpdateText(MythUIButtonListItem *);
void handleSelect(MythUIButtonListItem *);
void SetCurrentNode(MythGenericTree *);

void playVideo();
void playVideoAlt();
void playFolder();
void playVideoWithTrailers();
void playTrailer();

void SwitchTree();
void SwitchGallery();
void SwitchBrowse();
void SwitchManager();
void SwitchVideoFolderGroup();
void SwitchVideoGenreGroup();
void SwitchVideoCategoryGroup();
void SwitchVideoYearGroup();
void SwitchVideoDirectorGroup();
void SwitchVideoStudioGroup();
void SwitchVideoCastGroup();
void SwitchVideoUserRatingGroup();
void SwitchVideoInsertDateGroup();
void SwitchVideoTVMovieGroup();

void EditMetadata();
void VideoSearch(MythGenericTree *node = NULL,
bool automode = false);
void VideoAutoSearch(MythGenericTree *node = NULL);
void ResetMetadata();
void ToggleWatched();
void ToggleProcess();
void RemoveVideo();
void OnRemoveVideo(bool);

void VideoMenu();
void InfoMenu();
void ManageMenu();
void PlayMenu();
void DisplayMenu();
void ViewMenu();
void SettingsMenu();
void MetadataBrowseMenu();

void ChangeFilter();

void ToggleBrowseMode();
void ToggleFlatView();

void ViewPlot();
void ShowCastDialog();
void ShowHomepage();
bool DoItemDetailShow();
void ShowPlayerSettings();
void ShowExtensionSettings();
void ShowMetadataSettings();

void OnParentalChange(int amount);

// Called when the underlying data for an item changes
void OnVideoSearchListSelection(MetadataLookup *lookup);

void doVideoScan();

protected slots:
void reloadAllData(bool);
void reloadData();
void refreshData();
void UpdateItem(MythUIButtonListItem *item);

protected:
void customEvent(QEvent *levent);

virtual MythUIButtonListItem *GetItemCurrent();
virtual MythUIButtonListItem *GetItemByMetadata(VideoMetadata *metadata);

virtual void loadData();
void fetchVideos();
QString RemoteImageCheck(QString host, QString filename);
QString GetCoverImage(MythGenericTree *node);
QString GetFirstImage(MythGenericTree *node, QString type,
QString gpnode = QString(), int levels = 0);
QString GetImageFromFolder(VideoMetadata *metadata);
QString GetScreenshot(MythGenericTree *node);
QString GetBanner(MythGenericTree *node);
QString GetFanart(MythGenericTree *node);

void handleDownloadedImages(MetadataLookup *lookup);

VideoMetadata *GetMetadata(MythUIButtonListItem *item);

void handleDirSelect(MythGenericTree *node);
bool goBack();
void setParentalLevel(const ParentalLevel::Level &level);
void shiftParental(int amount);
bool createPopup();
void createBusyDialog(QString title);
void createOkDialog(QString title);

void SwitchLayout(DialogType type, BrowseType browse);

void StartVideoImageSet(MythGenericTree *node, QStringList coverart = QStringList(),
QStringList fanart = QStringList(), QStringList banner = QStringList(),
QStringList screenshot = QStringList());

private slots:

void OnVideoImageSetDone(VideoMetadata *metadata);
void OnVideoSearchDone(MetadataLookup *lookup);

private:
MythDialogBox *m_menuPopup;
MythUIBusyDialog *m_busyPopup;
MythScreenStack *m_popupStack;
MythScreenStack *m_mainStack;

MythUIButtonList *m_videoButtonList;
MythUIButtonTree *m_videoButtonTree;

MythUIText *m_titleText;
MythUIText *m_novideoText;

MythUIText *m_positionText;
MythUIText *m_crumbText;

MythUIImage *m_coverImage;
MythUIImage *m_screenshot;
MythUIImage *m_banner;
MythUIImage *m_fanart;

MythUIStateType *m_trailerState;
MythUIStateType *m_parentalLevelState;
MythUIStateType *m_videoLevelState;
MythUIStateType *m_userRatingState;
MythUIStateType *m_watchedState;
MythUIStateType *m_studioState;

MetadataDownload *m_query;
MetadataImageDownload *m_imageDownload;

class VideoDialogPrivate *m_d;
};

class VideoListDeathDelay : public QObject
{
Q_OBJECT

public:
VideoListDeathDelay(VideoDialog::VideoListPtr toSave);
~VideoListDeathDelay();

VideoDialog::VideoListPtr GetSaved();

private slots:
void OnTimeUp();

private:
class VideoListDeathDelayPrivate *m_d;
};

#endif
541 changes: 541 additions & 0 deletions mythtv/programs/mythfrontend/videofileassoc.cpp

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions mythtv/programs/mythfrontend/videofileassoc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#ifndef VIDEOFILEASSOC_H_
#define VIDEOFILEASSOC_H_

#include "mythscreentype.h"

class MythScreenStack;
class MythUIButtonListItem;
class MythUITextEdit;
class MythUIButtonList;
class MythUICheckBox;
class MythUIButton;

class FileAssocDialog : public MythScreenType
{
Q_OBJECT

public:
FileAssocDialog(MythScreenStack *screeParent, const QString &lname);
~FileAssocDialog();

bool Create();

public slots:
void OnFASelected(MythUIButtonListItem *item);

void OnUseDefaltChanged();
void OnIgnoreChanged();
void OnPlayerCommandChanged();

void OnDonePressed();
void OnDeletePressed();
void OnNewExtensionPressed();

void OnNewExtensionComplete(QString newExtension);

private:
void UpdateScreen(bool useSelectionOverride = false);

private:
MythUITextEdit *m_commandEdit;
MythUIButtonList *m_extensionList;
MythUICheckBox *m_defaultCheck;
MythUICheckBox *m_ignoreCheck;
MythUIButton *m_doneButton;
MythUIButton *m_newButton;
MythUIButton *m_deleteButton;

class FileAssocDialogPrivate *m_private;
};

#endif
922 changes: 922 additions & 0 deletions mythtv/programs/mythfrontend/videofilter.cpp

Large diffs are not rendered by default.

275 changes: 275 additions & 0 deletions mythtv/programs/mythfrontend/videofilter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
#ifndef VIDEOFILTER_H_
#define VIDEOFILTER_H_

#include "mythscreentype.h"
#include "parentalcontrols.h"

class MythUIButtonList;
class MythUIButtonListItem;
class MythUIButton;
class MythUIText;

class VideoMetadata;
class VideoList;

class VideoFilterSettings
{
public:
static const unsigned int FILTER_MASK = 0xFFFE;
static const unsigned int SORT_MASK = 0x1;
enum FilterChanges {
kSortOrderChanged = (1 << 0),
kFilterCategoryChanged = (1 << 1),
kFilterGenreChanged = (1 << 2),
kFilterCountryChanged = (1 << 3),
kFilterYearChanged = (1 << 4),
kFilterRuntimeChanged = (1 << 5),
kFilterUserRatingChanged = (1 << 6),
kFilterBrowseChanged = (1 << 7),
kFilterInetRefChanged = (1 << 8),
kFilterCoverFileChanged = (1 << 9),
kFilterParentalLevelChanged = (1 << 10),
kFilterCastChanged = (1 << 11),
kFilterWatchedChanged = (1 << 12),
kFilterTextFilterChanged = (1 << 13)
};

public:
VideoFilterSettings(bool loaddefaultsettings = true,
const QString &_prefix = "");
VideoFilterSettings(const VideoFilterSettings &rhs);
VideoFilterSettings &operator=(const VideoFilterSettings &rhs);

bool matches_filter(const VideoMetadata &mdata) const;
bool meta_less_than(const VideoMetadata &lhs, const VideoMetadata &rhs,
bool sort_ignores_case) const;

void saveAsDefault();

enum ordering
{
// These values must be explicitly assigned; they represent
// database values
kOrderByTitle = 0,
kOrderByYearDescending = 1,
kOrderByUserRatingDescending = 2,
kOrderByLength = 3,
kOrderByFilename = 4,
kOrderByID = 5,
kOrderBySeasonEp = 6,
kOrderByDateAddedDescending = 7
};

int GetCategory() const { return category; }
void SetCategory(int lcategory)
{
m_changed_state |= kFilterCategoryChanged;
category = lcategory;
}

int getGenre() const { return genre; }
void setGenre(int lgenre)
{
m_changed_state |= kFilterGenreChanged;
genre = lgenre;
}

int GetCast() const { return cast; }
void SetCast(int lcast)
{
m_changed_state |= kFilterCastChanged;
cast = lcast;
}

int getCountry() const { return country; }
void setCountry(int lcountry)
{
m_changed_state |= kFilterCountryChanged;
country = lcountry;
}

int getYear() const { return year; }
void SetYear(int lyear)
{
m_changed_state |= kFilterYearChanged;
year = lyear;
}

int getRuntime() const { return runtime; }
void setRuntime(int lruntime)
{
m_changed_state |= kFilterRuntimeChanged;
runtime = lruntime;
}

int GetUserRating() const { return userrating; }
void SetUserRating(int luserrating)
{
m_changed_state |= kFilterUserRatingChanged;
userrating = luserrating;
}

int GetBrowse() const {return browse; }
void SetBrowse(int lbrowse)
{
m_changed_state |= kFilterBrowseChanged;
browse = lbrowse;
}

int GetWatched() const {return watched; }
void SetWatched(int lwatched)
{
m_changed_state |= kFilterWatchedChanged;
watched = lwatched;
}

ordering getOrderby() const { return orderby; }
void setOrderby(ordering lorderby)
{
m_changed_state |= kSortOrderChanged;
orderby = lorderby;
}

QString getTextFilter() const { return textfilter; }
void setTextFilter(QString val);

ParentalLevel::Level getParentalLevel() const { return m_parental_level; }
void setParentalLevel(ParentalLevel::Level parental_level)
{
m_changed_state |= kFilterParentalLevelChanged;
m_parental_level = parental_level;
}

int getInteRef() const { return m_inetref; }
void SetInetRef(int inetref)
{
m_inetref = inetref;
m_changed_state |= kFilterInetRefChanged;
}

int GetCoverFile() const { return m_coverfile; }
void SetCoverFile(int coverfile)
{
m_coverfile = coverfile;
m_changed_state |= kFilterCoverFileChanged;
}

unsigned int getChangedState()
{
unsigned int ret = m_changed_state;
m_changed_state = 0;
return ret;
}

private:
int category;
int genre;
int country;
int cast;
int year;
int runtime;
int userrating;
int browse;
int watched;
int m_inetref;
int m_coverfile;
ordering orderby;
ParentalLevel::Level m_parental_level;
QString prefix;
QString textfilter;
int season;
int episode;
QDate insertdate;
QRegExp re_season;
QRegExp re_date;


unsigned int m_changed_state;
};

struct FilterSettingsProxy
{
virtual ~FilterSettingsProxy() {}
virtual const VideoFilterSettings &getSettings() = 0;
virtual void setSettings(const VideoFilterSettings &settings) = 0;
};

template <typename T>
class BasicFilterSettingsProxy : public FilterSettingsProxy
{
public:
BasicFilterSettingsProxy(T &type) : m_type(type) {}

const VideoFilterSettings &getSettings()
{
return m_type.getCurrentVideoFilter();
}

void setSettings(const VideoFilterSettings &settings)
{
m_type.setCurrentVideoFilter(settings);
}

private:
T &m_type;
};

class VideoFilterDialog : public MythScreenType
{

Q_OBJECT

public:
VideoFilterDialog( MythScreenStack *lparent, QString lname,
VideoList *video_list);
~VideoFilterDialog();

bool Create();

signals:
void filterChanged();

public slots:
void saveAndExit();
void saveAsDefault();
void SetYear(MythUIButtonListItem *item);
void SetUserRating(MythUIButtonListItem *item);
void SetCategory(MythUIButtonListItem *item);
void setCountry(MythUIButtonListItem *item);
void setGenre(MythUIButtonListItem *item);
void SetCast(MythUIButtonListItem *item);
void setRunTime(MythUIButtonListItem *item);
void SetBrowse(MythUIButtonListItem *item);
void SetWatched(MythUIButtonListItem *item);
void SetInetRef(MythUIButtonListItem *item);
void SetCoverFile(MythUIButtonListItem *item);
void setOrderby(MythUIButtonListItem *item);
void setTextFilter();

private:
void fillWidgets();
void update_numvideo();
VideoFilterSettings m_settings;

MythUIButtonList *m_browseList;
MythUIButtonList *m_watchedList;
MythUIButtonList *m_orderbyList;
MythUIButtonList *m_yearList;
MythUIButtonList *m_userratingList;
MythUIButtonList *m_categoryList;
MythUIButtonList *m_countryList;
MythUIButtonList *m_genreList;
MythUIButtonList *m_castList;
MythUIButtonList *m_runtimeList;
MythUIButtonList *m_inetrefList;
MythUIButtonList *m_coverfileList;
MythUIButton *m_saveButton;
MythUIButton *m_doneButton;
MythUIText *m_numvideosText;
MythUITextEdit *m_textfilter;

const VideoList &m_videoList;
FilterSettingsProxy *m_fsp;
};

#endif
313 changes: 313 additions & 0 deletions mythtv/programs/mythfrontend/videoglobalsettings.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
#include <map>
#include <vector>

#include <QDir>

#include "mythdirs.h"
#include "globals.h"

#include "videodlg.h"
#include "videoglobalsettings.h"

namespace
{
// General Settings
HostComboBox *VideoDefaultParentalLevel()
{
HostComboBox *gc = new HostComboBox("VideoDefaultParentalLevel");
gc->setLabel(QObject::tr("Starting Parental Level"));
gc->addSelection(QObject::tr("4 - Highest"),
QString::number(ParentalLevel::plHigh));
gc->addSelection(QObject::tr("1 - Lowest"),
QString::number(ParentalLevel::plLowest));
gc->addSelection(QString::number(ParentalLevel::plLow));
gc->addSelection(QString::number(ParentalLevel::plMedium));
gc->setHelpText(QObject::tr("This is the 'level' that MythVideo starts at. "
"Any videos with a level at or below this will be shown in "
"the list or while browsing by default. The Parental PIN "
"should be set to limit changing of the default level."));
return gc;
}

const char *password_clue =
QT_TRANSLATE_NOOP("QObject", "Setting this value to all numbers will make your life "
"much easier.");

HostLineEdit *VideoAdminPassword()
{
HostLineEdit *gc = new HostLineEdit("VideoAdminPassword");
gc->setLabel(QObject::tr("Parental Level 4 PIN"));
gc->setHelpText(QString("%1 %2")
.arg(QObject::tr("This PIN is used to enter Parental Control "
"Level 4 as well as the Video Manager."))
.arg(QObject::tr(password_clue)));
return gc;
}

HostLineEdit *VideoAdminPasswordThree()
{
HostLineEdit *gc = new HostLineEdit("VideoAdminPasswordThree");
gc->setLabel(QObject::tr("Parental Level 3 PIN"));
gc->setHelpText(QString("%1 %2")
.arg(QObject::tr("This PIN is used to enter Parental Control Level 3."))
.arg(QObject::tr(password_clue)));
return gc;
}

HostLineEdit *VideoAdminPasswordTwo()
{
HostLineEdit *gc = new HostLineEdit("VideoAdminPasswordTwo");
gc->setLabel(QObject::tr("Parental Level 2 PIN"));
gc->setHelpText(QString("%1 %2")
.arg(QObject::tr("This PIN is used to enter Parental Control Level 2."))
.arg(QObject::tr(password_clue)));
return gc;
}

HostCheckBox *VideoAggressivePC()
{
HostCheckBox *gc = new HostCheckBox("VideoAggressivePC");
gc->setLabel(QObject::tr("Aggressive Parental Control"));
gc->setValue(false);
gc->setHelpText(QObject::tr("If set, you will not be able to return "
"to this screen and reset the Parental "
"PIN without first entering the current PIN. You have "
"been warned."));
return gc;
}

HostLineEdit *VideoStartupDirectory()
{
HostLineEdit *gc = new HostLineEdit("VideoStartupDir");
gc->setLabel(QObject::tr("Directories that hold videos"));
gc->setValue(DEFAULT_VIDEOSTARTUP_DIR);
gc->setHelpText(QObject::tr("Multiple directories can be separated by ':'. "
"Each directory must exist and be readable by the user "
"running MythVideo."));
return gc;
}

HostLineEdit *VideoArtworkDirectory()
{
HostLineEdit *gc = new HostLineEdit("VideoArtworkDir");
gc->setLabel(QObject::tr("Directory that holds movie posters"));
gc->setValue(GetConfDir() + "/MythVideo/Artwork");
gc->setHelpText(QObject::tr("This directory must exist, and the user "
"running MythVideo needs to have read/write permission "
"to the directory."));
return gc;
}

HostLineEdit *VideoScreenshotDirectory()
{
HostLineEdit *gc = new HostLineEdit("mythvideo.screenshotDir");
gc->setLabel(QObject::tr("Directory that holds movie screenshots"));
gc->setValue(GetConfDir() + "/MythVideo/Screenshots");
gc->setHelpText(QObject::tr("This directory must exist, and the user "
"running MythVideo needs to have read/write permission "
"to the directory."));
return gc;
}

HostLineEdit *VideoBannerDirectory()
{
HostLineEdit *gc = new HostLineEdit("mythvideo.bannerDir");
gc->setLabel(QObject::tr("Directory that holds movie/TV Banners"));
gc->setValue(GetConfDir() + "/MythVideo/Banners");
gc->setHelpText(QObject::tr("This directory must exist, and the user "
"running MythVideo needs to have read/write permission "
"to the directory."));
return gc;
}

HostLineEdit *VideoFanartDirectory()
{
HostLineEdit *gc = new HostLineEdit("mythvideo.fanartDir");
gc->setLabel(QObject::tr("Directory that holds movie fanart"));
gc->setValue(GetConfDir() + "/MythVideo/Fanart");
gc->setHelpText(QObject::tr("This directory must exist, and the user "
"running MythVideo needs to have read/write permission "
"to the directory."));
return gc;
}

HostLineEdit *TrailerDirectory()
{
HostLineEdit *gc = new HostLineEdit("mythvideo.TrailersDir");
gc->setLabel(QObject::tr("Directory that holds movie trailers"));
gc->setValue(GetConfDir() + "/MythVideo/Trailers");
gc->setHelpText(QObject::tr("This directory must exist, and the user "
"running MythVideo needs to have read/write permission "
"to the directory."));
return gc;
}

///////////////////////////////////////////////////////////
//// DVD Settings
///////////////////////////////////////////////////////////

// General Settings

HostComboBox *SetOnInsertDVD()
{
HostComboBox *gc = new HostComboBox("DVDOnInsertDVD");
gc->setLabel(QObject::tr("On DVD insertion"));
gc->addSelection(QObject::tr("Display mythdvd menu"),"1");
gc->addSelection(QObject::tr("Do nothing"),"0");
gc->addSelection(QObject::tr("Play DVD"),"2");
gc->setHelpText(QObject::tr("Media Monitoring should be turned on to "
"allow this feature (Setup -> General -> CD/DVD Monitor)."));
return gc;
}

HostSlider *SetDVDDriveSpeed()
{
HostSlider *gs = new HostSlider("DVDDriveSpeed", 2, 12, 2);
gs->setLabel(QObject::tr("DVD Drive Speed"));
gs->setValue(12);
gs->setHelpText(QObject::tr("Set DVD Drive Speed during DVD Playback. "
"Speed is in multiples of 177KB/s. "
"Slower speeds may reduce drive noise but in "
"some cases it causes playback to stutter."));
return gs;
}

struct ConfigPage
{
typedef std::vector<ConfigurationGroup *> PageList;

protected:
ConfigPage(PageList &pl) : m_pl(pl)
{
}

void Add(ConfigurationGroup *page)
{
m_pl.push_back(page);
}

private:
ConfigPage(const ConfigPage &);
ConfigPage &operator=(const ConfigPage &);

private:
PageList &m_pl;
};

struct VConfigPage : public ConfigPage
{
VConfigPage(PageList &pl, bool luselabel = true, bool luseframe = true,
bool lzeroMargin = false, bool lzeroSpace = false) :
ConfigPage(pl)
{
m_vc_page = new VerticalConfigurationGroup(luselabel, luseframe,
lzeroMargin, lzeroSpace);
Add(m_vc_page);
}

VerticalConfigurationGroup *operator->()
{
return m_vc_page;
}

private:
VerticalConfigurationGroup *m_vc_page;
};

class RatingsToPL : public TriggeredConfigurationGroup
{
public:
RatingsToPL() : TriggeredConfigurationGroup(false)
{
HostCheckBox *r2pl =
new HostCheckBox("mythvideo.ParentalLevelFromRating");
r2pl->setLabel(QObject::tr("Enable automatic Parental Level from "
"rating"));
r2pl->setValue(false);
r2pl->setHelpText(QObject::tr("If enabled, searches will automatically "
"set the Parental Level to the one "
"matching the rating below."));
addChild(r2pl);
setTrigger(r2pl);

typedef std::map<ParentalLevel::Level, QString> r2pl_map;
r2pl_map r2pl_defaults;
r2pl_defaults.insert(r2pl_map::value_type(ParentalLevel::plLowest,
tr("G", "PL 1 default search string.")));
r2pl_defaults.insert(r2pl_map::value_type(ParentalLevel::plLow,
tr("PG", "PL 2 default search string.")));
r2pl_defaults.insert(r2pl_map::value_type(ParentalLevel::plMedium,
tr("PG-13", "PL3 default search string.")));
r2pl_defaults.insert(r2pl_map::value_type(ParentalLevel::plHigh,
tr("R:NC-17", "PL4 default search string.")));

VerticalConfigurationGroup *vcg = new VerticalConfigurationGroup(true);

for (ParentalLevel pl(ParentalLevel::plLowest);
pl.GetLevel() <= ParentalLevel::plHigh && pl.good(); ++pl)
{
HostLineEdit *hle = new HostLineEdit(QString("mythvideo.AutoR2PL%1")
.arg(pl.GetLevel()));
hle->setLabel(QObject::tr("Level %1").arg(pl.GetLevel()));
hle->setHelpText(QObject::tr("Ratings containing these strings "
"(separated by :) will be assigned "
"to Parental Level %1.")
.arg(pl.GetLevel()));

r2pl_map::const_iterator def_setting =
r2pl_defaults.find(pl.GetLevel());
if (def_setting != r2pl_defaults.end())
{
hle->setValue(def_setting->second);
}

vcg->addChild(hle);
}

addTarget("0", new VerticalConfigurationGroup(true));
addTarget("1", vcg);
}
};

} // namespace

VideoGeneralSettings::VideoGeneralSettings()
{
ConfigPage::PageList pages;

VConfigPage page1(pages, false);
page1->addChild(VideoStartupDirectory());
page1->addChild(TrailerDirectory());
page1->addChild(VideoArtworkDirectory());
page1->addChild(VideoScreenshotDirectory());
page1->addChild(VideoBannerDirectory());
page1->addChild(VideoFanartDirectory());

VConfigPage page2(pages, false);
page2->addChild(SetOnInsertDVD());
page2->addChild(SetDVDDriveSpeed());

// page 3
VerticalConfigurationGroup *pctrl =
new VerticalConfigurationGroup(true, false);
pctrl->setLabel(QObject::tr("Parental Control Settings"));
pctrl->addChild(VideoDefaultParentalLevel());
pctrl->addChild(VideoAdminPassword());
pctrl->addChild(VideoAdminPasswordThree());
pctrl->addChild(VideoAdminPasswordTwo());
pctrl->addChild(VideoAggressivePC());
VConfigPage page3(pages, false);
page3->addChild(pctrl);

VConfigPage page4(pages, false);
page4->addChild(new RatingsToPL());

int page_num = 1;
for (ConfigPage::PageList::const_iterator p = pages.begin();
p != pages.end(); ++p, ++page_num)
{
(*p)->setLabel(QObject::tr("General Settings (%1/%2)").arg(page_num)
.arg(pages.size()));
addChild(*p);
}
}
12 changes: 12 additions & 0 deletions mythtv/programs/mythfrontend/videoglobalsettings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#ifndef MYTHSETTINGS_H_
#define MYTHSETTINGS_H_

#include "settings.h"

class VideoGeneralSettings : public ConfigurationWizard
{
public:
VideoGeneralSettings();
};

#endif
1,632 changes: 1,632 additions & 0 deletions mythtv/programs/mythfrontend/videolist.cpp

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions mythtv/programs/mythfrontend/videolist.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#ifndef VIDEOLIST_H_
#define VIDEOLIST_H_

// Type of the item added to the tree
enum TreeNodeType {
kSubFolder = -1,
kUpFolder = -2,
kRootNode = -3,
kNoFilesFound = -4
};

// Tree node attribute index
enum TreeNodeAttributes {
kNodeSort
};

class MythGenericTree;
class VideoFilterSettings;
class VideoMetadataListManager;
class ParentalLevel;

class VideoList
{
public:
VideoList();
~VideoList();

MythGenericTree *buildVideoList(bool filebrowser, bool flatlist,
int group_type,
const ParentalLevel &parental_level,
bool include_updirs);

void refreshList(bool filebrowser, const ParentalLevel &parental_level,
bool flatlist, int group_type);

unsigned int count() const;

const VideoFilterSettings &getCurrentVideoFilter();
void setCurrentVideoFilter(const VideoFilterSettings &filter);

// returns the number of videos matched by this filter
int TryFilter(const VideoFilterSettings &filter) const;

unsigned int getFilterChangedState();

bool Delete(int video_id);

const VideoMetadataListManager &getListCache() const;

MythGenericTree *GetTreeRoot();

void InvalidateCache();

private:
class VideoListImp *m_imp;
};

class VideoMetadata;
class TreeNodeData
{
public:
TreeNodeData();
TreeNodeData(VideoMetadata *metadata);
TreeNodeData(QString path, QString host, QString prefix);

TreeNodeData(const TreeNodeData &other);
TreeNodeData &operator=(const TreeNodeData &rhs);

~TreeNodeData();

VideoMetadata *GetMetadata();
const VideoMetadata *GetMetadata() const;
QString GetPath() const;
QString GetHost() const;
QString GetPrefix() const;

private:
class TreeNodeDataPrivate *m_d;
};

Q_DECLARE_METATYPE(TreeNodeData);

#endif // VIDEOLIST_H
160 changes: 160 additions & 0 deletions mythtv/programs/mythfrontend/videometadatasettings.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
#include <iostream>

// qt
#include <QString>

// myth
#include "mythcontext.h"
#include "mythdbcon.h"
#include "mythdirs.h"
#include "mythprogressdialog.h"

#include "videometadatasettings.h"

using namespace std;

// ---------------------------------------------------

MetadataSettings::MetadataSettings(MythScreenStack *parent, const char *name)
: MythScreenType(parent, name),
m_trailerSpin(NULL),
m_unknownFileCheck(NULL), m_autoMetaUpdateCheck(NULL),
m_treeLoadsMetaCheck(NULL), m_randomTrailerCheck(NULL),
m_okButton(NULL), m_cancelButton(NULL)
{
}

bool MetadataSettings::Create()
{
bool foundtheme = false;

// Load the theme for this screen
foundtheme = LoadWindowFromXML("video-ui.xml", "metadatasettings", this);

if (!foundtheme)
return false;

m_trailerSpin = dynamic_cast<MythUISpinBox *> (GetChild("trailernum"));

m_unknownFileCheck = dynamic_cast<MythUICheckBox *> (GetChild("unknownfilecheck"));
m_autoMetaUpdateCheck = dynamic_cast<MythUICheckBox *> (GetChild("autometaupdatecheck"));
m_treeLoadsMetaCheck = dynamic_cast<MythUICheckBox *> (GetChild("treeloadsmetacheck"));
m_randomTrailerCheck = dynamic_cast<MythUICheckBox *> (GetChild("randomtrailercheck"));

m_okButton = dynamic_cast<MythUIButton *> (GetChild("ok"));
m_cancelButton = dynamic_cast<MythUIButton *> (GetChild("cancel"));

if (!m_trailerSpin || !m_autoMetaUpdateCheck ||
!m_unknownFileCheck || !m_treeLoadsMetaCheck ||
!m_randomTrailerCheck ||!m_okButton || !m_cancelButton)
{
VERBOSE(VB_IMPORTANT, "Theme is missing critical theme elements.");
return false;
}

int unknownSetting = gCoreContext->GetNumSetting("VideoListUnknownFiletypes", 0);
if (unknownSetting == 1)
m_unknownFileCheck->SetCheckState(MythUIStateType::Full);
int autoMetaSetting = gCoreContext->GetNumSetting("mythvideo.AutoMetaDataScan", 0);
if (autoMetaSetting == 1)
m_autoMetaUpdateCheck->SetCheckState(MythUIStateType::Full);
int loadMetaSetting = gCoreContext->GetNumSetting("VideoTreeLoadMetaData", 0);
if (loadMetaSetting == 1)
m_treeLoadsMetaCheck->SetCheckState(MythUIStateType::Full);
int trailerSetting = gCoreContext->GetNumSetting("mythvideo.TrailersRandomEnabled", 0);
if (trailerSetting == 1)
m_randomTrailerCheck->SetCheckState(MythUIStateType::Full);

m_trailerSpin->SetRange(0,100,1);
m_trailerSpin->SetValue(gCoreContext->GetNumSetting(
"mythvideo.TrailersRandomCount"));

if (m_randomTrailerCheck->GetCheckState() == MythUIStateType::Full)
m_trailerSpin->SetVisible(true);
else
m_trailerSpin->SetVisible(false);

connect(m_okButton, SIGNAL(Clicked()), this, SLOT(slotSave()));
connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(Close()));

connect(m_randomTrailerCheck, SIGNAL(valueChanged()), SLOT(toggleTrailers()));

m_randomTrailerCheck->SetHelpText(
tr("If set, this will enable a button "
"called \"Watch With Trailers\" which will "
"play a user-specified number of trailers "
"before the movie."));
m_trailerSpin->SetHelpText(tr("Number of trailers to play before a film."));
m_unknownFileCheck->SetHelpText(
tr("If set, all files below the MythVideo "
"directory will be displayed unless their "
"extension is explicitly set to be ignored."));
m_autoMetaUpdateCheck->SetHelpText(
tr("If set, every time a scan for new videos "
"is performed, a mass metadata update of the "
"collection will also occur."));
m_treeLoadsMetaCheck->SetHelpText(
tr("If set along with Browse Files, this "
"will cause the Video List to load any known video meta"
"data from the database. Turning this off can greatly "
"speed up how long it takes to load the Video List tree."));
m_cancelButton->SetHelpText(tr("Exit without saving settings"));
m_okButton->SetHelpText(tr("Save settings and Exit"));

BuildFocusList();

return true;
}

MetadataSettings::~MetadataSettings()
{
}

void MetadataSettings::slotSave(void)
{
gCoreContext->SaveSetting("mythvideo.TrailersRandomCount", m_trailerSpin->GetValue());

int listUnknownState = 0;
if (m_unknownFileCheck->GetCheckState() == MythUIStateType::Full)
listUnknownState = 1;
gCoreContext->SaveSetting("VideoListUnknownFiletypes", listUnknownState);

int autoMetaState = 0;
if (m_autoMetaUpdateCheck->GetCheckState() == MythUIStateType::Full)
autoMetaState = 1;
gCoreContext->SaveSetting("mythvideo.AutoMetaDataScan", autoMetaState);

int loadMetaState = 0;
if (m_treeLoadsMetaCheck->GetCheckState() == MythUIStateType::Full)
loadMetaState = 1;
gCoreContext->SaveSetting("VideoTreeLoadMetaData", loadMetaState);

int trailerState = 0;
if (m_randomTrailerCheck->GetCheckState() == MythUIStateType::Full)
trailerState = 1;
gCoreContext->SaveSetting("mythvideo.TrailersRandomEnabled", trailerState);

Close();
}

bool MetadataSettings::keyPressEvent(QKeyEvent *event)
{
if (GetFocusWidget()->keyPressEvent(event))
return true;

bool handled = false;

if (!handled && MythScreenType::keyPressEvent(event))
handled = true;

return handled;
}

void MetadataSettings::toggleTrailers()
{
int checkstate = 0;
if (m_randomTrailerCheck->GetCheckState() == MythUIStateType::Full)
checkstate = 1;

m_trailerSpin->SetVisible(checkstate);
}
41 changes: 41 additions & 0 deletions mythtv/programs/mythfrontend/videometadatasettings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#ifndef VIDEOMETADATASETTINGS_H
#define VIDEOMETADATASETTINGS_H

// libmythui
#include "mythuispinbox.h"
#include "mythuibutton.h"
#include "mythuibuttonlist.h"
#include "mythuicheckbox.h"
#include "mythscreentype.h"
#include "mythdialogbox.h"

class MetadataSettings : public MythScreenType
{
Q_OBJECT

public:

MetadataSettings(MythScreenStack *parent, const char *name = 0);
~MetadataSettings();

bool Create(void);
bool keyPressEvent(QKeyEvent *);

private:
MythUISpinBox *m_trailerSpin;

MythUICheckBox *m_unknownFileCheck;
MythUICheckBox *m_autoMetaUpdateCheck;
MythUICheckBox *m_treeLoadsMetaCheck;
MythUICheckBox *m_randomTrailerCheck;

MythUIButton *m_okButton;
MythUIButton *m_cancelButton;

private slots:
void slotSave(void);
void toggleTrailers(void);
};

#endif

417 changes: 417 additions & 0 deletions mythtv/programs/mythfrontend/videoplayercommand.cpp

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions mythtv/programs/mythfrontend/videoplayercommand.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#ifndef VIDEOPLAYERCOMMAND_H_
#define VIDEOPLAYERCOMMAND_H_

class VideoPlayerCommand
{
public:
static VideoPlayerCommand PlayerFor(const class VideoMetadata *item);
static VideoPlayerCommand PlayerFor(const QString &filename);
static VideoPlayerCommand AltPlayerFor(const class VideoMetadata *item);

public:
VideoPlayerCommand();
~VideoPlayerCommand();

VideoPlayerCommand(const VideoPlayerCommand &other);
VideoPlayerCommand &operator=(const VideoPlayerCommand &rhs);

void Play() const;

/// Returns the player command suitable for display to the user.
QString GetCommandDisplayName() const;

private:
class VideoPlayerCommandPrivate *m_d;
};

#endif // PLAYERCOMMAND_H_
190 changes: 190 additions & 0 deletions mythtv/programs/mythfrontend/videoplayersettings.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
#include <iostream>
using namespace std;

// Qt
#include <QString>

// MythTV
#include "mythcontext.h"
#include "mythdbcon.h"
#include "mythdirs.h"

#include "videoplayersettings.h"

// ---------------------------------------------------

PlayerSettings::PlayerSettings(MythScreenStack *parent, const char *name)
: MythScreenType(parent, name),
m_defaultPlayerEdit(NULL), m_dvdPlayerEdit(NULL),
m_dvdDriveEdit(NULL), m_altPlayerEdit(NULL),
m_blurayRegionList(NULL), m_altCheck(NULL),
m_okButton(NULL), m_cancelButton(NULL)
{
}

bool PlayerSettings::Create()
{
bool foundtheme = false;

// Load the theme for this screen
foundtheme = LoadWindowFromXML("video-ui.xml", "playersettings", this);

if (!foundtheme)
return false;

m_defaultPlayerEdit = dynamic_cast<MythUITextEdit *> (GetChild("defaultplayer"));
m_dvdPlayerEdit = dynamic_cast<MythUITextEdit *> (GetChild("dvdplayer"));
m_dvdDriveEdit = dynamic_cast<MythUITextEdit *> (GetChild("dvddrive"));
m_blurayMountEdit = dynamic_cast<MythUITextEdit *> (GetChild("bluraymount"));
m_altPlayerEdit = dynamic_cast<MythUITextEdit *> (GetChild("altplayer"));

m_blurayRegionList = dynamic_cast<MythUIButtonList *> (GetChild("blurayregionlist"));

m_altCheck = dynamic_cast<MythUICheckBox *> (GetChild("altcheck"));

m_okButton = dynamic_cast<MythUIButton *> (GetChild("ok"));
m_cancelButton = dynamic_cast<MythUIButton *> (GetChild("cancel"));

if (!m_defaultPlayerEdit || !m_dvdPlayerEdit || !m_blurayRegionList ||
!m_altCheck || !m_altPlayerEdit || !m_dvdDriveEdit || !m_blurayMountEdit ||
!m_okButton || !m_cancelButton)
{
VERBOSE(VB_IMPORTANT, "Theme is missing critical theme elements.");
return false;
}

int setting = gCoreContext->GetNumSetting("mythvideo.EnableAlternatePlayer", 0);
if (setting == 1)
m_altCheck->SetCheckState(MythUIStateType::Full);

m_defaultPlayerEdit->SetText(gCoreContext->GetSetting("VideoDefaultPlayer",
"Internal"));
m_dvdPlayerEdit->SetText(gCoreContext->GetSetting("mythdvd.DVDPlayerCommand",
"Internal"));
m_dvdDriveEdit->SetText(gCoreContext->GetSetting("DVDDeviceLocation",
"default"));
m_blurayMountEdit->SetText(gCoreContext->GetSetting("BluRayMountpoint",
"/media/cdrom"));
m_altPlayerEdit->SetText(gCoreContext->GetSetting(
"mythvideo.VideoAlternatePlayer", "Internal"));

if (m_altCheck->GetCheckState() == MythUIStateType::Full)
m_altPlayerEdit->SetVisible(true);
else
m_altPlayerEdit->SetVisible(false);

connect(m_okButton, SIGNAL(Clicked()), this, SLOT(slotSave()));
connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(Close()));

connect(m_altCheck, SIGNAL(valueChanged()), SLOT(toggleAlt()));

m_defaultPlayerEdit->SetHelpText(
tr("This is the command used for any file "
"whose extension is not specifically defined. "
"You may also enter the name of one of the playback "
"plugins such as 'Internal'."));
m_dvdPlayerEdit->SetHelpText(
tr("This can be any command to launch a DVD "
" player. Internal is the default. For other players, %d "
"will be substituted for the DVD device (e.g. /dev/dvd)."));
m_dvdDriveEdit->SetHelpText(
tr("This device must exist, and the user "
"playing the DVD needs to have read permission "
"on the device. 'default' will let the "
"MediaMonitor choose a device."));
m_blurayMountEdit->SetHelpText(
tr("This path is the location your "
"operating system mounts Blu-ray discs."));
m_altPlayerEdit->SetHelpText(
tr("If for some reason the default player "
"doesn't play a video, you can play it in an alternate "
"player by selecting 'Play in Alternate Player.'"));
m_blurayRegionList->SetHelpText(
tr("Some Blu-ray discs require that a player region be "
"explicitly set. Only change the value from "
"'No Region' if you encounter a disc which "
"fails to play citing a region mismatch."));
m_cancelButton->SetHelpText(tr("Exit without saving settings"));
m_okButton->SetHelpText(tr("Save settings and Exit"));

fillRegionList();

BuildFocusList();

return true;
}

PlayerSettings::~PlayerSettings()
{
}

void PlayerSettings::slotSave(void)
{
gCoreContext->SaveSetting("VideoDefaultPlayer", m_defaultPlayerEdit->GetText());
gCoreContext->SaveSetting("mythdvd.DVDPlayerCommand", m_dvdPlayerEdit->GetText());
gCoreContext->SaveSetting("DVDDeviceLocation", m_dvdDriveEdit->GetText());
gCoreContext->SaveSetting("BluRayMountpoint", m_blurayMountEdit->GetText());
gCoreContext->SaveSetting("mythvideo.VideoAlternatePlayer", m_altPlayerEdit->GetText());

gCoreContext->SaveSetting("BlurayRegionCode",
m_blurayRegionList->GetItemCurrent()->GetData().toInt());

int checkstate = 0;
if (m_altCheck->GetCheckState() == MythUIStateType::Full)
checkstate = 1;
gCoreContext->SaveSetting("mythvideo.EnableAlternatePlayer", checkstate);

Close();
}

bool PlayerSettings::keyPressEvent(QKeyEvent *event)
{
if (GetFocusWidget()->keyPressEvent(event))
return true;

bool handled = false;

if (!handled && MythScreenType::keyPressEvent(event))
handled = true;

return handled;
}

void PlayerSettings::toggleAlt()
{
int checkstate = 0;
if (m_altCheck->GetCheckState() == MythUIStateType::Full)
checkstate = 1;

m_altPlayerEdit->SetVisible(checkstate);
}

void PlayerSettings::fillRegionList()
{
MythUIButtonListItem *noRegion =
new MythUIButtonListItem(m_blurayRegionList, QString("No Region"));
noRegion->SetData(0);

MythUIButtonListItem *regionA =
new MythUIButtonListItem(m_blurayRegionList, QString("Region A: "
"The Americas, Southeast Asia, Japan"));
regionA->SetData(1);

MythUIButtonListItem *regionB =
new MythUIButtonListItem(m_blurayRegionList, QString("Region B: "
"Europe, Middle East, Africa, Oceania"));
regionB->SetData(2);

MythUIButtonListItem *regionC =
new MythUIButtonListItem(m_blurayRegionList, QString("Region C: "
"Eastern Europe, Central and South Asia"));
regionC->SetData(4);

int region = gCoreContext->GetNumSetting("BlurayRegionCode", 0);

MythUIButtonListItem *item = m_blurayRegionList->GetItemByData(region);

if (item)
m_blurayRegionList->SetItemCurrent(item);
}

44 changes: 44 additions & 0 deletions mythtv/programs/mythfrontend/videoplayersettings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#ifndef PLAYERSETTINGS_H
#define PLAYERSETTINGS_H

// libmythui
#include "mythuibutton.h"
#include "mythuibuttonlist.h"
#include "mythuicheckbox.h"
#include "mythscreentype.h"
#include "mythdialogbox.h"

class PlayerSettings : public MythScreenType
{
Q_OBJECT

public:

PlayerSettings(MythScreenStack *parent, const char *name = 0);
~PlayerSettings();

bool Create(void);
bool keyPressEvent(QKeyEvent *);

private:
MythUITextEdit *m_defaultPlayerEdit;
MythUITextEdit *m_dvdPlayerEdit;
MythUITextEdit *m_dvdDriveEdit;
MythUITextEdit *m_blurayMountEdit;
MythUITextEdit *m_altPlayerEdit;

MythUIButtonList *m_blurayRegionList;

MythUICheckBox *m_altCheck;

MythUIButton *m_okButton;
MythUIButton *m_cancelButton;

private slots:
void slotSave(void);
void toggleAlt(void);
void fillRegionList(void);
};

#endif

86 changes: 86 additions & 0 deletions mythtv/programs/mythfrontend/videopopups.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#include <QStringList>

#include "mythverbose.h"

#include "mythuibuttonlist.h"
#include "mythuitext.h"
#include "mythuibutton.h"
#include "videometadata.h"
#include "videoutils.h"

#include "videopopups.h"

CastDialog::CastDialog(MythScreenStack *lparent, VideoMetadata *metadata) :
MythScreenType(lparent, "videocastpopup"), m_metadata(metadata)
{
}

bool CastDialog::Create()
{
if (!LoadWindowFromXML("video-ui.xml", "castpopup", this))
return false;

MythUIButtonList *castList = NULL;
MythUIButton *okButton = NULL;

bool err = false;
UIUtilE::Assign(this, castList, "cast", &err);

if (err)
{
VERBOSE(VB_IMPORTANT, "Cannot load screen 'castpopup'");
return false;
}

UIUtilW::Assign(this, okButton, "ok");

if (okButton)
connect(okButton, SIGNAL(Clicked()), SLOT(Close()));

QStringList cast = GetDisplayCast(*m_metadata);
QStringListIterator castIterator(cast);
while (castIterator.hasNext())
{
new MythUIButtonListItem(castList, castIterator.next());
}

BuildFocusList();

return true;
}

/////////////////////////////////////////////////////////////

PlotDialog::PlotDialog(MythScreenStack *lparent, VideoMetadata *metadata) :
MythScreenType(lparent, "videoplotpopup"), m_metadata(metadata)
{
}

bool PlotDialog::Create()
{
if (!LoadWindowFromXML("video-ui.xml", "descriptionpopup", this))
return false;

MythUIText *plotText = NULL;
MythUIButton *okButton = NULL;

bool err = false;
UIUtilE::Assign(this, plotText, "description", &err);

if (err)
{
VERBOSE(VB_IMPORTANT, "Cannot load screen 'descriptionpopup'");
return false;
}

UIUtilW::Assign(this, okButton, "ok");

plotText->SetText(m_metadata->GetPlot());

if (okButton)
connect(okButton, SIGNAL(Clicked()), SLOT(Close()));

BuildFocusList();

return true;
}
37 changes: 37 additions & 0 deletions mythtv/programs/mythfrontend/videopopups.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#ifndef VIDEOPOPUPS_H_
#define VIDEOPOPUPS_H_

#include "mythscreentype.h"

class VideoMetadata;

class MythUIButtonList;
class MythUIButtonListItem;

class CastDialog : public MythScreenType
{
Q_OBJECT

public:
CastDialog(MythScreenStack *lparent, VideoMetadata *metadata);

bool Create();

private:
VideoMetadata *m_metadata;
};

class PlotDialog : public MythScreenType
{
Q_OBJECT

public:
PlotDialog(MythScreenStack *lparent, VideoMetadata *metadata);

bool Create();

private:
VideoMetadata *m_metadata;
};

#endif
3 changes: 1 addition & 2 deletions mythtv/themes/DVR/main_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
<type>SETTINGS_VIDEO</type>
<text>Videos Settings</text>
<description>Configure playback and metadata</description>
<action>CONFIGPLUGIN mythvideo</action>
<depends>mythvideo</depends>
<action>MENU video_settings.xml</action>
</button>

<!-- Keep this in sync with mythtv/themes/defaultmenu/media_settings.xml -->
Expand Down
3 changes: 1 addition & 2 deletions mythtv/themes/DVR/util_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
<button>
<type>VIDEO</type>
<text>Videos</text>
<action>PLUGIN mythvideo</action>
<depends>mythvideo</depends>
<action>MENU videomenu.xml</action>
</button>

<button>
Expand Down
31 changes: 31 additions & 0 deletions mythtv/themes/DVR/video_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<mythmenu name="VIDEO_SETTINGS">

<button>
<type>VIDEO_SETTINGS_GENERAL</type>
<text>General Settings</text>
<action>VIDEO_SETTINGS_GENERAL</action>
<description>File Paths and general options</description>
</button>

<button>
<type>VIDEO_SETTINGS_PLAYER</type>
<text>Player Settings</text>
<action>VIDEO_SETTINGS_PLAYER</action>
<description>Player Applications and Optical Drives</description>
</button>

<button>
<type>VIDEO_SETTINGS_METADATA</type>
<text>Metadata Settings</text>
<action>VIDEO_SETTINGS_METADATA</action>
<description>Grabber Setup and display preferences</description>
</button>

<button>
<type>VIDEO_FILE_TYPES</type>
<text>File Types</text>
<action>VIDEO_SETTINGS_ASSOCIATIONS</action>
<description>Associate new file extensions</description>
</button>

</mythmenu>
48 changes: 48 additions & 0 deletions mythtv/themes/DVR/videomenu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<mythmenu name="VIDEO">

<button>
<type>VIDEO_BROWSER</type>
<text>Browse Videos</text>
<action>BROWSER</action>
</button>

<button>
<type>VIDEO_LIST</type>
<text>Video List</text>
<action>LISTING</action>
</button>

<button>
<type>VIDEO_GALLERY</type>
<text>Video Gallery</text>
<action>GALLERY</action>
</button>

<button>
<type>VIDEO_MANAGER</type>
<text>Video Manager</text>
<action>MANAGER</action>
</button>

<!-- MythDVD -->
<button>
<type>DISC_PLAY</type>
<text>Play a DVD or Blu-ray</text>
<action>DISC_PLAY</action>
</button>

<button>
<type>EJECT</type>
<text>Eject media</text>
<action>EJECT</action>
</button>

<!-- Keep this in synch with mythtv/themes/defaultmenu/media_settings.xml -->
<button>
<type>SETTINGS_VIDEO</type>
<text>Video Settings</text>
<description>Configure video and DVD playback</description>
<action>MENU video_settings.xml</action>
</button>

</mythmenu>
3 changes: 1 addition & 2 deletions mythtv/themes/classic/main_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
<type>SETTINGS_VIDEO</type>
<text>Videos Settings</text>
<description>Configure playback and metadata</description>
<action>CONFIGPLUGIN mythvideo</action>
<depends>mythvideo</depends>
<action>MENU video_settings.xml</action>
</button>

<!-- Keep this in synch with mythtv/themes/defaultmenu/util_menu.xml -->
Expand Down
3 changes: 1 addition & 2 deletions mythtv/themes/classic/mainmenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
<button>
<type>VIDEO</type>
<text>Videos</text>
<action>PLUGIN mythvideo</action>
<depends>mythvideo</depends>
<action>MENU videomenu.xml</action>
</button>

<button>
Expand Down
31 changes: 31 additions & 0 deletions mythtv/themes/classic/video_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<mythmenu name="VIDEO_SETTINGS">

<button>
<type>VIDEO_SETTINGS_GENERAL</type>
<text>General Settings</text>
<action>VIDEO_SETTINGS_GENERAL</action>
<description>File Paths and general options</description>
</button>

<button>
<type>VIDEO_SETTINGS_PLAYER</type>
<text>Player Settings</text>
<action>VIDEO_SETTINGS_PLAYER</action>
<description>Player Applications and Optical Drives</description>
</button>

<button>
<type>VIDEO_SETTINGS_METADATA</type>
<text>Metadata Settings</text>
<action>VIDEO_SETTINGS_METADATA</action>
<description>Grabber Setup and display preferences</description>
</button>

<button>
<type>VIDEO_FILE_TYPES</type>
<text>File Types</text>
<action>VIDEO_SETTINGS_ASSOCIATIONS</action>
<description>Associate new file extensions</description>
</button>

</mythmenu>
48 changes: 48 additions & 0 deletions mythtv/themes/classic/videomenu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<mythmenu name="VIDEO">

<button>
<type>VIDEO_BROWSER</type>
<text>Browse Videos</text>
<action>BROWSER</action>
</button>

<button>
<type>VIDEO_LIST</type>
<text>Video List</text>
<action>LISTING</action>
</button>

<button>
<type>VIDEO_GALLERY</type>
<text>Video Gallery</text>
<action>GALLERY</action>
</button>

<button>
<type>VIDEO_MANAGER</type>
<text>Video Manager</text>
<action>MANAGER</action>
</button>

<!-- MythDVD -->
<button>
<type>DISC_PLAY</type>
<text>Play a DVD or Blu-ray</text>
<action>DISC_PLAY</action>
</button>

<button>
<type>EJECT</type>
<text>Eject media</text>
<action>EJECT</action>
</button>

<!-- Keep this in synch with mythtv/themes/defaultmenu/media_settings.xml -->
<button>
<type>SETTINGS_VIDEO</type>
<text>Video Settings</text>
<description>Configure video and DVD playback</description>
<action>MENU video_settings.xml</action>
</button>

</mythmenu>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,603 changes: 1,603 additions & 0 deletions mythtv/themes/default-wide/video-ui.xml

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mythtv/themes/default/images/md_rip_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mythtv/themes/default/images/mv_filerequest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mythtv/themes/default/images/mv_level_high.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mythtv/themes/default/images/mv_level_low.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mythtv/themes/default/images/mv_level_lowest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mythtv/themes/default/images/mv_level_medium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mythtv/themes/default/images/mv_level_none.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,494 changes: 1,494 additions & 0 deletions mythtv/themes/default/video-ui.xml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions mythtv/themes/defaultmenu/library.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
<type>VIDEO_BROWSER</type>
<text>Watch Videos</text>
<description>Browse your video library</description>
<action>JUMP MythVideo</action>
<depends>mythvideo</depends>
<action>JUMP Video Default</action>
</button>

<button>
Expand Down
1 change: 0 additions & 1 deletion mythtv/themes/defaultmenu/main_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<text>Media Settings</text>
<description>Configure music, video, and other media plugins</description>
<action>MENU media_settings.xml</action>
<depends>mythvideo mythmusic mythgallery mythfm mythgame mythburn mytharchive</depends>
</button>

<button>
Expand Down
1 change: 0 additions & 1 deletion mythtv/themes/defaultmenu/mainmenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<text>Optical Disks</text>
<description>Play or import Blu-ray, DVD, and CDs</description>
<action>MENU optical_menu.xml</action>
<depends>mythmusic mythvideo mytharchive mythburn</depends>
</button>

<button>
Expand Down
3 changes: 1 addition & 2 deletions mythtv/themes/defaultmenu/media_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
<type>SETTINGS_VIDEO</type>
<text>Videos Settings</text>
<description>Configure playback and metadata</description>
<action>CONFIGPLUGIN mythvideo</action>
<depends>mythvideo</depends>
<action>MENU video_settings.xml</action>
</button>

<button>
Expand Down
1 change: 0 additions & 1 deletion mythtv/themes/defaultmenu/optical_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<text>Play Optical Disc</text>
<description>Play a film on Blu-ray or DVD</description>
<action>JUMP Play Disc</action>
<depends>mythvideo</depends>
</button>

<button>
Expand Down
31 changes: 31 additions & 0 deletions mythtv/themes/defaultmenu/video_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<mythmenu name="VIDEO_SETTINGS">

<button>
<type>VIDEO_SETTINGS_GENERAL</type>
<text>General Settings</text>
<action>VIDEO_SETTINGS_GENERAL</action>
<description>File Paths and general options</description>
</button>

<button>
<type>VIDEO_SETTINGS_PLAYER</type>
<text>Player Settings</text>
<action>VIDEO_SETTINGS_PLAYER</action>
<description>Player Applications and Optical Drives</description>
</button>

<button>
<type>VIDEO_SETTINGS_METADATA</type>
<text>Metadata Settings</text>
<action>VIDEO_SETTINGS_METADATA</action>
<description>Grabber Setup and display preferences</description>
</button>

<button>
<type>VIDEO_FILE_TYPES</type>
<text>File Types</text>
<action>VIDEO_SETTINGS_ASSOCIATIONS</action>
<description>Associate new file extensions</description>
</button>

</mythmenu>
1 change: 0 additions & 1 deletion mythtv/themes/mediacentermenu/advanced.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<text>Optical Disks</text>
<description>Play or import Blu-ray, DVD, and CDs</description>
<action>MENU optical_menu.xml</action>
<depends>mythmusic mythvideo mytharchive mythburn</depends>
</button>

<button>
Expand Down
1 change: 0 additions & 1 deletion mythtv/themes/mediacentermenu/main_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<text>Media Settings</text>
<description>Settings for all non-TV media</description>
<action>MENU media_settings.xml</action>
<depends>mythvideo mythmusic mythgallery mythfm mythgame mythburn mytharchive</depends>
</button>

<button>
Expand Down
4 changes: 1 addition & 3 deletions mythtv/themes/mediacentermenu/mainmenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
<type>VIDEO_BROWSER</type>
<text>Watch Videos</text>
<description>Play videos</description>
<action>JUMP MythVideo</action>
<depends>mythvideo</depends>
<action>JUMP Video Default</action>
</button>

<button>
<type>DVD_PLAY</type>
<text>Watch A Disc</text>
<description>Play the video on a Blu-ray or DVD</description>
<action>JUMP Play Disc</action>
<depends>mythvideo</depends>
</button>

<button>
Expand Down
3 changes: 1 addition & 2 deletions mythtv/themes/mediacentermenu/media_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<type>SETTINGS_VIDEO</type>
<text>Videos Settings</text>
<description>Configure playback and metadata</description>
<action>CONFIGPLUGIN mythvideo</action>
<depends>mythvideo</depends>
<action>MENU video_settings.xml</action>
</button>

<button>
Expand Down
1 change: 0 additions & 1 deletion mythtv/themes/mediacentermenu/optical_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<text>Play Disc</text>
<description>Play the video on a Blu-ray or DVD</description>
<action>JUMP Play Disc</action>
<depends>mythvideo</depends>
</button>

<button>
Expand Down
31 changes: 31 additions & 0 deletions mythtv/themes/mediacentermenu/video_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<mythmenu name="VIDEO_SETTINGS">

<button>
<type>VIDEO_SETTINGS_GENERAL</type>
<text>General Settings</text>
<action>VIDEO_SETTINGS_GENERAL</action>
<description>File Paths and general options</description>
</button>

<button>
<type>VIDEO_SETTINGS_PLAYER</type>
<text>Player Settings</text>
<action>VIDEO_SETTINGS_PLAYER</action>
<description>Player Applications and Optical Drives</description>
</button>

<button>
<type>VIDEO_SETTINGS_METADATA</type>
<text>Metadata Settings</text>
<action>VIDEO_SETTINGS_METADATA</action>
<description>Grabber Setup and display preferences</description>
</button>

<button>
<type>VIDEO_FILE_TYPES</type>
<text>File Types</text>
<action>VIDEO_SETTINGS_ASSOCIATIONS</action>
<description>Associate new file extensions</description>
</button>

</mythmenu>