Skip to content

Commit

Permalink
Remove embedded player and web view
Browse files Browse the repository at this point in the history
  • Loading branch information
kraxarn committed Feb 22, 2020
1 parent ba1a2f8 commit 35f0a27
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 29 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# spotify-qt
A Spotify client using Qt as a simpler, lighter alternative to the official client, inspired by [spotify-tui](https://github.com/Rigellute/spotify-tui).
Much like spotify-tui, you need an actual Spotify client running, for example [spotifyd](https://github.com/Spotifyd/spotifyd). You can also use the embedded music player if you don't feel like setting more stuff up. Keep in mind it's still pretty buggy and creates a browser instance, however, it's still more lightweight than the official client.
Much like spotify-tui, you need an actual Spotify client running, for example [spotifyd](https://github.com/Spotifyd/spotifyd), which can be configured from within the app.

Currently in beta. Most things should work, but don't be surprised when unexpected things happen.
It's also not currently available in any package manager, though, when it's a bit more stable, it will be available through AUR.
Expand Down
23 changes: 0 additions & 23 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
// Some default values to prevent unexpected stuff
playlists = nullptr;
songs = nullptr;
playerView = nullptr;
sptClient = nullptr;
volume = progress = nullptr;
nowPlaying = position = nowAlbum = nullptr;
Expand Down Expand Up @@ -397,28 +396,6 @@ QMenu *MainWindow::createMenu()
{
// Create root
auto menu = new QMenu(this);
// Testing web player
auto webPlayerOpen = menu->addAction("Embedded Player");
webPlayerOpen->setCheckable(true);
QAction::connect(webPlayerOpen, &QAction::triggered, [=](bool checked) {
// Check if already opened
if (playerView != nullptr)
{
removeDockWidget(playerView);
delete playerView;
playerView = nullptr;
return;
}
playerView = new QDockWidget(this);
auto playerWebView = new QWebEngineView(playerView);
playerView->setWindowTitle("spotify-qt embedded music player console");
playerView->setWidget(playerWebView);
playerView->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable);
// Kind of temporary I guess
playerWebView->load(QUrl(QString("https://kraxarn.github.io/spotify-qt-player/debug.html?token=%1")
.arg(Settings().accessToken())));
addDockWidget(Qt::DockWidgetArea::RightDockWidgetArea, playerView);
});
// About
auto aboutMenu = new QMenu("About");
auto aboutQt = createMenuAction("qt", "About Qt", QKeySequence::UnknownKey);
Expand Down
3 changes: 0 additions & 3 deletions src/mainwindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include <QToolButton>
#include <QMenu>
#include <QMessageBox>
#include <QWebEngineView>
#include <QWebEngineSettings>
#include <QDockWidget>
#include <QTextEdit>
#include <QApplication>
Expand All @@ -52,7 +50,6 @@ class MainWindow : public QMainWindow
QVector<spt::Playlist> *sptPlaylists;
spt::Playback current;
QNetworkAccessManager *network;
QDockWidget *playerView;
spt::ClientHandler *sptClient;
// Methods
QWidget *createCentralWidget();
Expand Down
3 changes: 2 additions & 1 deletion src/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ QGroupBox *SettingsDialog::appSettings()
appLayout->addWidget(appRefresh);
// Embedded player
auto appPlayer = new QCheckBox("Embedded player", this);
appPlayer->setToolTip("Embedded player, removes the need for an external player, but not as reliable");
appPlayer->setToolTip("Temporarily disabled for being very unreliable and too bloated");
appPlayer->setEnabled(false);
appLayout->addWidget(appPlayer, 2, 0, 1, 2);
// Start client
sptStartClient = new QCheckBox("Autostart spotifyd", this);
Expand Down
1 change: 0 additions & 1 deletion src/setupdialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <QDesktopServices>
#include <QPushButton>
#include <QCoreApplication>
#include <QWebEngineView>
#include <QMessageBox>
#include <QTcpServer>

Expand Down

0 comments on commit 35f0a27

Please sign in to comment.