aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Transports
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Transports')
-rw-r--r--src/plugins/Transports/http/httpinputfactory.cpp2
-rw-r--r--src/plugins/Transports/http/httpinputfactory.h2
-rw-r--r--src/plugins/Transports/http/httpinputsource.cpp2
-rw-r--r--src/plugins/Transports/http/httpinputsource.h2
-rw-r--r--src/plugins/Transports/http/httpstreamreader.cpp2
-rw-r--r--src/plugins/Transports/http/httpstreamreader.h2
-rw-r--r--src/plugins/Transports/http/settingsdialog.cpp2
-rw-r--r--src/plugins/Transports/http/settingsdialog.h2
-rw-r--r--src/plugins/Transports/mms/mmsinputfactory.cpp2
-rw-r--r--src/plugins/Transports/mms/mmsinputfactory.h2
-rw-r--r--src/plugins/Transports/mms/mmsinputsource.cpp2
-rw-r--r--src/plugins/Transports/mms/mmsinputsource.h2
-rw-r--r--src/plugins/Transports/mms/mmsstreamreader.cpp2
-rw-r--r--src/plugins/Transports/mms/mmsstreamreader.h2
-rw-r--r--src/plugins/Transports/mms/settingsdialog.cpp2
-rw-r--r--src/plugins/Transports/mms/settingsdialog.h2
16 files changed, 16 insertions, 16 deletions
diff --git a/src/plugins/Transports/http/httpinputfactory.cpp b/src/plugins/Transports/http/httpinputfactory.cpp
index 9a0b9fe1b..d16acd426 100644
--- a/src/plugins/Transports/http/httpinputfactory.cpp
+++ b/src/plugins/Transports/http/httpinputfactory.cpp
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <QtPlugin>
diff --git a/src/plugins/Transports/http/httpinputfactory.h b/src/plugins/Transports/http/httpinputfactory.h
index 07475bbc0..3a4d31596 100644
--- a/src/plugins/Transports/http/httpinputfactory.h
+++ b/src/plugins/Transports/http/httpinputfactory.h
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef HTTPINPUTFACTORY_H
diff --git a/src/plugins/Transports/http/httpinputsource.cpp b/src/plugins/Transports/http/httpinputsource.cpp
index 005a0fca5..249017b53 100644
--- a/src/plugins/Transports/http/httpinputsource.cpp
+++ b/src/plugins/Transports/http/httpinputsource.cpp
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "httpstreamreader.h"
diff --git a/src/plugins/Transports/http/httpinputsource.h b/src/plugins/Transports/http/httpinputsource.h
index 974ab5288..8cf72dcf3 100644
--- a/src/plugins/Transports/http/httpinputsource.h
+++ b/src/plugins/Transports/http/httpinputsource.h
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef HTTPINPUTSOURCE_H
diff --git a/src/plugins/Transports/http/httpstreamreader.cpp b/src/plugins/Transports/http/httpstreamreader.cpp
index 3e5dc3344..a09b74682 100644
--- a/src/plugins/Transports/http/httpstreamreader.cpp
+++ b/src/plugins/Transports/http/httpstreamreader.cpp
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <QApplication>
#include <QStringList>
diff --git a/src/plugins/Transports/http/httpstreamreader.h b/src/plugins/Transports/http/httpstreamreader.h
index 488463902..a87ea5fe9 100644
--- a/src/plugins/Transports/http/httpstreamreader.h
+++ b/src/plugins/Transports/http/httpstreamreader.h
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef HTTPSTREAMREADER_H
#define HTTPSTREAMREADER_H
diff --git a/src/plugins/Transports/http/settingsdialog.cpp b/src/plugins/Transports/http/settingsdialog.cpp
index 8bbc1fcdc..5737b7b0f 100644
--- a/src/plugins/Transports/http/settingsdialog.cpp
+++ b/src/plugins/Transports/http/settingsdialog.cpp
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <QTextCodec>
#include <QSettings>
diff --git a/src/plugins/Transports/http/settingsdialog.h b/src/plugins/Transports/http/settingsdialog.h
index 8f109c1a5..1daab4c94 100644
--- a/src/plugins/Transports/http/settingsdialog.h
+++ b/src/plugins/Transports/http/settingsdialog.h
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
diff --git a/src/plugins/Transports/mms/mmsinputfactory.cpp b/src/plugins/Transports/mms/mmsinputfactory.cpp
index 665e86f88..b9ee50c08 100644
--- a/src/plugins/Transports/mms/mmsinputfactory.cpp
+++ b/src/plugins/Transports/mms/mmsinputfactory.cpp
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <QtPlugin>
diff --git a/src/plugins/Transports/mms/mmsinputfactory.h b/src/plugins/Transports/mms/mmsinputfactory.h
index a2853636a..04e604b74 100644
--- a/src/plugins/Transports/mms/mmsinputfactory.h
+++ b/src/plugins/Transports/mms/mmsinputfactory.h
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef HTTPINPUTFACTORY_H
diff --git a/src/plugins/Transports/mms/mmsinputsource.cpp b/src/plugins/Transports/mms/mmsinputsource.cpp
index 45305885f..ba65c11ab 100644
--- a/src/plugins/Transports/mms/mmsinputsource.cpp
+++ b/src/plugins/Transports/mms/mmsinputsource.cpp
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "mmsstreamreader.h"
diff --git a/src/plugins/Transports/mms/mmsinputsource.h b/src/plugins/Transports/mms/mmsinputsource.h
index c9f11ba22..27baf7420 100644
--- a/src/plugins/Transports/mms/mmsinputsource.h
+++ b/src/plugins/Transports/mms/mmsinputsource.h
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef HTTPINPUTSOURCE_H
diff --git a/src/plugins/Transports/mms/mmsstreamreader.cpp b/src/plugins/Transports/mms/mmsstreamreader.cpp
index bb2efc673..eb6c8564c 100644
--- a/src/plugins/Transports/mms/mmsstreamreader.cpp
+++ b/src/plugins/Transports/mms/mmsstreamreader.cpp
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <QApplication>
#include <QSettings>
diff --git a/src/plugins/Transports/mms/mmsstreamreader.h b/src/plugins/Transports/mms/mmsstreamreader.h
index 02e19743a..0865bdc44 100644
--- a/src/plugins/Transports/mms/mmsstreamreader.h
+++ b/src/plugins/Transports/mms/mmsstreamreader.h
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef MMSSTREAMREADER_H
#define MMSSTREAMREADER_H
diff --git a/src/plugins/Transports/mms/settingsdialog.cpp b/src/plugins/Transports/mms/settingsdialog.cpp
index a102ed3bd..a323fffa2 100644
--- a/src/plugins/Transports/mms/settingsdialog.cpp
+++ b/src/plugins/Transports/mms/settingsdialog.cpp
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <QTextCodec>
#include <QSettings>
diff --git a/src/plugins/Transports/mms/settingsdialog.h b/src/plugins/Transports/mms/settingsdialog.h
index f5cf194e4..2531201a3 100644
--- a/src/plugins/Transports/mms/settingsdialog.h
+++ b/src/plugins/Transports/mms/settingsdialog.h
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
f9a5e38> 2018-11-11 18:05:35 +0000 committer trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> 2018-11-11 18:05:35 +0000 refactoring' href='/qmmp/commit/src/qmmpui/qmmpuisettings.cpp?id=762952cbe88701a9fb71475768a18f32b199617e'>762952cbe
cda0f909b
bc28f1332










a9ae38ae4









bc28f1332

2242b02f8
bc28f1332
e7dd6e5af
bc28f1332

762952cbe
3a965fcd4
92f1159a1




7bde21f66
a3c742d10
0ab7b051e
bc28f1332
c9cb0def7

617bf301e

a9ae38ae4
bc28f1332

92f1159a1

0ab7b051e





92f1159a1



0ab7b051e





92f1159a1



0ab7b051e





92f1159a1



0ab7b051e





92f1159a1

d60ec0e8d
92f1159a1
0ab7b051e















92f1159a1

c9cb0def7
bc28f1332
c9cb0def7
bc28f1332

c9cb0def7

75142ba08
2242b02f8
c9cb0def7
bc28f1332
c9cb0def7



bc28f1332
c9cb0def7

75142ba08
2242b02f8
c9cb0def7
bc28f1332
617bf301e









92f1159a1
c9cb0def7




617bf301e




2242b02f8
617bf301e
3a965fcd4


186d72f60
2242b02f8
3a965fcd4





7bde21f66










a3c742d10










1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
                                                                            
                                                                            
                                                                            













                                                                            
                                                                            


                                                                             
                       
                 
                      
                             

                            
 
                                                     
 
                                                                 
 

                                                               
                      
                                  
                                                           
                             
                                                                                             

                                                                        
                                                             
                                                             




                                                              
                                                                      
                                                                                        
                                                                                       



                                                                       
                                                                  


                                                                              
                                                                         



                                                      
 
                                             

 
                                 
 
                         
           
                    

 


                                                 

 



















                                              
                                                



                           




                                                        
                                              



                               
                                          



                           
                                        
 
                         

 
                                                   



                              
                                                



                          




                                                               
                                                 
                                                                            
         
                                   



         
                                             
 
                        
 










                                                     









                                                  

                           
                              
                                                          
                                                        

                                                                   
                                                        
                                                         




                                                         
                                                                 
                                                                                    
                                                                                  
                                                                 

                                                               

                                                             
                                                           

 

                                              





                                      



                                       





                               



                                                   





                                    



                                                     





                                             

 
                                                       
 















                                                               

 
                                                   
 
                              

 

                                                               
                                                                               
                     
 
 



                                                  
 

                                                              
                                                                              
                     
 
 









                                                   
                                          




                                        




                                                                          
                     
 


                                                      
                                  
                     





                                             










                                                           










                                                              
/***************************************************************************
 *   Copyright (C) 2012-2015 by Ilya Kotov                                 *
 *   forkotov02@ya.ru                                                      *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/

#include <QSettings>
#include <QApplication>
#include <QTimer>
#include <qmmp/qmmp.h>
#include "metadatahelper_p.h"
#include "playlistmanager.h"
#include "qmmpuisettings.h"

QmmpUiSettings *QmmpUiSettings::m_instance = nullptr;

QmmpUiSettings::QmmpUiSettings(QObject *parent) : QObject(parent)
{
    if(m_instance)
        qFatal("QmmpUiSettings: only one instance is allowed");
    m_instance = this;
    m_helper = new MetaDataHelper;
    QSettings s (Qmmp::configFile(), QSettings::IniFormat);
    s.beginGroup("PlayList");
    m_group_format = s.value("group_format", "%p%if(%p&%a, - %if(%y,[%y] ,),)%a").toString();
    m_convertUnderscore = s.value ("convert_underscore", true).toBool();
    m_convertTwenty = s.value ("convert_twenty", true).toBool();
    m_useMetaData = s.value ("load_metadata", true).toBool();
    m_autosave_playlist = s.value("autosave", true).toBool();
    m_repeate_list = s.value("repeate_list", false).toBool();
    m_shuffle = s.value("shuffle", false).toBool();
    m_groups_enabled = s.value("groups", false).toBool();
    m_repeat_track = s.value("repeate_track", false).toBool();
    m_no_pl_advance = s.value("no_advance", false).toBool();
    m_clear_prev_playlist = s.value("clear_previous", false).toBool();
    m_read_metadata_for_playlist = s.value("read_metadata_for_playlist", true).toBool();
    m_transit_between_playlists = s.value("transit_between_playlists", false).toBool();
    s.endGroup();
    s.beginGroup("General");
    m_resume_on_startup = s.value("resume_on_startup", false).toBool();
    m_restrict_filters = s.value("restrict_filters").toStringList();
    m_exclude_filters = s.value("exclude_filters").toStringList();
    m_use_default_pl = s.value("use_default_pl", false).toBool();
    m_default_pl_name = s.value("default_pl_name", tr("Playlist")).toString();
    s.endGroup();
    m_use_clipboard = s.value("URLDialog/use_clipboard", false).toBool();
    m_timer = new QTimer(this);
    m_timer->setInterval(5000);
    m_timer->setSingleShot(true);
    connect(m_timer, SIGNAL(timeout()), SLOT(sync()));

    m_helper->setGroupFormat(m_group_format);
}

QmmpUiSettings::~QmmpUiSettings()
{
    m_instance = nullptr;
    sync();
    delete m_helper;
}

const QString QmmpUiSettings::groupFormat() const
{
    return m_group_format;
}

bool QmmpUiSettings::isRepeatableList() const
{
    return m_repeate_list;
}

bool QmmpUiSettings::isShuffle() const
{
    return m_shuffle;
}

bool QmmpUiSettings::isGroupsEnabled() const
{
    return m_groups_enabled;
}

bool QmmpUiSettings::isRepeatableTrack() const
{
    return m_repeat_track;
}

bool QmmpUiSettings::isNoPlayListAdvance() const
{
    return m_no_pl_advance;
}

bool QmmpUiSettings::isPlayListTransitionEnabled() const
{
    return m_transit_between_playlists;
}

bool QmmpUiSettings::convertUnderscore() const
{
    return m_convertUnderscore;
}

bool QmmpUiSettings::convertTwenty() const
{
    return m_convertTwenty;
}

bool QmmpUiSettings::useMetaData() const
{
    return m_useMetaData;
}

void QmmpUiSettings::setConvertUnderscore(bool yes)
{
    m_convertUnderscore = yes;
}

void  QmmpUiSettings::setConvertTwenty(bool yes)
{
    m_convertTwenty = yes;
}

void QmmpUiSettings::setGroupFormat(const QString &groupFormat)
{
    if(groupFormat != m_group_format)
    {
        m_group_format = groupFormat;
        m_helper->setGroupFormat(m_group_format);
        for(PlayListModel *model : PlayListManager::instance()->playLists())
        {
            model->rebuildGroups();
        }
    }
}

void QmmpUiSettings::setUseMetaData(bool yes)
{
    m_useMetaData = yes;
}

bool QmmpUiSettings::resumeOnStartup() const
{
    return m_resume_on_startup;
}

void QmmpUiSettings::setResumeOnStartup(bool enabled)
{
    m_resume_on_startup = enabled;
}

void QmmpUiSettings::setUseClipboard(bool enabled)
{
    m_use_clipboard = enabled;
}

bool QmmpUiSettings::useClipboard() const
{
    return m_use_clipboard;
}

void QmmpUiSettings::sync()
{
    qDebug("%s", Q_FUNC_INFO);
    QSettings s(Qmmp::configFile(), QSettings::IniFormat);
    s.setValue("PlayList/group_format", m_group_format);
    s.setValue("PlayList/convert_underscore", m_convertUnderscore);
    s.setValue("PlayList/convert_twenty", m_convertTwenty);
    s.setValue("PlayList/load_metadata", m_useMetaData);
    s.setValue("PlayList/autosave", m_autosave_playlist);
    s.setValue("PlayList/repeate_list", m_repeate_list);
    s.setValue("PlayList/shuffle", m_shuffle);
    s.setValue("PlayList/groups", m_groups_enabled);
    s.setValue("PlayList/repeate_track", m_repeat_track);
    s.setValue("PlayList/no_advance", m_no_pl_advance);
    s.setValue("PlayList/clear_previous", m_clear_prev_playlist);
    s.setValue("PlayList/read_metadata_for_playlist", m_read_metadata_for_playlist);
    s.setValue("PlayList/transit_between_playlists", m_transit_between_playlists);
    s.setValue("General/resume_on_startup", m_resume_on_startup);
    s.setValue("General/restrict_filters", m_restrict_filters);
    s.setValue("General/exclude_filters", m_exclude_filters);
    s.setValue("General/use_default_pl", m_use_default_pl);
    s.setValue("General/default_pl_name", m_default_pl_name);
    s.setValue("URLDialog/use_clipboard", m_use_clipboard);
}

void QmmpUiSettings::setRepeatableList(bool r)
{
    if(m_repeate_list != r)
    {
        m_repeate_list = r;
        m_timer->start();
        emit repeatableListChanged(r);
    }
}

void QmmpUiSettings::setShuffle(bool s)
{
    if(m_shuffle != s)
    {
        m_shuffle = s;
        m_timer->start();
        emit shuffleChanged(s);
    }
}

void QmmpUiSettings::setGroupsEnabled(bool enabled)
{
    if(m_groups_enabled != enabled)
    {
        m_groups_enabled = enabled;
        m_timer->start();
        emit groupsChanged(enabled);
    }
}

void QmmpUiSettings::setRepeatableTrack(bool enabled)
{
    if(m_repeat_track != enabled)
    {
        m_repeat_track = enabled;
        m_timer->start();
        emit repeatableTrackChanged(enabled);
    }
}

void QmmpUiSettings::setNoPlayListAdvance(bool enabled)
{
    if(m_no_pl_advance != enabled)
    {
        m_no_pl_advance = enabled;
        m_timer->start();
        emit noPlayListAdvanceChanged(enabled);
    }
}

void QmmpUiSettings::setPlayListTransitionEnabled(bool enabled)
{
    if(m_transit_between_playlists != enabled)
    {
        m_transit_between_playlists = enabled;
        m_timer->start();
        emit playListTransitionChanged(enabled);
    }
}

QStringList QmmpUiSettings::restrictFilters() const
{
    return m_restrict_filters;
}

void QmmpUiSettings::setRestrictFilters(const QString &filters)
{
    m_restrict_filters = filters.trimmed().split(",", QString::SkipEmptyParts);
    m_timer->start();
}

QStringList QmmpUiSettings::excludeFilters() const
{
    return m_exclude_filters;
}

void QmmpUiSettings::setExcludeFilters(const QString &filters)
{
    m_exclude_filters = filters.trimmed().split(",", QString::SkipEmptyParts);
    m_timer->start();
}

bool QmmpUiSettings::useDefaultPlayList() const
{
    return m_use_default_pl;
}

QString QmmpUiSettings::defaultPlayListName() const
{
    return m_default_pl_name;
}

QmmpUiSettings *QmmpUiSettings::instance()
{
    if(!m_instance)
        return new QmmpUiSettings(qApp);
    return m_instance;
}

void QmmpUiSettings::setDefaultPlayList(const QString &name, bool enabled)
{
    m_use_default_pl = enabled;
    m_default_pl_name = name;
    m_timer->start();
}

void QmmpUiSettings::setAutoSavePlayList(bool enabled)
{
    m_autosave_playlist = enabled;
    m_timer->start();
}

bool QmmpUiSettings::autoSavePlayList() const
{
    return m_autosave_playlist;
}

void QmmpUiSettings::setClearPreviousPlayList(bool enabled)
{
    m_clear_prev_playlist = enabled;
    m_timer->start();
}

bool QmmpUiSettings::clearPreviousPlayList() const
{
    return m_clear_prev_playlist;
}

bool QmmpUiSettings::readMetaDataForPlayLists() const
{
    return m_read_metadata_for_playlist;
}

void QmmpUiSettings::setReadMetaDataForPlayLists(bool enabled)
{
    m_read_metadata_for_playlist = enabled;
    m_timer->start();
}