audioplayer/screensaver: add gui switch to use covers as screensaver

Origin commit data
------------------
Commit: 76507f38fa
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-05-24 (Thu, 24 May 2018)

Origin message was:
------------------
- audioplayer/screensaver: add gui switch to use covers as screensaver
This commit is contained in:
vanhofen
2018-05-24 02:03:23 +02:00
parent dbe01f3308
commit f43a9ed696
8 changed files with 20 additions and 1 deletions

View File

@@ -164,6 +164,7 @@ audioplayer.artist_title Interpret, Titel
audioplayer.building_search_index Erstelle Suchindex
audioplayer.button_select_title_by_id Suche nach ID
audioplayer.button_select_title_by_name Suche nach Name
audioplayer.cover_as_screensaver Cover als Bildschirmschoner
audioplayer.defdir Start-Verzeichnis
audioplayer.delete Entfernen
audioplayer.deleteall Alle entfernen
@@ -1152,6 +1153,7 @@ menu.hint_audio_srs_nmgr Schalten Sie den NoiseManager ein oder aus
menu.hint_audio_srs_volume Legen Sie die Referenzlautstärke für SRS TruVolume fest
menu.hint_audio_volstart Legen Sie die Einschaltlautstärke fest, die immer beim Starten eingestellt werden soll
menu.hint_audio_volstep Beim Betätigen der Lautstärketasten wird die Lautstärke immer schrittweise nach diesem Wert geändert
menu.hint_audioplayer_cover_as_screensaver Verwendet das Cover des Titels oder "folder.jpg" als Bildschirmschoner
menu.hint_audioplayer_defdir Wählen Sie das Startverzeichnis für den Audioplayer
menu.hint_audioplayer_follow Das Auswählen eines aktuellen Titels in der Wiedergabeliste zulassen
menu.hint_audioplayer_highprio Erhöhen Sie die Priorität der Wiedergabe

View File

@@ -164,6 +164,7 @@ audioplayer.artist_title Artist, Title
audioplayer.building_search_index Building search index
audioplayer.button_select_title_by_id Search by ID
audioplayer.button_select_title_by_name Search by name
audioplayer.cover_as_screensaver Cover as screensaver
audioplayer.defdir Start directory
audioplayer.delete Remove
audioplayer.deleteall Remove all
@@ -1152,6 +1153,7 @@ menu.hint_audio_srs_nmgr Noise manager
menu.hint_audio_srs_volume Reference level to maintain
menu.hint_audio_volstart Always set selected volume value on boot
menu.hint_audio_volstep Volume +/- keys increase/decrease step
menu.hint_audioplayer_cover_as_screensaver Use title's cover or "folder.jpg" as screensaver
menu.hint_audioplayer_defdir Default audioplayer directory
menu.hint_audioplayer_follow Move playlist selected pointer\nto current playing song
menu.hint_audioplayer_highprio Increase playback priority

View File

@@ -134,6 +134,10 @@ int CAudioPlayerSetup::showAudioPlayerSetup()
mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_PLAYLIST);
audioplayerSetup->addItem(mc);
mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_COVER_AS_SCREENSAVER, &g_settings.audioplayer_cover_as_screensaver, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true);
mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_COVER_AS_SCREENSAVER);
audioplayerSetup->addItem(mc);
mc = new CMenuOptionChooser(LOCALE_AUDIOPLAYER_HIGHPRIO, &g_settings.audioplayer_highprio, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true );
mc->setHint("", LOCALE_MENU_HINT_AUDIOPLAYER_HIGHPRIO);
audioplayerSetup->addItem(mc);

View File

@@ -188,7 +188,11 @@ void* CScreenSaver::ScreenSaverPrg(void* arg)
bool CScreenSaver::ReadDir()
{
string d = g_settings.screensaver_dir;
string d;
if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_audio && g_settings.audioplayer_cover_as_screensaver)
d = COVERDIR;
else
d = g_settings.screensaver_dir;
if (d.length() > 1)
{
//remove trailing slash

View File

@@ -936,6 +936,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.audioplayer_repeat_on = configfile.getInt32("audioplayer_repeat_on",0);
g_settings.audioplayer_show_playlist = configfile.getInt32("audioplayer_show_playlist",1);
g_settings.audioplayer_enable_sc_metadata = configfile.getInt32("audioplayer_enable_sc_metadata",1);
g_settings.audioplayer_cover_as_screensaver = configfile.getInt32("audioplayer_cover_as_screensaver",1);
//Movie-Player
g_settings.movieplayer_repeat_on = configfile.getInt32("movieplayer_repeat_on", CMoviePlayerGui::REPEAT_OFF);
@@ -1673,6 +1674,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32( "audioplayer_repeat_on", g_settings.audioplayer_repeat_on );
configfile.setInt32( "audioplayer_show_playlist", g_settings.audioplayer_show_playlist );
configfile.setInt32( "audioplayer_enable_sc_metadata", g_settings.audioplayer_enable_sc_metadata );
configfile.setInt32( "audioplayer_cover_as_screensaver", g_settings.audioplayer_cover_as_screensaver );
//Movie-Player
configfile.setInt32( "movieplayer_repeat_on", g_settings.movieplayer_repeat_on );

View File

@@ -191,6 +191,7 @@ typedef enum
LOCALE_AUDIOPLAYER_BUILDING_SEARCH_INDEX,
LOCALE_AUDIOPLAYER_BUTTON_SELECT_TITLE_BY_ID,
LOCALE_AUDIOPLAYER_BUTTON_SELECT_TITLE_BY_NAME,
LOCALE_AUDIOPLAYER_COVER_AS_SCREENSAVER,
LOCALE_AUDIOPLAYER_DEFDIR,
LOCALE_AUDIOPLAYER_DELETE,
LOCALE_AUDIOPLAYER_DELETEALL,
@@ -1179,6 +1180,7 @@ typedef enum
LOCALE_MENU_HINT_AUDIO_SRS_VOLUME,
LOCALE_MENU_HINT_AUDIO_VOLSTART,
LOCALE_MENU_HINT_AUDIO_VOLSTEP,
LOCALE_MENU_HINT_AUDIOPLAYER_COVER_AS_SCREENSAVER,
LOCALE_MENU_HINT_AUDIOPLAYER_DEFDIR,
LOCALE_MENU_HINT_AUDIOPLAYER_FOLLOW,
LOCALE_MENU_HINT_AUDIOPLAYER_HIGHPRIO,

View File

@@ -191,6 +191,7 @@ const char * locale_real_names[] =
"audioplayer.building_search_index",
"audioplayer.button_select_title_by_id",
"audioplayer.button_select_title_by_name",
"audioplayer.cover_as_screensaver",
"audioplayer.defdir",
"audioplayer.delete",
"audioplayer.deleteall",
@@ -1179,6 +1180,7 @@ const char * locale_real_names[] =
"menu.hint_audio_srs_volume",
"menu.hint_audio_volstart",
"menu.hint_audio_volstep",
"menu.hint_audioplayer_cover_as_screensaver",
"menu.hint_audioplayer_defdir",
"menu.hint_audioplayer_follow",
"menu.hint_audioplayer_highprio",

View File

@@ -804,6 +804,7 @@ struct SNeutrinoSettings
int audioplayer_repeat_on;
int audioplayer_show_playlist;
int audioplayer_enable_sc_metadata;
int audioplayer_cover_as_screensaver;
//Filebrowser
int filebrowser_showrights;