summarylogtreecommitdiffstats
path: root/guayadeque_01a_rev1891.patch
blob: 9d9db95cae25951c058ffd5a465f4bddd350488b (plain)
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
diff --git changelog changelog
index 264cd02..de310b7 100644
--- changelog
+++ changelog
@@ -1,3 +1,6 @@
+  * Fixed some Config constructor calls
+
+2014-02-20 0.3.7
 
   * Removed Flac library dependency. Now flac images are read/writen using taglib
   * Fixed compilation without external libwxsqlite support
diff --git po/guayadeque.pot po/guayadeque.pot
index 91451d4..2c6b8f0 100644
--- po/guayadeque.pot
+++ po/guayadeque.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-01-14 21:46+0000\n"
+"POT-Creation-Date: 2014-02-25 21:21+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
diff --git src/AAListBox.cpp src/AAListBox.cpp
index 1195ca9..e6f2a40 100644
--- src/AAListBox.cpp
+++ src/AAListBox.cpp
@@ -267,7 +267,7 @@ void guAAListBox::OnCommandClicked( wxCommandEvent &event )
     {
         index = event.GetId();
 
-        guConfig * Config = ( guConfig * ) Config->Get();
+        guConfig * Config = ( guConfig * ) guConfig::Get();
         if( Config )
         {
             wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
diff --git src/AlListBox.cpp src/AlListBox.cpp
index 9a1f387..d2abd6f 100644
--- src/AlListBox.cpp
+++ src/AlListBox.cpp
@@ -406,7 +406,7 @@ void guAlListBox::OnCommandClicked( wxCommandEvent &event )
     {
         index = event.GetId();
 
-        guConfig * Config = ( guConfig * ) Config->Get();
+        guConfig * Config = ( guConfig * ) guConfig::Get();
         if( Config )
         {
             wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
diff --git src/AlbumBrowser.cpp src/AlbumBrowser.cpp
index 7dd00d1..d14fb05 100644
--- src/AlbumBrowser.cpp
+++ src/AlbumBrowser.cpp
@@ -1177,7 +1177,7 @@ void guAlbumBrowser::OnCommandClicked( const int cmdid, const int albumid )
     {
         index = cmdid;
 
-        guConfig * Config = ( guConfig * ) Config->Get();
+        guConfig * Config = ( guConfig * ) guConfig::Get();
         if( Config )
         {
             wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
@@ -1240,7 +1240,7 @@ void guAlbumBrowser::OnCommandClicked( const int cmdid, const guTrackArray &trac
     {
         Index = cmdid;
 
-        guConfig * Config = ( guConfig * ) Config->Get();
+        guConfig * Config = ( guConfig * ) guConfig::Get();
         if( Config )
         {
             wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
diff --git src/ArListBox.cpp src/ArListBox.cpp
index 59818fd..52afee5 100644
--- src/ArListBox.cpp
+++ src/ArListBox.cpp
@@ -254,7 +254,7 @@ void guArListBox::OnCommandClicked( wxCommandEvent &event )
     {
         index = event.GetId();
 
-        guConfig * Config = ( guConfig * ) Config->Get();
+        guConfig * Config = ( guConfig * ) guConfig::Get();
         if( Config )
         {
             wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
diff --git src/AudioScrobble.cpp src/AudioScrobble.cpp
index b2306f0..447999e 100644
--- src/AudioScrobble.cpp
+++ src/AudioScrobble.cpp
@@ -767,7 +767,7 @@ guASPlayedThread::ExitCode guASPlayedThread::Entry()
         {
             break;
         }
-        Sleep( guAS_SUBMIT_RETRY_TIMEOUT ); // Wait 30 Secs between submit attempts
+        Sleep( guAS_SUBMIT_TIMEOUT ); // Wait 30 Secs between submit attempts
     }
     return 0;
 }
diff --git src/AudioScrobble.h src/AudioScrobble.h
index 4eacb40..57f57fe 100644
--- src/AudioScrobble.h
+++ src/AudioScrobble.h
@@ -50,7 +50,7 @@
 #define guAS_MAX_SUBMITTRACKS       50
 
 #define guAS_SUBMIT_RETRY_TIMEOUT   30000
-#define guAS_SUBMIT_TIMEOUT         120000
+#define guAS_SUBMIT_TIMEOUT         1000
 
 #define guAS_ERROR_NOERROR          0
 #define guAS_ERROR_BANNED           1
diff --git src/DbLibrary.cpp src/DbLibrary.cpp
index e596c2a..a7995b8 100644
--- src/DbLibrary.cpp
+++ src/DbLibrary.cpp
@@ -4781,8 +4781,8 @@ int guDbLibrary::GetRandomTracks( guTrackArray * tracks, const int count, const
       }
       dbRes.Finalize();
       query = GU_TRACKS_QUERYSTR + wxString::Format( wxT( "WHERE song_albumid = %i" ), AlbumId );
-      //query += wxT( " ORDER BY song_number" );
-      query += GetSongsSortSQL( m_TracksOrder, m_TracksOrderDesc );
+      query += wxT( " ORDER BY song_disk, song_number, song_filename" );
+      //query += GetSongsSortSQL( m_TracksOrder, m_TracksOrderDesc );
   }
 
   //guLogMessage( wxT( "GetRandomTracks:\n%s" ), query.c_str() );
diff --git src/FileBrowser.cpp src/FileBrowser.cpp
index f4238cd..fd02a09 100644
--- src/FileBrowser.cpp
+++ src/FileBrowser.cpp
@@ -2248,7 +2248,7 @@ void guFileBrowser::OnFolderCommand( wxCommandEvent &event )
     int Count;
     Index = event.GetId();
 
-    guConfig * Config = ( guConfig * ) Config->Get();
+    guConfig * Config = ( guConfig * ) guConfig::Get();
     if( Config )
     {
         wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
@@ -2286,7 +2286,7 @@ void guFileBrowser::OnItemsCommand( wxCommandEvent &event )
     int Count;
     Index = event.GetId();
 
-    guConfig * Config = ( guConfig * ) Config->Get();
+    guConfig * Config = ( guConfig * ) guConfig::Get();
     if( Config )
     {
         wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
diff --git src/LastFM.cpp src/LastFM.cpp
index dba2464..14fdb90 100644
--- src/LastFM.cpp
+++ src/LastFM.cpp
@@ -483,6 +483,10 @@ guAlbumInfo guLastFM::AlbumGetInfo( const wxString &Artist, const wxString &Albu
                                 {
                                     RetVal.m_ImageLink = XmlNode->GetNodeContent();
                                 }
+                                else if( ImageSize == wxT( "mega" ) && !XmlNode->GetNodeContent().IsEmpty() )
+                                {
+                                    RetVal.m_ImageLink = XmlNode->GetNodeContent();
+                                }
                             }
                             else if( ItemName == wxT( "toptags" ) )
                             {
diff --git src/LastFMPanel.cpp src/LastFMPanel.cpp
index a627141..56d8edd 100644
--- src/LastFMPanel.cpp
+++ src/LastFMPanel.cpp
@@ -265,7 +265,7 @@ void guLastFMInfoCtrl::OnDoubleClicked( wxMouseEvent &event )
     GetSelectedTracks( &Tracks );
     if( Tracks.Count() )
     {
-        guConfig * Config = ( guConfig * ) Config->Get();
+        guConfig * Config = ( guConfig * ) guConfig::Get();
         if( m_PlayerPanel && Config )
         {
             if( Config->ReadBool( wxT( "DefaultActionEnqueue" ), false, wxT( "general" ) ) )
@@ -391,7 +391,7 @@ guArtistInfoCtrl::guArtistInfoCtrl( wxWindow * parent, guDbLibrary * db, guDbCac
 {
     m_Info = NULL;
 
-    guConfig * Config = ( guConfig * ) Config->Get();
+    guConfig * Config = ( guConfig * ) guConfig::Get();
     m_ShowLongBioText = Config->ReadBool( wxT( "ShowLongBioText" ), false, wxT( "lastfm" )  );
 
     CreateControls( parent );
@@ -406,7 +406,7 @@ guArtistInfoCtrl::~guArtistInfoCtrl()
     if( m_Info )
         delete m_Info;
 
-    guConfig * Config = ( guConfig * ) Config->Get();
+    guConfig * Config = ( guConfig * ) guConfig::Get();
     Config->WriteBool( wxT( "ShowLongBioText" ), m_ShowLongBioText, wxT( "lastfm" )  );
 
 	m_ShowMoreHyperLink->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( guArtistInfoCtrl::OnShowMoreLinkClicked ), NULL, this );
diff --git src/OnlineLinks.cpp src/OnlineLinks.cpp
index 1c62a88..30536cd 100644
--- src/OnlineLinks.cpp
+++ src/OnlineLinks.cpp
@@ -79,7 +79,7 @@ void ExecuteOnlineLink( const int linkid, const wxString &text )
     int index = linkid - ID_LINKS_BASE;
     //guLogMessage( wxT( "ExecuteOnlineLink( %i, '%s' )" ), index, text.c_str() );
 
-    guConfig * Config = ( guConfig * ) Config->Get();
+    guConfig * Config = ( guConfig * ) guConfig::Get();
     wxArrayString Links = Config->ReadAStr( wxT( "Link" ), wxEmptyString, wxT( "searchlinks/links" ) );
 
     if( index >= 0 && ( index < ( int ) Links.Count() ) )
diff --git src/PlayList.cpp src/PlayList.cpp
index 18c39f3..339ef85 100644
--- src/PlayList.cpp
+++ src/PlayList.cpp
@@ -2345,7 +2345,7 @@ void guPlayList::OnCommandClicked( wxCommandEvent &event )
     {
         index = event.GetId();
 
-        guConfig * Config = ( guConfig * ) Config->Get();
+        guConfig * Config = ( guConfig * ) guConfig::Get();
         if( Config )
         {
             wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
diff --git src/PlayerPanel.cpp src/PlayerPanel.cpp
index 2a83420..ac5136b 100644
--- src/PlayerPanel.cpp
+++ src/PlayerPanel.cpp
@@ -1596,7 +1596,7 @@ void  guPlayerPanel::OnMediaPosition( guMediaEvent &event )
             !m_NextTrackId &&
             ( m_MediaSong.m_Type != guTRACK_TYPE_RADIOSTATION ) &&
             ( CurPos > 0 ) && ( m_LastLength > 0 ) &&
-            ( ( CurPos + 5000 + ( !m_ForceGapless ? m_FadeOutTime : 0 ) ) >= m_LastLength )
+            ( ( CurPos + 1000 + ( !m_ForceGapless ? m_FadeOutTime : 0 ) ) >= m_LastLength )
           )
         {
             //if( !m_ForceGapless && m_FadeOutTime && !m_MediaSong.m_Offset && ( GetState() == guMEDIASTATE_PLAYING ) )
diff --git src/SoListBox.cpp src/SoListBox.cpp
index 872eae3..eed8eef 100644
--- src/SoListBox.cpp
+++ src/SoListBox.cpp
@@ -713,7 +713,7 @@ void guSoListBox::OnCommandClicked( wxCommandEvent &event )
     {
         index = event.GetId();
 
-        guConfig * Config = ( guConfig * ) Config->Get();
+        guConfig * Config = ( guConfig * ) guConfig::Get();
         if( Config )
         {
             wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
diff --git src/TreePanel.cpp src/TreePanel.cpp
index a01ca58..ae7b44a 100644
--- src/TreePanel.cpp
+++ src/TreePanel.cpp
@@ -709,7 +709,7 @@ void guTreeViewTreeCtrl::OnCommandClicked( wxCommandEvent &event )
 
     Index = event.GetId();
 
-    guConfig * Config = ( guConfig * ) Config->Get();
+    guConfig * Config = ( guConfig * ) guConfig::Get();
     if( Config )
     {
         wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) );
diff --git src/Utils.cpp src/Utils.cpp
index 6586330..e0fdd90 100644
--- src/Utils.cpp
+++ src/Utils.cpp
@@ -255,10 +255,7 @@ bool DownloadImage( const wxString &source, const wxString &target, const int im
     {
         if( maxwidth != -1 )
         {
-            if( maxheight != -1 )
-                Image->Rescale( maxwidth, maxheight, wxIMAGE_QUALITY_HIGH );
-            else
-                Image->Rescale( maxwidth, maxwidth, wxIMAGE_QUALITY_HIGH );
+            guImageResize( Image, maxwidth, ( maxheight != -1 ) ? maxheight : maxwidth );
         }
         RetVal = Image->SaveFile( target, imagetype );