From ded3712fb4f7e8d58ea7bc1fad084f5ec43a6f09 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 5 Mar 2016 05:24:16 +0100 Subject: Play movies from USB if available If USB-Storage is mounted and available, search it for already archived movies. If found, play it. --- helper.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'helper.cpp') diff --git a/helper.cpp b/helper.cpp index 76f637a..b02c71d 100644 --- a/helper.cpp +++ b/helper.cpp @@ -152,6 +152,21 @@ namespace Helper { return retval; } + const QString createUSBPath(const QString &filename, const QString &seriesName, const QString &subtitle, int dvdNo, int seriesNo){ + QSettings s; + QString usbPath = s.value("paths/usb").toString(); + QString seriesDir = seriesName; + + if(seriesNo > 0){ + seriesDir.append(QString(" %1").arg(QString::number(seriesNo))); + }else{ + seriesDir.append(QString(" - %1").arg(subtitle)); + } + seriesDir.replace(' ', '.'); + QString retval = QString("%1/DVD_%2/%3/%4").arg(usbPath).arg(QString::number(dvdNo)).arg(seriesDir).arg(filename); + return retval; + } + QPair programData(const QString &prefix, const QString &preferred){ QSettings s; QString section = QString("programs_%1").arg(prefix); -- cgit v1.2.3-70-g09d2