mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 13:21:13 +00:00
Added an "advanced" option to allow resuming playback automatically on app start.
This commit is contained in:
parent
e35d117156
commit
6fd0c537b4
@ -109,6 +109,10 @@ namespace musik {
|
||||
playback.Prepare(index, time);
|
||||
playback.QueueEdited(); /* hack to get the play queue view to scroll
|
||||
to the track we just prepared. */
|
||||
|
||||
if (Settings()->GetBool(keys::ResumePlaybackOnStartup, false)) {
|
||||
playback.GetTransport().Resume();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ namespace musik { namespace core { namespace prefs {
|
||||
const std::string keys::AutoSyncIntervalMillis = "AutoSyncIntervalMillis";
|
||||
const std::string keys::RemoveMissingFiles = "RemoveMissingFiles";
|
||||
const std::string keys::SyncOnStartup = "SyncOnStartup";
|
||||
const std::string keys::ResumePlaybackOnStartup = "ResumePlaybackOnStartup";
|
||||
const std::string keys::Volume = "Volume";
|
||||
const std::string keys::RepeatMode = "RepeatMode";
|
||||
const std::string keys::TimeChangeMode = "TimeChangeMode";
|
||||
|
@ -50,6 +50,7 @@ namespace musik { namespace core { namespace prefs {
|
||||
extern const std::string AutoSyncIntervalMillis;
|
||||
extern const std::string RemoveMissingFiles;
|
||||
extern const std::string SyncOnStartup;
|
||||
extern const std::string ResumePlaybackOnStartup;
|
||||
extern const std::string Volume;
|
||||
extern const std::string RepeatMode;
|
||||
extern const std::string TimeChangeMode;
|
||||
|
@ -126,6 +126,7 @@ static inline std::shared_ptr<ISchema> AdvancedSettingsSchema() {
|
||||
schema->AddInt(core::prefs::keys::IndexerThreadCount, DEFAULT_MAX_INDEXER_THREADS);
|
||||
schema->AddInt(core::prefs::keys::IndexerTransactionInterval, 300);
|
||||
schema->AddString(core::prefs::keys::AuddioApiToken, "");
|
||||
schema->AddBool(core::prefs::keys::ResumePlaybackOnStartup, false);
|
||||
return schema;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user