summaryrefslogtreecommitdiff
path: root/audio/last.fm/patches/no-fingerprint-lib.diff
blob: 9b0d710ab646845f57e3b109d0cff658440be7f9 (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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
diff -Naur last.fm-1.5.1.31879.orig/LastFM.pro last.fm-1.5.1.31879/LastFM.pro
--- last.fm-1.5.1.31879.orig/LastFM.pro	2008-06-18 11:46:57.000000000 +0000
+++ last.fm-1.5.1.31879/LastFM.pro	2009-03-27 19:50:51.000000000 +0000
@@ -39,6 +39,8 @@
 
 linux* {
     SUBDIRS -= src/Twiddly \
+               src/libFingerprint/fplib/pro_qmake/fplib.pro \
+               src/libFingerprint/ \
                src/Bootstrapper/ITunesDevice
 
     SUBDIRS += src/output/alsa-playback \
diff -Naur last.fm-1.5.1.31879.orig/src/DiagnosticsDialog.cpp last.fm-1.5.1.31879/src/DiagnosticsDialog.cpp
--- last.fm-1.5.1.31879.orig/src/DiagnosticsDialog.cpp	2008-06-18 11:46:55.000000000 +0000
+++ last.fm-1.5.1.31879/src/DiagnosticsDialog.cpp	2009-03-27 19:50:51.000000000 +0000
@@ -27,7 +27,10 @@
 #include "container.h"
 #include "lastfmapplication.h"
 #include "libMoose/LastFmSettings.h"
+
+#ifndef LINUX
 #include "libFingerprint/FingerprintCollector.h"
+#endif
 
 #include <QProcess>
 #include <QClipboard>
@@ -106,6 +109,7 @@
     connect( ui.scrobbleIpodButton, SIGNAL( clicked() ), SLOT( onScrobbleIpodClicked() ) );
 
     // Fingerprint collector
+#ifndef LINUX
     ui.fpQueueSizeLabel->setText( "0" );
     connect( The::app().m_fpCollector, SIGNAL( trackFingerprintingStarted( TrackInfo ) ),
              this,                     SLOT( onTrackFingerprintingStarted( TrackInfo ) ),
@@ -116,6 +120,9 @@
     connect( The::app().m_fpCollector, SIGNAL( cantFingerprintTrack( TrackInfo, QString ) ),
              this,                     SLOT( onCantFingerprintTrack( TrackInfo, QString ) ),
              Qt::QueuedConnection );
+#else
+    ui.tabWidget->removeTab( 2 );
+#endif
 
     m_logTimer = new QTimer( this );
     connect( m_logTimer, SIGNAL( timeout() ),
@@ -336,6 +343,7 @@
 }
 
 
+#ifndef LINUX
 void
 DiagnosticsDialog::onTrackFingerprintingStarted( TrackInfo track )
 {
@@ -360,7 +368,7 @@
     ui.fpCurrentTrackLabel->setText( "" );
     ui.fpQueueSizeLabel->setText( QString::number( The::app().m_fpCollector->queueSize() ) );
 }
-
+#endif
 
 void 
 DiagnosticsDialog::onLogPoll()
diff -Naur last.fm-1.5.1.31879.orig/src/DiagnosticsDialog.h last.fm-1.5.1.31879/src/DiagnosticsDialog.h
--- last.fm-1.5.1.31879.orig/src/DiagnosticsDialog.h	2008-06-18 11:46:55.000000000 +0000
+++ last.fm-1.5.1.31879/src/DiagnosticsDialog.h	2009-03-27 19:50:51.000000000 +0000
@@ -63,9 +63,11 @@
     void onRefresh();
     void onCopyToClipboard();
 
+  #ifndef LINUX
     void onTrackFingerprintingStarted( TrackInfo );
     void onTrackFingerprinted( TrackInfo );
     void onCantFingerprintTrack( TrackInfo track, QString reason );
+  #endif
 
 	void onScrobbleIpodClicked();
 	void onLogPoll();
diff -Naur last.fm-1.5.1.31879.orig/src/Radio.cpp last.fm-1.5.1.31879/src/Radio.cpp
--- last.fm-1.5.1.31879.orig/src/Radio.cpp	2008-06-18 11:46:55.000000000 +0000
+++ last.fm-1.5.1.31879/src/Radio.cpp	2009-03-27 19:50:51.000000000 +0000
@@ -129,7 +129,9 @@
         m_session = handshake->session();
         m_basePath = handshake->basePath();
         
+      #ifndef LINUX
         The::settings().setFingerprintUploadUrl( handshake->fingerprintUploadUrl() );
+      #endif
         
         setState( State_Handshaken );
 
diff -Naur last.fm-1.5.1.31879.orig/src/configwizard.cpp last.fm-1.5.1.31879/src/configwizard.cpp
--- last.fm-1.5.1.31879.orig/src/configwizard.cpp	2008-06-18 11:46:55.000000000 +0000
+++ last.fm-1.5.1.31879/src/configwizard.cpp	2009-03-27 19:51:39.000000000 +0000
@@ -750,7 +750,7 @@
 
             nextButtonClicked();
         #else
-            m_pageOffset += 7;
+            m_pageOffset += 8;
             BaseWizard::nextButtonClicked();
         #endif
 
diff -Naur last.fm-1.5.1.31879.orig/src/lastfmapplication.cpp last.fm-1.5.1.31879/src/lastfmapplication.cpp
--- last.fm-1.5.1.31879.orig/src/lastfmapplication.cpp	2008-06-18 11:46:55.000000000 +0000
+++ last.fm-1.5.1.31879/src/lastfmapplication.cpp	2009-03-27 19:50:51.000000000 +0000
@@ -26,8 +26,10 @@
 #include "confirmdialog.h"
 #include "container.h"
 #include "LastMessageBox.h"
+#ifndef LINUX
 #include "libFingerprint/FingerprintCollector.h"
 #include "libFingerprint/FingerprintQueryer.h"
+#endif
 #include "logger.h"
 #include "loginwidget.h"
 #include "MediaDeviceScrobbler.h"
@@ -167,10 +169,12 @@
     new ITunesScript( this, m_listener );
   #endif
 
+  #ifndef LINUX
     m_fpCollector = new FingerprintCollector( 1 /*number of threads*/, this );
     m_fpQueryer = new FingerprintQueryer( this );
     connect( m_fpQueryer, SIGNAL( trackFingerprinted( TrackInfo, bool ) ),
                           SLOT( onFingerprintQueryDone( TrackInfo, bool ) ) );
+  #endif
 
     m_radio = new Radio( this );
     connect( m_radio, SIGNAL( stateChanged( RadioState ) ), SLOT( onRadioStateChanged( RadioState ) ) );
@@ -365,8 +369,10 @@
     sendPostedEvents( m_scrobbler, 0 /*all event types*/ );
     //TODO send events to individual scrobblers in the manager too?
 
+  #ifndef LINUX
     delete m_fpQueryer;
     delete m_fpCollector;
+  #endif
 
     #ifdef Q_WS_MAC
         if ( !m_pidFile.remove() )
@@ -534,6 +540,7 @@
     QString password = m_user->settings().password();
     QString version = The::settings().version();
 
+  #ifndef LINUX
     // as you can see we are initialising the fingerprinter, I like this comment
     m_fpCollector->setUsername( username );
     m_fpCollector->setPasswordMd5( password );
@@ -542,6 +549,7 @@
     m_fpQueryer->setPasswordMd5( password );
     m_fpQueryer->setPasswordMd5Lower( password ); // FIXME: surely they can't be the same!
     m_fpQueryer->setVersion( The::settings().version() );
+  #endif
 
     // init radio YTIO
     m_radio->init( username, password, version );
@@ -849,12 +857,14 @@
                 if ( m_container->isVisible() )
                     fetchMetaData();
 
+              #ifndef LINUX
                 if ( QFile::exists( m_currentTrack.path() ) &&
                      The::settings().currentUser().fingerprintingEnabled() )
                 {
                     m_activeNorman = 0;
                     m_fpQueryer->fingerprint( m_currentTrack );
                 }
+              #endif
             }
         }
         break;
@@ -1167,6 +1177,7 @@
 }
 
 
+#ifndef LINUX
 void
 LastFmApplication::onFingerprintQueryDone( TrackInfo track, bool fullFpRequested )
 {
@@ -1199,6 +1210,7 @@
         }
     }
 }
+#endif
 
 
 void
diff -Naur last.fm-1.5.1.31879.orig/src/lastfmapplication.h last.fm-1.5.1.31879/src/lastfmapplication.h
--- last.fm-1.5.1.31879.orig/src/lastfmapplication.h	2008-06-18 11:46:55.000000000 +0000
+++ last.fm-1.5.1.31879/src/lastfmapplication.h	2009-03-27 19:50:51.000000000 +0000
@@ -181,7 +181,9 @@
     void onAppEvent( int event, const QVariant& );
     void onRequestReturned( class Request* request );
     void onScrobblerStatusUpdate( int, const QVariant& );
+#ifndef LINUX
     void onFingerprintQueryDone( TrackInfo, bool fullFpRequested );
+#endif
     void onNormanRequestDone( Request* r );
     void onPlaybackEndedTimerTimeout();
 
@@ -208,8 +210,10 @@
     class QTcpServer* m_control;
     class ScrobblerManager* m_scrobbler;
     class Radio* m_radio;
+#ifndef LINUX
     class FingerprintCollector* m_fpCollector;
     class FingerprintQueryer* m_fpQueryer;
+#endif
     class FrikkinNormanRequest* m_activeNorman;
 
     QPointer<class ArtistMetaDataRequest> m_activeArtistReq;
diff -Naur last.fm-1.5.1.31879.orig/src/settingsdialog.cpp last.fm-1.5.1.31879/src/settingsdialog.cpp
--- last.fm-1.5.1.31879.orig/src/settingsdialog.cpp	2008-06-18 11:46:55.000000000 +0000
+++ last.fm-1.5.1.31879/src/settingsdialog.cpp	2009-03-27 19:57:29.000000000 +0000
@@ -92,6 +92,8 @@
     ui_mediadevices.setupUi( mediadeviceWidget );
     ui_mediadevices.deviceWidget->header()->setResizeMode( QHeaderView::ResizeToContents );
     ui.pageStack->addWidget( mediadeviceWidget );
+#else
+    ui_scrobbling.groupBox->hide();
 #endif
 
     // Add icons to user icon dropdown
@@ -210,7 +212,11 @@
     connect( ui_scrobbling.dirTree, SIGNAL( dataChanged() ), this, SLOT( configChanged() ) );
     connect( ui_scrobbling.scrobblePointSlider, SIGNAL( valueChanged( int ) ), this, SLOT( configChanged() ) );
     connect( ui_scrobbling.launchWithMediaPlayerCheck, SIGNAL( toggled( bool ) ), this, SLOT( configChanged() ) );
+#ifndef LINUX
     connect( ui_scrobbling.fingerprintCheckBox, SIGNAL( stateChanged( int ) ), this, SLOT( configChanged() ) );
+#else
+    ui_scrobbling.fingerprintCheckBox->hide();
+#endif
     connect( ui_connection.proxyBox, SIGNAL( toggled( bool ) ), this, SLOT( configChanged() ) );
     connect( ui_connection.proxyHostEdit, SIGNAL( textChanged( QString ) ), this, SLOT( configChanged() ) );
     connect( ui_connection.proxyPortEdit, SIGNAL( textChanged( QString ) ), this, SLOT( configChanged() ) );
@@ -379,7 +385,9 @@
     ui_scrobbling.scrobblePointSlider->setValue( user.scrobblePoint() );
     ui_scrobbling.scrobblePointLabel->setText( QString::number( user.scrobblePoint() ) );
     ui_scrobbling.launchWithMediaPlayerCheck->setChecked( The::settings().launchWithMediaPlayer() );
+#ifndef LINUX
     ui_scrobbling.fingerprintCheckBox->setChecked( user.fingerprintingEnabled() );
+#endif
     ui_scrobbling.dirTree->setExclusions( user.excludedDirs() );
 }
 
@@ -567,7 +575,9 @@
     user.setScrobblePoint( ui_scrobbling.scrobblePointSlider->value() );
     user.setExcludedDirs( ui_scrobbling.dirTree->getExclusions() );
     The::settings().setLaunchWithMediaPlayer( ui_scrobbling.launchWithMediaPlayerCheck->isChecked() );
+#ifndef LINUX
     user.setFingerprintingEnabled( ui_scrobbling.fingerprintCheckBox->checkState() == Qt::Checked ? true : false );
+#endif
 
     pageSaved( 2 );
 }
diff -Naur last.fm-1.5.1.31879.orig/src/settingsdialog_scrobbling.ui last.fm-1.5.1.31879/src/settingsdialog_scrobbling.ui
--- last.fm-1.5.1.31879.orig/src/settingsdialog_scrobbling.ui	2008-06-18 11:46:56.000000000 +0000
+++ last.fm-1.5.1.31879/src/settingsdialog_scrobbling.ui	2009-03-27 19:57:29.000000000 +0000
@@ -175,6 +175,19 @@
      </layout>
     </widget>
    </item>
+   <item>
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>0</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
   </layout>
  </widget>
  <customwidgets>
diff -Naur last.fm-1.5.1.31879.orig/src/src.pro last.fm-1.5.1.31879/src/src.pro
--- last.fm-1.5.1.31879.orig/src/src.pro	2008-06-18 11:46:55.000000000 +0000
+++ last.fm-1.5.1.31879/src/src.pro	2009-03-27 19:50:51.000000000 +0000
@@ -217,6 +217,8 @@
     
     SOURCES -= Bootstrapper/iTunesBootstrapper.cpp \
                Bootstrapper/PluginBootstrapper.cpp
+
+    LIBS -= -lLastFmFingerprint$$EXT
 }