remove-nonfree-artwork-and-spotify.patch 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. diff -Naurp1 a/3rdparty/SPMediaKeyTap/SPMediaKeyTap.m b/3rdparty/SPMediaKeyTap/SPMediaKeyTap.m
  2. --- a/3rdparty/SPMediaKeyTap/SPMediaKeyTap.m 2020-09-24 08:34:08.000000000 +0600
  3. +++ b/3rdparty/SPMediaKeyTap/SPMediaKeyTap.m 2020-11-08 18:25:45.944167054 +0600
  4. @@ -100,3 +100,2 @@ static CGEventRef tapEventCallback(CGEve
  5. [[NSBundle mainBundle] bundleIdentifier], // your app
  6. - @"com.spotify.client",
  7. @"com.apple.iTunes",
  8. diff -Naurp1 a/CMakeLists.txt b/CMakeLists.txt
  9. --- a/CMakeLists.txt 2020-09-24 08:34:08.000000000 +0600
  10. +++ b/CMakeLists.txt 2020-11-08 18:28:33.915159255 +0600
  11. @@ -12,3 +12,2 @@ include(cmake/Version.cmake)
  12. include(cmake/Deb.cmake)
  13. -include(cmake/SpotifyVersion.cmake)
  14. include(cmake/OptionalSource.cmake)
  15. @@ -77,3 +76,2 @@ pkg_check_modules(LIBPULSE libpulse)
  16. pkg_check_modules(LIBXML libxml-2.0)
  17. -pkg_check_modules(LIBSPOTIFY libspotify>=12.1.45)
  18. pkg_check_modules(TAGLIB taglib)
  19. @@ -169,8 +167,2 @@ if (APPLE)
  20. find_library(SPARKLE Sparkle)
  21. - find_library(LIBSPOTIFY libspotify)
  22. -
  23. - if(LIBSPOTIFY_FOUND)
  24. - set(LIBSPOTIFY_INCLUDE_DIRS ${LIBSPOTIFY})
  25. - set(LIBSPOTIFY_LIBRARIES ${LIBSPOTIFY})
  26. - endif(LIBSPOTIFY_FOUND)
  27. @@ -298,15 +290,2 @@ optional_component(UDISKS2 ON "Devices:
  28. -optional_component(SPOTIFY_BLOB ON "Spotify support: non-GPL binary helper"
  29. - DEPENDS "protobuf" PROTOBUF_FOUND PROTOBUF_PROTOC_EXECUTABLE
  30. - DEPENDS "libspotify" LIBSPOTIFY_FOUND
  31. -)
  32. -
  33. -if (CRYPTOPP_FOUND OR HAVE_SPOTIFY_BLOB)
  34. - set(CRYPTOPP_OR_HAVE_SPOTIFY_BLOB ON)
  35. -endif()
  36. -
  37. -optional_component(SPOTIFY ON "Spotify support"
  38. - DEPENDS "cryptopp or spotify blob" CRYPTOPP_OR_HAVE_SPOTIFY_BLOB
  39. -)
  40. -
  41. optional_component(MOODBAR ON "Moodbar support"
  42. @@ -344,5 +323,2 @@ if(CRYPTOPP_FOUND)
  43. set(HAVE_CRYPTOPP ON)
  44. - if(HAVE_SPOTIFY)
  45. - set(HAVE_SPOTIFY_DOWNLOADER ON)
  46. - endif(HAVE_SPOTIFY)
  47. endif(CRYPTOPP_FOUND)
  48. @@ -456,5 +432,2 @@ add_subdirectory(ext/clementine-tagreade
  49. add_subdirectory(ext/libclementine-remote)
  50. -if(HAVE_SPOTIFY)
  51. - add_subdirectory(ext/libclementine-spotifyblob)
  52. -endif(HAVE_SPOTIFY)
  53. @@ -469,6 +442,2 @@ endif(HAVE_BREAKPAD)
  54. -if(HAVE_SPOTIFY_BLOB)
  55. - add_subdirectory(ext/clementine-spotifyblob)
  56. -endif(HAVE_SPOTIFY_BLOB)
  57. -
  58. if(HAVE_MOODBAR)
  59. diff -Naurp1 a/data/data.qrc b/data/data.qrc
  60. --- a/data/data.qrc 2020-09-24 08:34:08.000000000 +0600
  61. +++ b/data/data.qrc 2020-11-08 18:30:09.525154816 +0600
  62. @@ -5,3 +5,2 @@
  63. <file>clementine_remote_qr.png</file>
  64. - <file>clementine-spotify-public.pem</file>
  65. <file>currenttrack_bar_left.png</file>
  66. @@ -286,3 +285,3 @@
  67. <file>nomusic.png</file>
  68. - <file>nyancat.png</file>
  69. + <file>moognu.png</file>
  70. <file>oauthsuccess.html</file>
  71. @@ -354,3 +353,2 @@
  72. <file>providers/22x22/soundcloud.png</file>
  73. - <file>providers/22x22/spotify.png</file>
  74. <file>providers/22x22/subsonic.png</file>
  75. @@ -387,3 +385,2 @@
  76. <file>providers/32x32/soundcloud.png</file>
  77. - <file>providers/32x32/spotify.png</file>
  78. <file>providers/32x32/subsonic.png</file>
  79. @@ -420,3 +417,2 @@
  80. <file>providers/48x48/soundcloud.png</file>
  81. - <file>providers/48x48/spotify.png</file>
  82. <file>providers/48x48/subsonic.png</file>
  83. @@ -485,3 +481,2 @@
  84. <file>spinner.gif</file>
  85. - <file>spotify-attribution.png</file>
  86. <file>star-off.png</file>
  87. diff -Naurp1 a/dist/codesign.py b/dist/codesign.py
  88. --- a/dist/codesign.py 2020-09-24 08:34:08.000000000 +0600
  89. +++ b/dist/codesign.py 2020-11-08 18:31:12.019151915 +0600
  90. @@ -35,3 +35,3 @@ def main():
  91. SignPath(os.path.join(root, file), developer_id)
  92. - elif re.match(r'(clementine-spotifyblob|clementine-tagreader|gst-plugin-scanner)', file):
  93. + elif re.match(r'(clementine-tagreader|gst-plugin-scanner)', file):
  94. SignPath(os.path.join(root, file), developer_id)
  95. diff -Naurp1 a/dist/macdeploy.py b/dist/macdeploy.py
  96. --- a/dist/macdeploy.py 2020-09-24 08:34:08.000000000 +0600
  97. +++ b/dist/macdeploy.py 2020-11-08 18:31:58.517149756 +0600
  98. @@ -484,6 +484,3 @@ def main():
  99. try:
  100. - FixPlugin('clementine-spotifyblob', '.')
  101. FixPlugin('clementine-tagreader', '.')
  102. - except:
  103. - print('Failed to find blob: %s' % traceback.format_exc())
  104. diff -Naurp1 a/dist/windows/clementine.nsi.in b/dist/windows/clementine.nsi.in
  105. --- a/dist/windows/clementine.nsi.in 2020-09-24 08:34:08.000000000 +0600
  106. +++ b/dist/windows/clementine.nsi.in 2020-11-08 18:33:39.033145089 +0600
  107. @@ -189,5 +189,2 @@ Section "Delete old files" oldfiles
  108. - ; 1.0 prerelease
  109. - Delete "$INSTDIR\spotify.dll"
  110. -
  111. ; 1.0
  112. @@ -304,3 +301,2 @@ Section "Clementine" Clementine
  113. File "clementine-tagreader.exe"
  114. - File "clementine-spotifyblob.exe"
  115. File "clementine.ico"
  116. @@ -357,3 +353,2 @@ Section "Clementine" Clementine
  117. File "libspeex-1.dll"
  118. - File "libspotify.dll"
  119. File "libssl-1_1.dll"
  120. @@ -1139,3 +1134,2 @@ Section "Uninstall"
  121. Delete "$INSTDIR\clementine-tagreader.exe"
  122. - Delete "$INSTDIR\clementine-spotifyblob.exe"
  123. Delete "$INSTDIR\clementine.ico"
  124. @@ -1192,3 +1186,2 @@ Section "Uninstall"
  125. Delete "$INSTDIR\libspeex-1.dll"
  126. - Delete "$INSTDIR\libspotify.dll"
  127. Delete "$INSTDIR\libssl-1_1.dll"
  128. diff -Naurp1 a/ext/libclementine-common/core/logging.cpp b/ext/libclementine-common/core/logging.cpp
  129. --- a/ext/libclementine-common/core/logging.cpp 2020-09-24 08:34:08.000000000 +0600
  130. +++ b/ext/libclementine-common/core/logging.cpp 2020-11-08 18:34:30.977142678 +0600
  131. @@ -16,5 +16,2 @@
  132. -// Note: this file is licensed under the Apache License instead of GPL because
  133. -// it is used by the Spotify blob which links against libspotify and is not GPL
  134. -// compatible.
  135. diff -Naurp1 a/ext/libclementine-common/core/logging.h b/ext/libclementine-common/core/logging.h
  136. --- a/ext/libclementine-common/core/logging.h 2020-09-24 08:34:08.000000000 +0600
  137. +++ b/ext/libclementine-common/core/logging.h 2020-11-08 18:35:26.695140091 +0600
  138. @@ -16,5 +16,2 @@
  139. -// Note: this file is licensed under the Apache License instead of GPL because
  140. -// it is used by the Spotify blob which links against libspotify and is not GPL
  141. -// compatible.
  142. diff -Naurp1 a/ext/libclementine-common/core/messagehandler.cpp b/ext/libclementine-common/core/messagehandler.cpp
  143. --- a/ext/libclementine-common/core/messagehandler.cpp 2020-09-24 08:34:08.000000000 +0600
  144. +++ b/ext/libclementine-common/core/messagehandler.cpp 2020-11-08 18:35:45.766139206 +0600
  145. @@ -16,5 +16,2 @@
  146. -// Note: this file is licensed under the Apache License instead of GPL because
  147. -// it is used by the Spotify blob which links against libspotify and is not GPL
  148. -// compatible.
  149. diff -Naurp1 a/ext/libclementine-common/core/messagehandler.h b/ext/libclementine-common/core/messagehandler.h
  150. --- a/ext/libclementine-common/core/messagehandler.h 2020-09-24 08:34:08.000000000 +0600
  151. +++ b/ext/libclementine-common/core/messagehandler.h 2020-11-08 18:36:05.359138296 +0600
  152. @@ -16,5 +16,2 @@
  153. -// Note: this file is licensed under the Apache License instead of GPL because
  154. -// it is used by the Spotify blob which links against libspotify and is not GPL
  155. -// compatible.
  156. diff -Naurp1 a/ext/libclementine-common/core/override.h b/ext/libclementine-common/core/override.h
  157. --- a/ext/libclementine-common/core/override.h 2020-09-24 08:34:08.000000000 +0600
  158. +++ b/ext/libclementine-common/core/override.h 2020-11-08 18:36:26.411137319 +0600
  159. @@ -16,5 +16,2 @@
  160. -// Note: this file is licensed under the Apache License instead of GPL because
  161. -// it is used by the Spotify blob which links against libspotify and is not GPL
  162. -// compatible.
  163. diff -Naurp1 a/src/analyzers/rainbowanalyzer.cpp b/src/analyzers/rainbowanalyzer.cpp
  164. --- a/src/analyzers/rainbowanalyzer.cpp 2020-09-24 08:34:08.000000000 +0600
  165. +++ b/src/analyzers/rainbowanalyzer.cpp 2020-11-08 18:40:32.914125874 +0600
  166. @@ -43,3 +43,3 @@ const int Rainbow::RainbowAnalyzer::kSle
  167. -const char* Rainbow::NyanCatAnalyzer::kName = "Nyanalyzer Cat";
  168. +const char* Rainbow::NyanCatAnalyzer::kName = "MooGNU";
  169. const char* Rainbow::RainbowDashAnalyzer::kName = "Rainbow Dash";
  170. @@ -60,3 +60,3 @@ Rainbow::RainbowAnalyzer::RainbowAnalyze
  171. rainbowtype = rbtype;
  172. - cat_dash_[0] = QPixmap(":/nyancat.png");
  173. + cat_dash_[0] = QPixmap(":/moognu.png");
  174. cat_dash_[1] = QPixmap(":/rainbowdash.png");
  175. @@ -194,4 +194,4 @@ void Rainbow::RainbowAnalyzer::analyze(Q
  176. - // Draw rainbow analyzer (nyan cat or rainbowdash)
  177. - // Nyan nyan nyan nyan dash dash dash dash.
  178. + // Draw rainbow analyzer (moo gnu or rainbowdash)
  179. + // Moo moo moo moo dash dash dash dash.
  180. if (!is_playing_) {
  181. diff -Naurp1 a/src/CMakeLists.txt b/src/CMakeLists.txt
  182. --- a/src/CMakeLists.txt 2020-09-24 08:34:08.000000000 +0600
  183. +++ b/src/CMakeLists.txt 2020-11-08 18:38:37.819131218 +0600
  184. @@ -49,6 +49,2 @@ include_directories(${CMAKE_SOURCE_DIR}/
  185. include_directories(${CMAKE_BINARY_DIR}/ext/libclementine-remote)
  186. -if(HAVE_SPOTIFY)
  187. - include_directories(${CMAKE_SOURCE_DIR}/ext/libclementine-spotifyblob)
  188. - include_directories(${CMAKE_BINARY_DIR}/ext/libclementine-spotifyblob)
  189. -endif(HAVE_SPOTIFY)
  190. @@ -307,3 +303,2 @@ set(SOURCES
  191. songinfo/songplaystats.cpp
  192. - songinfo/spotifyimages.cpp
  193. songinfo/streamdiscoverer.cpp
  194. @@ -601,3 +596,2 @@ set(HEADERS
  195. songinfo/songplaystats.h
  196. - songinfo/spotifyimages.h
  197. songinfo/streamdiscoverer.h
  198. @@ -847,29 +841,2 @@ optional_source(HAVE_LIBLASTFM
  199. -# Spotify support
  200. -optional_source(HAVE_SPOTIFY
  201. - SOURCES
  202. - internet/spotify/spotifyserver.cpp
  203. - internet/spotify/spotifyservice.cpp
  204. - internet/spotify/spotifysettingspage.cpp
  205. - globalsearch/spotifysearchprovider.cpp
  206. - HEADERS
  207. - globalsearch/spotifysearchprovider.h
  208. - internet/spotify/spotifyserver.h
  209. - internet/spotify/spotifyservice.h
  210. - internet/spotify/spotifysettingspage.h
  211. - UI
  212. - internet/spotify/spotifysettingspage.ui
  213. -)
  214. -
  215. -if(HAVE_SPOTIFY)
  216. - optional_source(HAVE_SPOTIFY_DOWNLOADER
  217. - SOURCES
  218. - internet/spotify/spotifyblobdownloader.cpp
  219. - HEADERS
  220. - internet/spotify/spotifyblobdownloader.h
  221. - INCLUDE_DIRECTORIES
  222. - ${CRYPTOPP_INCLUDE_DIRS}
  223. - )
  224. -endif(HAVE_SPOTIFY)
  225. -
  226. # Platform specific - OS X
  227. @@ -1331,13 +1298,2 @@ endif(HAVE_BREAKPAD)
  228. -if(HAVE_SPOTIFY)
  229. - target_link_libraries(clementine_lib clementine-spotifyblob-messages)
  230. -endif(HAVE_SPOTIFY)
  231. -
  232. -if(HAVE_SPOTIFY_DOWNLOADER)
  233. - target_link_libraries(clementine_lib
  234. - ${CRYPTOPP_LIBRARIES}
  235. - )
  236. - link_directories(${CRYPTOPP_LIBRARY_DIRS})
  237. -endif(HAVE_SPOTIFY_DOWNLOADER)
  238. -
  239. if(HAVE_LIBPULSE)
  240. @@ -1428,6 +1384,2 @@ target_link_libraries(clementine
  241. -# macdeploy.py relies on the blob being built first.
  242. -if(HAVE_SPOTIFY_BLOB)
  243. - add_dependencies(clementine clementine-spotifyblob)
  244. -endif(HAVE_SPOTIFY_BLOB)
  245. add_dependencies(clementine clementine-tagreader)
  246. diff -Naurp1 a/src/config.h.in b/src/config.h.in
  247. --- a/src/config.h.in 2020-09-24 08:34:08.000000000 +0600
  248. +++ b/src/config.h.in 2020-11-08 18:41:18.375123763 +0600
  249. @@ -44,3 +44,2 @@
  250. #cmakedefine HAVE_SPARKLE
  251. -#cmakedefine HAVE_SPOTIFY_DOWNLOADER
  252. #cmakedefine HAVE_UDISKS2
  253. @@ -49,3 +48,2 @@
  254. #cmakedefine HAVE_TRANSLATIONS
  255. -#cmakedefine HAVE_SPOTIFY
  256. #cmakedefine TAGLIB_HAS_OPUS
  257. diff -Naurp1 a/src/core/backgroundstreams.cpp b/src/core/backgroundstreams.cpp
  258. --- a/src/core/backgroundstreams.cpp 2020-09-24 08:34:08.000000000 +0600
  259. +++ b/src/core/backgroundstreams.cpp 2020-11-08 18:42:05.017121598 +0600
  260. @@ -30,4 +30,2 @@ const char* BackgroundStreams::kSettings
  261. const char* BackgroundStreams::kHypnotoadUrl = "hypnotoad:///";
  262. -const char* BackgroundStreams::kRainUrl =
  263. - "http://data.clementine-player.org/rainymood";
  264. const char* BackgroundStreams::kEnterpriseUrl = "enterprise:///";
  265. @@ -46,3 +44,2 @@ void BackgroundStreams::LoadStreams() {
  266. AddStream(QT_TR_NOOP("Hypnotoad"), QUrl(kHypnotoadUrl));
  267. - AddStream(QT_TR_NOOP("Rain"), QUrl(kRainUrl));
  268. }
  269. diff -Naurp1 a/src/core/timeconstants.h b/src/core/timeconstants.h
  270. --- a/src/core/timeconstants.h 2020-09-24 08:34:08.000000000 +0600
  271. +++ b/src/core/timeconstants.h 2020-11-08 18:42:34.981120207 +0600
  272. @@ -18,6 +18,2 @@
  273. -// Note: this file is licensed under the Apache License instead of GPL because
  274. -// it is used by the Spotify blob which links against libspotify and is not GPL
  275. -// compatible.
  276. -
  277. #ifndef CORE_TIMECONSTANTS_H_
  278. diff -Naurp1 a/src/core/utilities.cpp b/src/core/utilities.cpp
  279. --- a/src/core/utilities.cpp 2020-09-24 08:34:08.000000000 +0600
  280. +++ b/src/core/utilities.cpp 2020-11-08 18:43:04.465118838 +0600
  281. @@ -399,5 +399,2 @@ QString GetConfigPath(ConfigPath config)
  282. - case Path_LocalSpotifyBlob:
  283. - return GetConfigPath(Path_Root) + "/spotifyblob";
  284. -
  285. default:
  286. diff -Naurp1 a/src/core/utilities.h b/src/core/utilities.h
  287. --- a/src/core/utilities.h 2020-09-24 08:34:08.000000000 +0600
  288. +++ b/src/core/utilities.h 2020-11-08 18:43:24.698117899 +0600
  289. @@ -137,3 +137,2 @@ enum ConfigPath {
  290. Path_DefaultMusicLibrary,
  291. - Path_LocalSpotifyBlob,
  292. Path_MoodbarCache,
  293. diff -Naurp1 a/src/covers/albumcoverloader.cpp b/src/covers/albumcoverloader.cpp
  294. --- a/src/covers/albumcoverloader.cpp 2020-09-24 08:34:08.000000000 +0600
  295. +++ b/src/covers/albumcoverloader.cpp 2020-11-08 18:46:13.241110074 +0600
  296. @@ -36,5 +36,2 @@
  297. #include "internet/core/internetmodel.h"
  298. -#ifdef HAVE_SPOTIFY
  299. -#include "internet/spotify/spotifyservice.h"
  300. -#endif
  301. @@ -44,4 +41,3 @@ AlbumCoverLoader::AlbumCoverLoader(QObje
  302. next_id_(1),
  303. - network_(new NetworkAccessManager(this)),
  304. - connected_spotify_(false) {
  305. + network_(new NetworkAccessManager(this)) {
  306. setObjectName("Album cover loader");
  307. @@ -183,25 +179,2 @@ AlbumCoverLoader::TryLoadResult AlbumCov
  308. }
  309. -#ifdef HAVE_SPOTIFY
  310. - else if (filename.toLower().startsWith("spotify://image/")) {
  311. - // HACK: we should add generic image URL handlers
  312. - SpotifyService* spotify = InternetModel::Service<SpotifyService>();
  313. -
  314. - if (!connected_spotify_) {
  315. - connect(spotify, SIGNAL(ImageLoaded(QString, QImage)),
  316. - SLOT(SpotifyImageLoaded(QString, QImage)));
  317. - connected_spotify_ = true;
  318. - }
  319. -
  320. - QString id = QUrl(filename).path();
  321. - if (id.startsWith('/')) {
  322. - id.remove(0, 1);
  323. - }
  324. - remote_spotify_tasks_.insert(id, task);
  325. -
  326. - // Need to schedule this in the spotify service's thread
  327. - QMetaObject::invokeMethod(spotify, "LoadImage", Qt::QueuedConnection,
  328. - Q_ARG(QString, id));
  329. - return TryLoadResult(true, false, QImage());
  330. - }
  331. -#endif
  332. else if (filename.isEmpty()) {
  333. @@ -218,14 +191,2 @@ AlbumCoverLoader::TryLoadResult AlbumCov
  334. -#ifdef HAVE_SPOTIFY
  335. -void AlbumCoverLoader::SpotifyImageLoaded(const QString& id,
  336. - const QImage& image) {
  337. - if (!remote_spotify_tasks_.contains(id)) return;
  338. -
  339. - Task task = remote_spotify_tasks_.take(id);
  340. - QImage scaled = ScaleAndPad(task.options, image);
  341. - emit ImageLoaded(task.id, scaled);
  342. - emit ImageLoaded(task.id, scaled, image);
  343. -}
  344. -#endif
  345. -
  346. void AlbumCoverLoader::RemoteFetchFinished(QNetworkReply* reply) {
  347. diff -Naurp1 a/src/covers/albumcoverloader.h b/src/covers/albumcoverloader.h
  348. --- a/src/covers/albumcoverloader.h 2020-09-24 08:34:08.000000000 +0600
  349. +++ b/src/covers/albumcoverloader.h 2020-11-08 18:47:03.475107741 +0600
  350. @@ -69,5 +69,2 @@ class AlbumCoverLoader : public QObject
  351. void RemoteFetchFinished(QNetworkReply* reply);
  352. -#ifdef HAVE_SPOTIFY
  353. - void SpotifyImageLoaded(const QString& url, const QImage& image);
  354. -#endif
  355. @@ -111,3 +108,2 @@ class AlbumCoverLoader : public QObject
  356. QMap<QNetworkReply*, Task> remote_tasks_;
  357. - QMap<QString, Task> remote_spotify_tasks_;
  358. quint64 next_id_;
  359. @@ -116,4 +112,2 @@ class AlbumCoverLoader : public QObject
  360. - bool connected_spotify_;
  361. -
  362. static const int kMaxRedirects = 3;
  363. diff -Naurp1 a/src/engines/gstenginepipeline.cpp b/src/engines/gstenginepipeline.cpp
  364. --- a/src/engines/gstenginepipeline.cpp 2020-09-24 08:34:08.000000000 +0600
  365. +++ b/src/engines/gstenginepipeline.cpp 2020-11-08 18:49:12.699101742 +0600
  366. @@ -38,6 +38,2 @@
  367. #include "internet/core/internetmodel.h"
  368. -#ifdef HAVE_SPOTIFY
  369. -#include "internet/spotify/spotifyserver.h"
  370. -#include "internet/spotify/spotifyservice.h"
  371. -#endif
  372. @@ -172,41 +168,2 @@ GstElement* GstEnginePipeline::CreateDec
  373. GstElement* new_bin = nullptr;
  374. -#ifdef HAVE_SPOTIFY
  375. - if (url.scheme() == "spotify") {
  376. - new_bin = gst_bin_new("spotify_bin");
  377. - if (!new_bin) return nullptr;
  378. -
  379. - // Create elements
  380. - GstElement* src = engine_->CreateElement("tcpserversrc", new_bin);
  381. - if (!src) {
  382. - gst_object_unref(GST_OBJECT(new_bin));
  383. - return nullptr;
  384. - }
  385. - GstElement* gdp = engine_->CreateElement("gdpdepay", new_bin);
  386. - if (!gdp) {
  387. - gst_object_unref(GST_OBJECT(new_bin));
  388. - return nullptr;
  389. - }
  390. -
  391. - // Pick a port number
  392. - const int port = Utilities::PickUnusedPort();
  393. - g_object_set(G_OBJECT(src), "host", "127.0.0.1", nullptr);
  394. - g_object_set(G_OBJECT(src), "port", port, nullptr);
  395. -
  396. - // Link the elements
  397. - gst_element_link(src, gdp);
  398. -
  399. - // Add a ghost pad
  400. - GstPad* pad = gst_element_get_static_pad(gdp, "src");
  401. - gst_element_add_pad(GST_ELEMENT(new_bin), gst_ghost_pad_new("src", pad));
  402. - gst_object_unref(GST_OBJECT(pad));
  403. -
  404. - // Tell spotify to start sending data to us.
  405. - SpotifyServer* spotify_server =
  406. - InternetModel::Service<SpotifyService>()->server();
  407. - // Need to schedule this in the spotify server's thread
  408. - QMetaObject::invokeMethod(
  409. - spotify_server, "StartPlayback", Qt::QueuedConnection,
  410. - Q_ARG(QString, url.toString()), Q_ARG(quint16, port));
  411. - } else {
  412. -#endif
  413. QByteArray uri = GstUriFromUrl(url);
  414. @@ -220,5 +177,2 @@ GstElement* GstEnginePipeline::CreateDec
  415. this);
  416. -#ifdef HAVE_SPOTIFY
  417. - }
  418. -#endif
  419. @@ -1020,10 +974,3 @@ void GstEnginePipeline::SourceDrainedCal
  420. - if (instance->has_next_valid_url() &&
  421. - // I'm not sure why, but calling this when previous track is a local song
  422. - // and the next track is a Spotify song is buggy: the Spotify song will
  423. - // not start or with some offset. So just do nothing here: when the song
  424. - // finished, EndOfStreamReached/TrackEnded will be emitted anyway so
  425. - // NextItem will be called.
  426. - !(instance->current_.url_.scheme() != "spotify" &&
  427. - instance->next_.url_.scheme() == "spotify")) {
  428. + if (instance->has_next_valid_url()) {
  429. instance->TransitionToNext();
  430. @@ -1140,22 +1087,2 @@ GstState GstEnginePipeline::state() cons
  431. QFuture<GstStateChangeReturn> GstEnginePipeline::SetState(GstState state) {
  432. -#ifdef HAVE_SPOTIFY
  433. - if (current_.url_.scheme() == "spotify" && !buffering_) {
  434. - const GstState current_state = this->state();
  435. -
  436. - if (state == GST_STATE_PAUSED && current_state == GST_STATE_PLAYING) {
  437. - SpotifyService* spotify = InternetModel::Service<SpotifyService>();
  438. -
  439. - // Need to schedule this in the spotify service's thread
  440. - QMetaObject::invokeMethod(spotify, "SetPaused", Qt::QueuedConnection,
  441. - Q_ARG(bool, true));
  442. - } else if (state == GST_STATE_PLAYING &&
  443. - current_state == GST_STATE_PAUSED) {
  444. - SpotifyService* spotify = InternetModel::Service<SpotifyService>();
  445. -
  446. - // Need to schedule this in the spotify service's thread
  447. - QMetaObject::invokeMethod(spotify, "SetPaused", Qt::QueuedConnection,
  448. - Q_ARG(bool, false));
  449. - }
  450. - }
  451. -#endif
  452. return ConcurrentRun::Run<GstStateChangeReturn, GstElement*, GstState>(
  453. diff -Naurp1 a/src/internet/core/internetmodel.cpp b/src/internet/core/internetmodel.cpp
  454. --- a/src/internet/core/internetmodel.cpp 2020-09-24 08:34:08.000000000 +0600
  455. +++ b/src/internet/core/internetmodel.cpp 2020-11-08 18:50:17.387098738 +0600
  456. @@ -61,5 +61,2 @@
  457. #endif
  458. -#ifdef HAVE_SPOTIFY
  459. -#include "internet/spotify/spotifyservice.h"
  460. -#endif
  461. @@ -96,5 +93,2 @@ InternetModel::InternetModel(Application
  462. AddService(new IntergalacticFMService(app, this));
  463. -#ifdef HAVE_SPOTIFY
  464. - AddService(new SpotifyService(app, this));
  465. -#endif
  466. AddService(new SubsonicService(app, this));
  467. diff -Naurp1 a/src/main.cpp b/src/main.cpp
  468. --- a/src/main.cpp 2020-09-24 08:34:08.000000000 +0600
  469. +++ b/src/main.cpp 2020-11-08 18:50:44.353097486 +0600
  470. @@ -142,4 +142,2 @@ void SetEnv(const char* key, const QStri
  471. -// This must be done early so that the spotify blob process also picks up
  472. -// these environment variables.
  473. void SetGstreamerEnvironment() {
  474. diff -Naurp1 a/src/playlist/playlistbackend.h b/src/playlist/playlistbackend.h
  475. --- a/src/playlist/playlistbackend.h 2020-09-24 08:34:08.000000000 +0600
  476. +++ b/src/playlist/playlistbackend.h 2020-11-08 18:51:23.355095676 +0600
  477. @@ -49,4 +49,2 @@ class PlaylistBackend : public QObject {
  478. - // Special playlists have different behaviour, eg. the "spotify-search"
  479. - // type has a spotify search box at the top, replacing the ordinary filter.
  480. QString special_type;
  481. diff -Naurp1 a/src/playlist/playlistdelegates.cpp b/src/playlist/playlistdelegates.cpp
  482. --- a/src/playlist/playlistdelegates.cpp 2020-09-24 08:34:08.000000000 +0600
  483. +++ b/src/playlist/playlistdelegates.cpp 2020-11-08 18:52:14.753093289 +0600
  484. @@ -460,5 +460,3 @@ QPixmap SongSourceDelegate::LookupPixmap
  485. } else {
  486. - if (url.scheme() == "spotify") {
  487. - icon = IconLoader::Load("spotify", IconLoader::Provider);
  488. - } else if (url.scheme() == "file") {
  489. + if (url.scheme() == "file") {
  490. icon = IconLoader::Load("folder-sound", IconLoader::Base);
  491. diff -Naurp1 a/src/songinfo/artistinfoview.cpp b/src/songinfo/artistinfoview.cpp
  492. --- a/src/songinfo/artistinfoview.cpp 2020-09-24 08:34:08.000000000 +0600
  493. +++ b/src/songinfo/artistinfoview.cpp 2020-11-08 18:53:07.451090843 +0600
  494. @@ -22,3 +22,2 @@
  495. #include "songinfo/songkickconcerts.h"
  496. -#include "songinfo/spotifyimages.h"
  497. #include "widgets/prettyimageview.h"
  498. @@ -27,3 +26,2 @@ ArtistInfoView::ArtistInfoView(QWidget*
  499. fetcher_->AddProvider(new SongkickConcerts);
  500. - fetcher_->AddProvider(new SpotifyImages);
  501. fetcher_->AddProvider(new ArtistBiography);
  502. diff -Naurp1 a/src/ui/about.cpp b/src/ui/about.cpp
  503. --- a/src/ui/about.cpp 2020-09-24 08:34:08.000000000 +0600
  504. +++ b/src/ui/about.cpp 2020-11-08 18:54:19.674087490 +0600
  505. @@ -91,3 +91,2 @@ QString About::MakeHtml() const {
  506. ret += QString("<p><b>%1</b>").arg(tr("And:"));
  507. - ret += QString("<br /><a href=\"http://rainymood.com\">Rainy Mood</a>");
  508. ret += QString(
  509. @@ -99,7 +98,2 @@ QString About::MakeHtml() const {
  510. - ret +=
  511. - "<p>This product uses Music by Spotify but is not endorsed, certified "
  512. - "or otherwise approved in any way by Spotify. Spotify is the registered "
  513. - "trade mark of the Spotify Group.</p>";
  514. -
  515. return ret;
  516. diff -Naurp1 a/src/ui/settingsdialog.cpp b/src/ui/settingsdialog.cpp
  517. --- a/src/ui/settingsdialog.cpp 2020-09-24 08:34:08.000000000 +0600
  518. +++ b/src/ui/settingsdialog.cpp 2020-11-08 18:55:04.412085413 +0600
  519. @@ -79,6 +79,2 @@
  520. -#ifdef HAVE_SPOTIFY
  521. -#include "internet/spotify/spotifysettingspage.h"
  522. -#endif
  523. -
  524. #include <QAbstractButton>
  525. @@ -179,6 +175,2 @@ SettingsDialog::SettingsDialog(Applicati
  526. #endif
  527. -
  528. -#ifdef HAVE_SPOTIFY
  529. - AddPage(Page_Spotify, new SpotifySettingsPage(this), providers);
  530. -#endif
  531. diff -Naurp1 a/src/ui/settingsdialog.h b/src/ui/settingsdialog.h
  532. --- a/src/ui/settingsdialog.h 2020-09-24 08:34:08.000000000 +0600
  533. +++ b/src/ui/settingsdialog.h 2020-11-08 18:55:22.257084584 +0600
  534. @@ -71,3 +71,2 @@ class SettingsDialog : public QDialog {
  535. Page_SoundCloud,
  536. - Page_Spotify,
  537. Page_Magnatune,