Enable setting for skip metadata retrieval on database scanning.
Enabled settings for enabling/disabling USB/WiFi monitoring. Make sure to init properly in the db multimedia files copied to the PC. Translate system Qt widgets.
This commit is contained in:
@@ -105,27 +105,27 @@
|
|||||||
<translation type="obsolete">Agregadas %1 entradas a la base de datos</translation>
|
<translation type="obsolete">Agregadas %1 entradas a la base de datos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="41"/>
|
<location filename="../../src/clientmanager.cpp" line="43"/>
|
||||||
<source>Added %1 items to the database</source>
|
<source>Added %1 items to the database</source>
|
||||||
<translation>Agregadas %1 entradas a la base de datos</translation>
|
<translation>Agregadas %1 entradas a la base de datos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="43"/>
|
<location filename="../../src/clientmanager.cpp" line="45"/>
|
||||||
<source>Database indexing aborted by user</source>
|
<source>Database indexing aborted by user</source>
|
||||||
<translation>Actualización de la base de datos cancelada por el usuario</translation>
|
<translation>Actualización de la base de datos cancelada por el usuario</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="56"/>
|
<location filename="../../src/clientmanager.cpp" line="58"/>
|
||||||
<source>Cannot initialize VitaMTP library</source>
|
<source>Cannot initialize VitaMTP library</source>
|
||||||
<translation>No se pudo inicializar VitaMTP</translation>
|
<translation>No se pudo inicializar VitaMTP</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="116"/>
|
<location filename="../../src/clientmanager.cpp" line="123"/>
|
||||||
<source>Cannot refresh the database while is in use</source>
|
<source>Cannot refresh the database while is in use</source>
|
||||||
<translation>No se puede actualizar la base de datos mientras se encuentre en uso</translation>
|
<translation>No se puede actualizar la base de datos mientras se encuentre en uso</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="118"/>
|
<location filename="../../src/clientmanager.cpp" line="125"/>
|
||||||
<source>No PS Vita system has been registered</source>
|
<source>No PS Vita system has been registered</source>
|
||||||
<translation>Nigún sistema PS Vita ha sido registrado</translation>
|
<translation>Nigún sistema PS Vita ha sido registrado</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -137,8 +137,8 @@
|
|||||||
<translation type="obsolete">Conectado a </translation>
|
<translation type="obsolete">Conectado a </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/cmaclient.cpp" line="135"/>
|
|
||||||
<location filename="../../src/cmaclient.cpp" line="138"/>
|
<location filename="../../src/cmaclient.cpp" line="138"/>
|
||||||
|
<location filename="../../src/cmaclient.cpp" line="141"/>
|
||||||
<source>Connected to %1 (PS Vita)</source>
|
<source>Connected to %1 (PS Vita)</source>
|
||||||
<translation>Conectado a %1 (PS Vita)</translation>
|
<translation>Conectado a %1 (PS Vita)</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="230"/>
|
<location filename="../../src/forms/configwidget.ui" line="230"/>
|
||||||
<source><html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Advanced settings</span></p></body></html></source>
|
<source><html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Advanced settings</span></p></body></html></source>
|
||||||
<translation type="unfinished"></translation>
|
<translation><html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Ajustes Avanzados</span></p></body></html></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="237"/>
|
<location filename="../../src/forms/configwidget.ui" line="237"/>
|
||||||
@@ -244,57 +244,57 @@
|
|||||||
<translation>Modo desconectado</translation>
|
<translation>Modo desconectado</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="250"/>
|
<location filename="../../src/forms/configwidget.ui" line="247"/>
|
||||||
<source>Skip metadata extraction</source>
|
<source>Skip metadata extraction</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Saltar la extracción de metadatos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="260"/>
|
<location filename="../../src/forms/configwidget.ui" line="271"/>
|
||||||
<source>Update database automatically when files on the PC are changed</source>
|
<source>Update database automatically when files on the PC are changed</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished">Actualizar la base de datos automaticamente</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="270"/>
|
<location filename="../../src/forms/configwidget.ui" line="254"/>
|
||||||
<source>Disable USB monitoring</source>
|
<source>Disable USB monitoring</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Deshabilitar monitoreo USB</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../../src/forms/configwidget.ui" line="261"/>
|
||||||
|
<source>Disable Wi-Fi monitoring</source>
|
||||||
|
<translation>Deshabilitar monitoreo WiFi</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="280"/>
|
<location filename="../../src/forms/configwidget.ui" line="280"/>
|
||||||
<source>Disable Wi-Fi monitoring</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="../../src/forms/configwidget.ui" line="289"/>
|
|
||||||
<source>Database backend</source>
|
<source>Database backend</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Almacenaje de base de datos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="300"/>
|
<location filename="../../src/forms/configwidget.ui" line="291"/>
|
||||||
<source>In Memory</source>
|
<source>In Memory</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>En memoria</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="96"/>
|
<location filename="../../src/forms/configwidget.cpp" line="101"/>
|
||||||
<source>Select the folder to be used as a photo source</source>
|
<source>Select the folder to be used as a photo source</source>
|
||||||
<translation>Seleccione el directorio a ser utilizado como origen de fotos</translation>
|
<translation>Seleccione el directorio a ser utilizado como origen de fotos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="101"/>
|
<location filename="../../src/forms/configwidget.cpp" line="106"/>
|
||||||
<source>Select the folder to be used as a music source</source>
|
<source>Select the folder to be used as a music source</source>
|
||||||
<translation>Seleccione el directorio a ser utilizado como origen de música</translation>
|
<translation>Seleccione el directorio a ser utilizado como origen de música</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="106"/>
|
<location filename="../../src/forms/configwidget.cpp" line="111"/>
|
||||||
<source>Select the folder to be used as a video source</source>
|
<source>Select the folder to be used as a video source</source>
|
||||||
<translation>Seleccione el directorio a ser utilizado como origen de videos</translation>
|
<translation>Seleccione el directorio a ser utilizado como origen de videos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="111"/>
|
<location filename="../../src/forms/configwidget.cpp" line="116"/>
|
||||||
<source>Select the folder to be used to save PS Vita games and backups</source>
|
<source>Select the folder to be used to save PS Vita games and backups</source>
|
||||||
<translation>Seleccione el directorio a ser utilizado para guardar juegos y respaldos</translation>
|
<translation>Seleccione el directorio a ser utilizado para guardar juegos y respaldos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="116"/>
|
<location filename="../../src/forms/configwidget.cpp" line="121"/>
|
||||||
<source>Select the folder to be used to fetch software updates</source>
|
<source>Select the folder to be used to fetch software updates</source>
|
||||||
<translation>Seleccione el directorio a ser utilizado para extraer actualizaciones de software</translation>
|
<translation>Seleccione el directorio a ser utilizado para extraer actualizaciones de software</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>HTTPDownloader</name>
|
<name>HTTPDownloader</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/httpdownloader.cpp" line="154"/>
|
<location filename="../../src/httpdownloader.cpp" line="153"/>
|
||||||
<source>Network error: %1</source>
|
<source>Network error: %1</source>
|
||||||
<translation>Error de red: %1</translation>
|
<translation>Error de red: %1</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@@ -105,27 +105,27 @@
|
|||||||
<translation type="obsolete">%1個の項目をデータベースに追加しました</translation>
|
<translation type="obsolete">%1個の項目をデータベースに追加しました</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="41"/>
|
<location filename="../../src/clientmanager.cpp" line="43"/>
|
||||||
<source>Added %1 items to the database</source>
|
<source>Added %1 items to the database</source>
|
||||||
<translation>%1個の項目をデータベースに追加しました</translation>
|
<translation>%1個の項目をデータベースに追加しました</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="43"/>
|
<location filename="../../src/clientmanager.cpp" line="45"/>
|
||||||
<source>Database indexing aborted by user</source>
|
<source>Database indexing aborted by user</source>
|
||||||
<translation>データベース構築がユーザーにより中止されました</translation>
|
<translation>データベース構築がユーザーにより中止されました</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="56"/>
|
<location filename="../../src/clientmanager.cpp" line="58"/>
|
||||||
<source>Cannot initialize VitaMTP library</source>
|
<source>Cannot initialize VitaMTP library</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="116"/>
|
<location filename="../../src/clientmanager.cpp" line="123"/>
|
||||||
<source>Cannot refresh the database while is in use</source>
|
<source>Cannot refresh the database while is in use</source>
|
||||||
<translation>使用中にはデータベースを更新できません</translation>
|
<translation>使用中にはデータベースを更新できません</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/clientmanager.cpp" line="118"/>
|
<location filename="../../src/clientmanager.cpp" line="125"/>
|
||||||
<source>No PS Vita system has been registered</source>
|
<source>No PS Vita system has been registered</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -137,8 +137,8 @@
|
|||||||
<translation type="obsolete">次のデバイスに接続しました </translation>
|
<translation type="obsolete">次のデバイスに接続しました </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/cmaclient.cpp" line="135"/>
|
|
||||||
<location filename="../../src/cmaclient.cpp" line="138"/>
|
<location filename="../../src/cmaclient.cpp" line="138"/>
|
||||||
|
<location filename="../../src/cmaclient.cpp" line="141"/>
|
||||||
<source>Connected to %1 (PS Vita)</source>
|
<source>Connected to %1 (PS Vita)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -244,57 +244,57 @@
|
|||||||
<translation>オフラインモード</translation>
|
<translation>オフラインモード</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="250"/>
|
<location filename="../../src/forms/configwidget.ui" line="247"/>
|
||||||
<source>Skip metadata extraction</source>
|
<source>Skip metadata extraction</source>
|
||||||
<translation>メタデータの展開をスキップする</translation>
|
<translation>メタデータの展開をスキップする</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="260"/>
|
<location filename="../../src/forms/configwidget.ui" line="271"/>
|
||||||
<source>Update database automatically when files on the PC are changed</source>
|
<source>Update database automatically when files on the PC are changed</source>
|
||||||
<translation>PCのファイルが変更された際にデータベースを自動的に更新する</translation>
|
<translation>PCのファイルが変更された際にデータベースを自動的に更新する</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="270"/>
|
<location filename="../../src/forms/configwidget.ui" line="254"/>
|
||||||
<source>Disable USB monitoring</source>
|
<source>Disable USB monitoring</source>
|
||||||
<translation>USBの監視を無効にする</translation>
|
<translation>USBの監視を無効にする</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="280"/>
|
<location filename="../../src/forms/configwidget.ui" line="261"/>
|
||||||
<source>Disable Wi-Fi monitoring</source>
|
<source>Disable Wi-Fi monitoring</source>
|
||||||
<translation>Wi-Fiの監視を無効にする</translation>
|
<translation>Wi-Fiの監視を無効にする</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="289"/>
|
<location filename="../../src/forms/configwidget.ui" line="280"/>
|
||||||
<source>Database backend</source>
|
<source>Database backend</source>
|
||||||
<translation>データベース保存</translation>
|
<translation>データベース保存</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.ui" line="300"/>
|
<location filename="../../src/forms/configwidget.ui" line="291"/>
|
||||||
<source>In Memory</source>
|
<source>In Memory</source>
|
||||||
<translation>メモリ内</translation>
|
<translation>メモリ内</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="96"/>
|
<location filename="../../src/forms/configwidget.cpp" line="101"/>
|
||||||
<source>Select the folder to be used as a photo source</source>
|
<source>Select the folder to be used as a photo source</source>
|
||||||
<translation>フォトの参照先として使用されるフォルダを選択してください</translation>
|
<translation>フォトの参照先として使用されるフォルダを選択してください</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="101"/>
|
<location filename="../../src/forms/configwidget.cpp" line="106"/>
|
||||||
<source>Select the folder to be used as a music source</source>
|
<source>Select the folder to be used as a music source</source>
|
||||||
<translation>ミュージックの参照先として使用されるフォルダを選択してください</translation>
|
<translation>ミュージックの参照先として使用されるフォルダを選択してください</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="106"/>
|
<location filename="../../src/forms/configwidget.cpp" line="111"/>
|
||||||
<source>Select the folder to be used as a video source</source>
|
<source>Select the folder to be used as a video source</source>
|
||||||
<translation>ビデオの参照先として使用されるフォルダを選択してください</translation>
|
<translation>ビデオの参照先として使用されるフォルダを選択してください</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="111"/>
|
<location filename="../../src/forms/configwidget.cpp" line="116"/>
|
||||||
<source>Select the folder to be used to save PS Vita games and backups</source>
|
<source>Select the folder to be used to save PS Vita games and backups</source>
|
||||||
<translation>PS Vitaのゲームとバックアップの保存に使用されるフォルダを選択してください</translation>
|
<translation>PS Vitaのゲームとバックアップの保存に使用されるフォルダを選択してください</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/forms/configwidget.cpp" line="116"/>
|
<location filename="../../src/forms/configwidget.cpp" line="121"/>
|
||||||
<source>Select the folder to be used to fetch software updates</source>
|
<source>Select the folder to be used to fetch software updates</source>
|
||||||
<translation>ソフトウェアアップデートの取得に使用されるフォルダを選択してください</translation>
|
<translation>ソフトウェアアップデートの取得に使用されるフォルダを選択してください</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>HTTPDownloader</name>
|
<name>HTTPDownloader</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/httpdownloader.cpp" line="154"/>
|
<location filename="../../src/httpdownloader.cpp" line="153"/>
|
||||||
<source>Network error: %1</source>
|
<source>Network error: %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@@ -22,6 +22,8 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "forms/progressform.h"
|
#include "forms/progressform.h"
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
#include <vitamtp.h>
|
#include <vitamtp.h>
|
||||||
|
|
||||||
ClientManager::ClientManager(QObject *parent) :
|
ClientManager::ClientManager(QObject *parent) :
|
||||||
@@ -59,6 +61,7 @@ void ClientManager::start()
|
|||||||
|
|
||||||
// initializing database for the first use
|
// initializing database for the first use
|
||||||
refreshDatabase();
|
refreshDatabase();
|
||||||
|
|
||||||
CmaEvent::db = &db;
|
CmaEvent::db = &db;
|
||||||
connect(&db, SIGNAL(fileAdded(QString)), &progress, SLOT(setFileName(QString)));
|
connect(&db, SIGNAL(fileAdded(QString)), &progress, SLOT(setFileName(QString)));
|
||||||
connect(&db, SIGNAL(directoryAdded(QString)), &progress, SLOT(setDirectoryName(QString)));
|
connect(&db, SIGNAL(directoryAdded(QString)), &progress, SLOT(setDirectoryName(QString)));
|
||||||
@@ -68,44 +71,53 @@ void ClientManager::start()
|
|||||||
thread_count = 0;
|
thread_count = 0;
|
||||||
qDebug("Starting cma threads");
|
qDebug("Starting cma threads");
|
||||||
CmaClient *client;
|
CmaClient *client;
|
||||||
|
QSettings settings;
|
||||||
|
|
||||||
usb_thread = new QThread();
|
if(!settings.value("disableUSB", false).toBool()) {
|
||||||
client = new CmaClient();
|
usb_thread = new QThread();
|
||||||
usb_thread->setObjectName("usb_thread");
|
client = new CmaClient();
|
||||||
connect(usb_thread, SIGNAL(started()), client, SLOT(connectUsb()));
|
usb_thread->setObjectName("usb_thread");
|
||||||
connect(client, SIGNAL(messageSent(QString)), this, SIGNAL(messageSent(QString)));
|
connect(usb_thread, SIGNAL(started()), client, SLOT(connectUsb()));
|
||||||
connect(client, SIGNAL(finished()), usb_thread, SLOT(quit()), Qt::DirectConnection);
|
connect(client, SIGNAL(messageSent(QString)), this, SIGNAL(messageSent(QString)));
|
||||||
connect(usb_thread, SIGNAL(finished()), usb_thread, SLOT(deleteLater()));
|
connect(client, SIGNAL(finished()), usb_thread, SLOT(quit()), Qt::DirectConnection);
|
||||||
connect(usb_thread, SIGNAL(finished()), this, SLOT(threadStopped()));
|
connect(usb_thread, SIGNAL(finished()), usb_thread, SLOT(deleteLater()));
|
||||||
connect(usb_thread, SIGNAL(finished()), client, SLOT(deleteLater()));
|
connect(usb_thread, SIGNAL(finished()), this, SLOT(threadStopped()));
|
||||||
|
connect(usb_thread, SIGNAL(finished()), client, SLOT(deleteLater()));
|
||||||
|
|
||||||
connect(client, SIGNAL(deviceConnected(QString)), this, SIGNAL(deviceConnected(QString)));
|
connect(client, SIGNAL(deviceConnected(QString)), this, SIGNAL(deviceConnected(QString)));
|
||||||
connect(client, SIGNAL(deviceDisconnected()), this, SIGNAL(deviceDisconnected()));
|
connect(client, SIGNAL(deviceDisconnected()), this, SIGNAL(deviceDisconnected()));
|
||||||
connect(client, SIGNAL(refreshDatabase()), this, SLOT(refreshDatabase()));
|
connect(client, SIGNAL(refreshDatabase()), this, SLOT(refreshDatabase()));
|
||||||
|
|
||||||
client->moveToThread(usb_thread);
|
client->moveToThread(usb_thread);
|
||||||
usb_thread->start();
|
usb_thread->start();
|
||||||
thread_count++;
|
thread_count++;
|
||||||
|
}
|
||||||
|
|
||||||
wireless_thread = new QThread();
|
if(!settings.value("disableWireless", false).toBool()) {
|
||||||
client = new CmaClient();
|
wireless_thread = new QThread();
|
||||||
wireless_thread->setObjectName("wireless_thread");
|
client = new CmaClient();
|
||||||
connect(wireless_thread, SIGNAL(started()), client, SLOT(connectWireless()));
|
wireless_thread->setObjectName("wireless_thread");
|
||||||
connect(client, SIGNAL(messageSent(QString)), this, SIGNAL(messageSent(QString)));
|
connect(wireless_thread, SIGNAL(started()), client, SLOT(connectWireless()));
|
||||||
connect(client, SIGNAL(receivedPin(QString,int)), this, SLOT(showPinDialog(QString,int)));
|
connect(client, SIGNAL(messageSent(QString)), this, SIGNAL(messageSent(QString)));
|
||||||
connect(client, SIGNAL(finished()), wireless_thread, SLOT(quit()), Qt::DirectConnection);
|
connect(client, SIGNAL(receivedPin(QString,int)), this, SLOT(showPinDialog(QString,int)));
|
||||||
connect(wireless_thread, SIGNAL(finished()), wireless_thread, SLOT(deleteLater()));
|
connect(client, SIGNAL(finished()), wireless_thread, SLOT(quit()), Qt::DirectConnection);
|
||||||
connect(wireless_thread, SIGNAL(finished()), this, SLOT(threadStopped()));
|
connect(wireless_thread, SIGNAL(finished()), wireless_thread, SLOT(deleteLater()));
|
||||||
connect(wireless_thread, SIGNAL(finished()), client, SLOT(deleteLater()));
|
connect(wireless_thread, SIGNAL(finished()), this, SLOT(threadStopped()));
|
||||||
|
connect(wireless_thread, SIGNAL(finished()), client, SLOT(deleteLater()));
|
||||||
|
|
||||||
connect(client, SIGNAL(pinComplete()), &pinForm, SLOT(hide()));
|
connect(client, SIGNAL(pinComplete()), &pinForm, SLOT(hide()));
|
||||||
connect(client, SIGNAL(deviceConnected(QString)), this, SIGNAL(deviceConnected(QString)));
|
connect(client, SIGNAL(deviceConnected(QString)), this, SIGNAL(deviceConnected(QString)));
|
||||||
connect(client, SIGNAL(deviceDisconnected()), this, SIGNAL(deviceDisconnected()));
|
connect(client, SIGNAL(deviceDisconnected()), this, SIGNAL(deviceDisconnected()));
|
||||||
connect(client, SIGNAL(refreshDatabase()), this, SLOT(refreshDatabase()));
|
connect(client, SIGNAL(refreshDatabase()), this, SLOT(refreshDatabase()));
|
||||||
|
|
||||||
client->moveToThread(wireless_thread);
|
client->moveToThread(wireless_thread);
|
||||||
wireless_thread->start();
|
wireless_thread->start();
|
||||||
thread_count++;
|
thread_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(thread_count == 0) {
|
||||||
|
emit messageSent(tr("You must enable at least USB or Wireless monitoring"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientManager::refreshDatabase()
|
void ClientManager::refreshDatabase()
|
||||||
|
@@ -75,6 +75,7 @@ void CmaClient::connectUsb()
|
|||||||
}
|
}
|
||||||
} while(isActive());
|
} while(isActive());
|
||||||
|
|
||||||
|
usbwait.unlock();
|
||||||
qDebug("Finishing usb_thread");
|
qDebug("Finishing usb_thread");
|
||||||
emit finished();
|
emit finished();
|
||||||
}
|
}
|
||||||
|
@@ -154,7 +154,7 @@ quint16 CmaEvent::processAllObjects(CMAObject *parent, quint32 handle)
|
|||||||
qDebug("Called %s, handle: %d, parent name: %s", Q_FUNC_INFO, handle, parent->metadata.name);
|
qDebug("Called %s, handle: %d, parent name: %s", Q_FUNC_INFO, handle, parent->metadata.name);
|
||||||
|
|
||||||
char *name;
|
char *name;
|
||||||
uint64_t size;
|
int fileType = -1;
|
||||||
int dataType;
|
int dataType;
|
||||||
|
|
||||||
uint32_t *p_handles;
|
uint32_t *p_handles;
|
||||||
@@ -199,15 +199,26 @@ quint16 CmaEvent::processAllObjects(CMAObject *parent, quint32 handle)
|
|||||||
delete m_file;
|
delete m_file;
|
||||||
return PTP_RC_VITA_Invalid_Permission;
|
return PTP_RC_VITA_Invalid_Permission;
|
||||||
} else {
|
} else {
|
||||||
|
// the size gets ignored because we can also get it via info.size()
|
||||||
|
uint64_t size;
|
||||||
|
|
||||||
VitaMTP_GetObject_Callback(device, handle, &size, CmaEvent::writeCallback);
|
VitaMTP_GetObject_Callback(device, handle, &size, CmaEvent::writeCallback);
|
||||||
m_file->close();
|
m_file->close();
|
||||||
delete m_file;
|
delete m_file;
|
||||||
|
|
||||||
|
// get the root ohfi type
|
||||||
|
CMAObject *root_obj = parent;
|
||||||
|
while(root_obj->parent) {
|
||||||
|
root_obj = root_obj->parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
fileType = Database::checkFileType(dir.absoluteFilePath(name), root_obj->metadata.ohfi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QFileInfo info(dir, name);
|
QFileInfo info(dir, name);
|
||||||
object = new CMAObject(parent);
|
object = new CMAObject(parent);
|
||||||
object->initObject(info);
|
object->initObject(info, fileType);
|
||||||
object->metadata.handle = handle;
|
object->metadata.handle = handle;
|
||||||
db->append(parent->metadata.ohfi, object);
|
db->append(parent->metadata.ohfi, object);
|
||||||
free(name);
|
free(name);
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
int CMAObject::ohfi_count = OHFI_OFFSET;
|
int CMAObject::ohfi_count = OHFI_OFFSET;
|
||||||
|
|
||||||
@@ -83,9 +84,10 @@ CMAObject::~CMAObject()
|
|||||||
void CMAObject::loadSfoMetadata(const QString &path)
|
void CMAObject::loadSfoMetadata(const QString &path)
|
||||||
{
|
{
|
||||||
QString sfo = QDir(path).absoluteFilePath("PARAM.SFO");
|
QString sfo = QDir(path).absoluteFilePath("PARAM.SFO");
|
||||||
|
bool skipMetadata = QSettings().value("skipMetadata", false).toBool();
|
||||||
SfoReader reader;
|
SfoReader reader;
|
||||||
|
|
||||||
if(reader.load(sfo)) {
|
if(!skipMetadata && reader.load(sfo)) {
|
||||||
metadata.data.saveData.title = strdup(reader.value("TITLE", ""));
|
metadata.data.saveData.title = strdup(reader.value("TITLE", ""));
|
||||||
//FIXME: disable savedata detail for now
|
//FIXME: disable savedata detail for now
|
||||||
//QString detail(reader.value("SAVEDATA_DETAIL", ""));
|
//QString detail(reader.value("SAVEDATA_DETAIL", ""));
|
||||||
@@ -127,7 +129,9 @@ void CMAObject::loadSfoMetadata(const QString &path)
|
|||||||
void CMAObject::loadMusicMetadata(const QString &path)
|
void CMAObject::loadMusicMetadata(const QString &path)
|
||||||
{
|
{
|
||||||
AVDecoder decoder;
|
AVDecoder decoder;
|
||||||
if(decoder.open(path)) {
|
bool skipMetadata = QSettings().value("skipMetadata", false).toBool();
|
||||||
|
|
||||||
|
if(!skipMetadata && decoder.open(path)) {
|
||||||
decoder.getAudioMetadata(metadata);
|
decoder.getAudioMetadata(metadata);
|
||||||
} else {
|
} else {
|
||||||
metadata.data.music.album = strdup(parent->metadata.name ? parent->metadata.name : "");
|
metadata.data.music.album = strdup(parent->metadata.name ? parent->metadata.name : "");
|
||||||
@@ -139,7 +143,9 @@ void CMAObject::loadMusicMetadata(const QString &path)
|
|||||||
void CMAObject::loadVideoMetadata(const QString &path)
|
void CMAObject::loadVideoMetadata(const QString &path)
|
||||||
{
|
{
|
||||||
AVDecoder decoder;
|
AVDecoder decoder;
|
||||||
if(decoder.open(path)) {
|
bool skipMetadata = QSettings().value("skipMetadata", false).toBool();
|
||||||
|
|
||||||
|
if(!skipMetadata && decoder.open(path)) {
|
||||||
decoder.getVideoMetadata(metadata);
|
decoder.getVideoMetadata(metadata);
|
||||||
} else {
|
} else {
|
||||||
metadata.data.video.title = strdup(metadata.name);
|
metadata.data.video.title = strdup(metadata.name);
|
||||||
@@ -151,7 +157,9 @@ void CMAObject::loadVideoMetadata(const QString &path)
|
|||||||
void CMAObject::loadPhotoMetadata(const QString &path)
|
void CMAObject::loadPhotoMetadata(const QString &path)
|
||||||
{
|
{
|
||||||
QImage img;
|
QImage img;
|
||||||
if(img.load(path)) {
|
bool skipMetadata = QSettings().value("skipMetadata", false).toBool();
|
||||||
|
|
||||||
|
if(!skipMetadata && img.load(path)) {
|
||||||
metadata.data.photo.tracks->data.track_photo.width = img.width();
|
metadata.data.photo.tracks->data.track_photo.width = img.width();
|
||||||
metadata.data.photo.tracks->data.track_photo.height = img.height();
|
metadata.data.photo.tracks->data.track_photo.height = img.height();
|
||||||
}
|
}
|
||||||
@@ -176,6 +184,12 @@ void CMAObject::initObject(const QFileInfo &file, int file_type)
|
|||||||
metadata.data.saveData.statusType = 1;
|
metadata.data.saveData.statusType = 1;
|
||||||
loadSfoMetadata(file.absoluteFilePath());
|
loadSfoMetadata(file.absoluteFilePath());
|
||||||
} else if(MASK_SET(metadata.dataType, Music | File)) {
|
} else if(MASK_SET(metadata.dataType, Music | File)) {
|
||||||
|
|
||||||
|
if(file_type < 0) {
|
||||||
|
qWarning("Invalid file type for music: %i, setting it to zero", file_type);
|
||||||
|
file_type = 0;
|
||||||
|
}
|
||||||
|
|
||||||
metadata.data.music.fileName = strdup(metadata.name);
|
metadata.data.music.fileName = strdup(metadata.name);
|
||||||
metadata.data.music.fileFormatType = audio_list[file_type].file_format;
|
metadata.data.music.fileFormatType = audio_list[file_type].file_format;
|
||||||
metadata.data.music.statusType = 1;
|
metadata.data.music.statusType = 1;
|
||||||
@@ -195,6 +209,12 @@ void CMAObject::initObject(const QFileInfo &file, int file_type)
|
|||||||
metadata.data.video.tracks->type = VITA_TRACK_TYPE_VIDEO;
|
metadata.data.video.tracks->type = VITA_TRACK_TYPE_VIDEO;
|
||||||
loadVideoMetadata(file.absoluteFilePath());
|
loadVideoMetadata(file.absoluteFilePath());
|
||||||
} else if(MASK_SET(metadata.dataType, Photo | File)) {
|
} else if(MASK_SET(metadata.dataType, Photo | File)) {
|
||||||
|
|
||||||
|
if(file_type < 0) {
|
||||||
|
qWarning("Invalid file type for photos: %i, setting it to zero", file_type);
|
||||||
|
file_type = 0;
|
||||||
|
}
|
||||||
|
|
||||||
metadata.data.photo.fileName = strdup(metadata.name);
|
metadata.data.photo.fileName = strdup(metadata.name);
|
||||||
metadata.data.photo.fileFormatType = photo_list[file_type].file_format;
|
metadata.data.photo.fileFormatType = photo_list[file_type].file_format;
|
||||||
metadata.data.photo.statusType = 1;
|
metadata.data.photo.statusType = 1;
|
||||||
|
@@ -53,6 +53,8 @@ public:
|
|||||||
CMAObject *pathToObject(const char *path, int ohfiRoot);
|
CMAObject *pathToObject(const char *path, int ohfiRoot);
|
||||||
int acceptFilteredObject(const CMAObject *parent, const CMAObject *current, int type);
|
int acceptFilteredObject(const CMAObject *parent, const CMAObject *current, int type);
|
||||||
|
|
||||||
|
static int checkFileType(const QString path, int ohfi_root);
|
||||||
|
|
||||||
QMutex mutex;
|
QMutex mutex;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -74,7 +76,6 @@ private:
|
|||||||
CMAObject *getParent(CMAObject *last_dir, const QString ¤t_path);
|
CMAObject *getParent(CMAObject *last_dir, const QString ¤t_path);
|
||||||
CMAObject *pathToObjectInternal(const root_list &list, const char *path);
|
CMAObject *pathToObjectInternal(const root_list &list, const char *path);
|
||||||
static bool lessThanComparator(const CMAObject *a, const CMAObject *b);
|
static bool lessThanComparator(const CMAObject *a, const CMAObject *b);
|
||||||
int checkFileType(const QString path, int ohfi_root);
|
|
||||||
void dumpMetadataList(const metadata_t *p_head);
|
void dumpMetadataList(const metadata_t *p_head);
|
||||||
bool continueOperation();
|
bool continueOperation();
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ ConfigWidget::ConfigWidget(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
connectSignals();
|
connectSignals();
|
||||||
setDefaultDirs();
|
setDefaultData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigWidget::connectSignals()
|
void ConfigWidget::connectSignals()
|
||||||
@@ -62,7 +62,7 @@ void ConfigWidget::connectSignals()
|
|||||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigWidget::setDefaultDirs()
|
void ConfigWidget::setDefaultData()
|
||||||
{
|
{
|
||||||
QString defaultdir;
|
QString defaultdir;
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
@@ -78,6 +78,11 @@ void ConfigWidget::setDefaultDirs()
|
|||||||
defaultdir = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
|
defaultdir = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
|
||||||
defaultdir.append(QDir::separator()).append("PSV Updates");
|
defaultdir.append(QDir::separator()).append("PSV Updates");
|
||||||
ui->urlPath->setText(settings.value("urlPath", defaultdir).toString());
|
ui->urlPath->setText(settings.value("urlPath", defaultdir).toString());
|
||||||
|
|
||||||
|
ui->offlineCheck->setChecked(settings.value("offlineMode", true).toBool());
|
||||||
|
ui->metadataCheck->setChecked(settings.value("skipMetadata", false).toBool());
|
||||||
|
ui->usbCheck->setChecked(settings.value("disableUSB", false).toBool());
|
||||||
|
ui->wifiCheck->setChecked(settings.value("disableWireless", false).toBool());
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigWidget::~ConfigWidget()
|
ConfigWidget::~ConfigWidget()
|
||||||
@@ -146,6 +151,10 @@ void ConfigWidget::accept()
|
|||||||
savePath(settings, ui->appPath, "appsPath");
|
savePath(settings, ui->appPath, "appsPath");
|
||||||
savePath(settings, ui->urlPath, "urlPath");
|
savePath(settings, ui->urlPath, "urlPath");
|
||||||
settings.setValue("offlineMode", ui->offlineCheck->isChecked());
|
settings.setValue("offlineMode", ui->offlineCheck->isChecked());
|
||||||
|
settings.setValue("skipMetadata", ui->metadataCheck->isChecked());
|
||||||
|
settings.setValue("disableUSB", ui->usbCheck->isChecked());
|
||||||
|
settings.setValue("disableWireless", ui->wifiCheck->isChecked());
|
||||||
settings.sync();
|
settings.sync();
|
||||||
|
|
||||||
done(Accepted);
|
done(Accepted);
|
||||||
}
|
}
|
||||||
|
@@ -41,7 +41,7 @@ private:
|
|||||||
enum browse_buttons {BTN_PHOTO, BTN_MUSIC, BTN_VIDEO, BTN_APPS, BTN_URL};
|
enum browse_buttons {BTN_PHOTO, BTN_MUSIC, BTN_VIDEO, BTN_APPS, BTN_URL};
|
||||||
|
|
||||||
void connectSignals();
|
void connectSignals();
|
||||||
void setDefaultDirs();
|
void setDefaultData();
|
||||||
void savePath(QSettings &settings, const QLineEdit *edit, const QString &key);
|
void savePath(QSettings &settings, const QLineEdit *edit, const QString &key);
|
||||||
|
|
||||||
Ui::ConfigWidget *ui;
|
Ui::ConfigWidget *ui;
|
||||||
|
@@ -242,15 +242,26 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox_2">
|
<widget class="QCheckBox" name="metadataCheck">
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Skip metadata extraction</string>
|
<string>Skip metadata extraction</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="usbCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Disable USB monitoring</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="wifiCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>Disable Wi-Fi monitoring</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox_3">
|
<widget class="QCheckBox" name="checkBox_3">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
@@ -261,26 +272,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBox_4">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Disable USB monitoring</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBox_5">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Disable Wi-Fi monitoring</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QLibraryInfo>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
@@ -89,6 +90,10 @@ int main(int argc, char *argv[])
|
|||||||
app.installTranslator(&translator);
|
app.installTranslator(&translator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QTranslator system_translator;
|
||||||
|
system_translator.load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||||
|
app.installTranslator(&system_translator);
|
||||||
|
|
||||||
qDebug("Starting main thread: 0x%016" PRIxPTR, (uintptr_t)QThread::currentThreadId());
|
qDebug("Starting main thread: 0x%016" PRIxPTR, (uintptr_t)QThread::currentThreadId());
|
||||||
|
|
||||||
// set the organization/application for QSettings to work properly
|
// set the organization/application for QSettings to work properly
|
||||||
|
Reference in New Issue
Block a user