bar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
bar->setIconSize(QSize(48,48));
QAction*a=mplayaction=bar->addAction(QIcon(":/play-dvd.png"),"&Play",this,SLOT(playMedia()));
- a->setToolTip("Play Media: Alt-P\nPlay without full-screen: Alt-Shift-P");
+ a->setToolTip("Play Media:\n Alt-P - Xine fullscreen\n Alt-Shift-P - Xine Window\n Alt-V - VLC fullscreen\n Alt-Shift-V - VLC Window\n Alt-M - MPV fullscreen\n Alt-Shift-M - MPV Window");
QMenu*m=new QMenu;
a->setMenu(m);
a=m->addAction("Play with Xine",this,SLOT(playMedia()),QKeySequence("Alt+P"));
a=m->addAction("Play with Xine, no FullScreen",this,[this](){this->playMedia(false);},QKeySequence("Alt+Shift+P"));
a=m->addAction("Play with VLC",this,[this](){this->playMedia(true,Player::Vlc);},QKeySequence("Alt+V"));
a=m->addAction("Play with VLC, no FullScreen",this,[this](){this->playMedia(false,Player::Vlc);},QKeySequence("Alt+Shift+V"));
+ a=m->addAction("Play with MPV",this,[this](){this->playMedia(true,Player::Mpv);},QKeySequence("Alt+M"));
+ a=m->addAction("Play with MPV, no FullScreen",this,[this](){this->playMedia(false,Player::Mpv);},QKeySequence("Alt+Shift+M"));
a=meditaction=bar->addAction(QIcon(":/configure.png"),"&Edit Description",this,SLOT(editMedia()));
a->setShortcut(QKeySequence("Alt+E"));
a->setToolTip("Edit Media Description: Alt-E");
// qDebug()<<"Searching for kino.ini in"<<tokens[1];
QFileInfo fi(path+"/kino.ini");
if(fi.exists()&&fi.isFile())mRoot<<path;
+ //find super volume and descend into .... whatever
+ fi=QFileInfo(path+"/kino.super");
+ if(fi.exists()){
+ qDebug()<<"Kino found a super volume in"<<path;
+ for(auto subdir:QDir(path).entryList(QDir::Dirs|QDir::NoDotAndDotDot)){
+ QString spath=path+"/"+subdir;
+ fi=QFileInfo(spath+"/kino.ini");
+ qDebug()<<"...checking sub-volume"<<spath;
+ if(fi.exists()&&fi.isFile())mRoot<<spath;
+ }
+ }
}
qDebug()<<"found roots:"<<mRoot;
//initialize from physical volumes
if(vol.volumeId().isNull())return false;
auto &ent=getEntry(vol,p);
if(!ent.isPlayable())return false;
- //construct MRL
- QString mrl=QString("dvd://%1/%2").arg(vol.rootdir()).arg(ent.directory());
//start; TODO: keep track of running processes
QStringList args;
if(f){
if(player==Player::Xine)args<<"-f";
- else if(player==Player::Vlc)args<<"--fullscreen";
+ else if(player==Player::Vlc||player==Player::Mpv)args<<"--fullscreen";
else qDebug()<<"OOOOPS! Unknown Player type!";
}
- args<<mrl;
- QProcess::startDetached(player==Player::Xine?"xine":"vlc",args);
+ //construct MRL
+ if(player!=Player::Mpv)
+ args<<QString("dvd://%1/%2").arg(vol.rootdir()).arg(ent.directory());
+ else
+ args<<"dvd://"<<QString("/%1/%2").arg(vol.rootdir()).arg(ent.directory());
+ //select program
+ QString prog;
+ switch(player){
+ case Player::Xine:prog="xine";break;
+ case Player::Vlc:prog="vlc";break;
+ case Player::Mpv:prog="mpv";break;
+ }
+ QProcess::startDetached(prog,args);
return true;
}