[CMake+Backend] Fix discord disable, make files get appended to playlist from command line args.
This commit is contained in:
parent
3fc9a8fb78
commit
110cfd941e
|
@ -63,12 +63,13 @@ execute_process(
|
||||||
)
|
)
|
||||||
add_subdirectory(discord-rpc)
|
add_subdirectory(discord-rpc)
|
||||||
INCLUDE_DIRECTORIES(discord-rpc/include)
|
INCLUDE_DIRECTORIES(discord-rpc/include)
|
||||||
|
target_link_libraries(KittehPlayer discord-rpc)
|
||||||
endif(DISCORD)
|
endif(DISCORD)
|
||||||
|
|
||||||
add_executable(KittehPlayer ${SOURCES} ${qml_QRC})
|
add_executable(KittehPlayer ${SOURCES} ${qml_QRC})
|
||||||
|
|
||||||
# Use the Qml/Quick modules from Qt 5.
|
# Use the Qml/Quick modules from Qt 5.
|
||||||
target_link_libraries(KittehPlayer ${MPV_LIBRARIES} ${X11_LIBRARIES} ${Xext_LIBRARIES} Qt5::X11Extras discord-rpc)
|
target_link_libraries(KittehPlayer ${MPV_LIBRARIES} ${X11_LIBRARIES} ${Xext_LIBRARIES} Qt5::X11Extras)
|
||||||
|
|
||||||
qt5_use_modules(KittehPlayer Qml Quick Core Gui Widgets X11Extras)
|
qt5_use_modules(KittehPlayer Qml Quick Core Gui Widgets X11Extras)
|
||||||
|
|
||||||
|
|
|
@ -279,6 +279,11 @@ void MpvPlayerBackend::loadFile(const QVariant& filename)
|
||||||
command(QVariantList() << "loadfile" << filename);
|
command(QVariantList() << "loadfile" << filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MpvPlayerBackend::appendFile(const QVariant& filename)
|
||||||
|
{
|
||||||
|
command(QVariantList() << "loadfile" << filename << "append-play");
|
||||||
|
}
|
||||||
|
|
||||||
void MpvPlayerBackend::setVolume(const QVariant& volume)
|
void MpvPlayerBackend::setVolume(const QVariant& volume)
|
||||||
{
|
{
|
||||||
command(QVariantList() << "set"
|
command(QVariantList() << "set"
|
||||||
|
|
|
@ -57,6 +57,7 @@ public slots:
|
||||||
void setVolume(const QVariant& volume);
|
void setVolume(const QVariant& volume);
|
||||||
void addVolume(const QVariant& volume);
|
void addVolume(const QVariant& volume);
|
||||||
void loadFile(const QVariant& filename);
|
void loadFile(const QVariant& filename);
|
||||||
|
void appendFile(const QVariant& filename);
|
||||||
void seek(const QVariant& seekTime);
|
void seek(const QVariant& seekTime);
|
||||||
void seekAbsolute(const QVariant& seekTime);
|
void seekAbsolute(const QVariant& seekTime);
|
||||||
void command(const QVariant& params);
|
void command(const QVariant& params);
|
||||||
|
|
|
@ -115,7 +115,7 @@ ApplicationWindow {
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
player.loadFile(argument)
|
player.appendFile(argument)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue