| 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 |
| 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 |
| 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 |
| 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 |
| 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); | ||
| } | ||
| } |
| 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 |
| 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 |
| 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); | ||
| } |
| 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 | ||
|
|
| 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_ |
| 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); | ||
| } | ||
|
|
| 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 | ||
|
|
| 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; | ||
| } |
| 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 |
| 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> |
| 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> |
| 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> |
| 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> |
| 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> |
| 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> |