1
0
Fork 0

[CMake+Backend] Fix discord disable, make files get appended to playlist from command line args.

This commit is contained in:
NamedKitten 2018-11-12 12:30:35 +00:00
parent 3fc9a8fb78
commit 110cfd941e
4 changed files with 9 additions and 2 deletions

View file

@ -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)

View file

@ -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"

View file

@ -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);

View file

@ -115,7 +115,7 @@ ApplicationWindow {
} }
} else { } else {
player.loadFile(argument) player.appendFile(argument)
} }
} }
} }