mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 05:24:57 -04:00
Solucionado bug que evitaba que se creara un biblioteca en un directorio que ya
conten?a una biblioteca v?lida
This commit is contained in:
@ -23,12 +23,14 @@ QMutex mutex;
|
|||||||
|
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
LibraryCreator::LibraryCreator()
|
LibraryCreator::LibraryCreator()
|
||||||
|
:creation(false)
|
||||||
{
|
{
|
||||||
_nameFilter << "*.cbr" << "*.cbz" << "*.rar" << "*.zip" << "*.tar";
|
_nameFilter << "*.cbr" << "*.cbz" << "*.rar" << "*.zip" << "*.tar";
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryCreator::createLibrary(const QString &source, const QString &target)
|
void LibraryCreator::createLibrary(const QString &source, const QString &target)
|
||||||
{
|
{
|
||||||
|
creation = true;
|
||||||
processLibrary(source,target);
|
processLibrary(source,target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +49,7 @@ void LibraryCreator::processLibrary(const QString & source, const QString & targ
|
|||||||
delTree(target);
|
delTree(target);
|
||||||
_mode = CREATOR;
|
_mode = CREATOR;
|
||||||
}
|
}
|
||||||
else
|
else //
|
||||||
_mode = UPDATER;
|
_mode = UPDATER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,10 +95,15 @@ void LibraryCreator::run()
|
|||||||
_database.commit();
|
_database.commit();
|
||||||
_database.close();
|
_database.close();
|
||||||
QSqlDatabase::removeDatabase(_target);
|
QSqlDatabase::removeDatabase(_target);
|
||||||
emit(updated());
|
//si estabamos en modo creaci<63>n, se est<73> a<>adiendo una librer<65>a que ya exist<73>a y se ha actualizado antes de a<>adirse.
|
||||||
|
if(!creation)
|
||||||
|
emit(updated());
|
||||||
|
else
|
||||||
|
emit(created());
|
||||||
}
|
}
|
||||||
msleep(100);//TODO try to solve the problem with the udpate dialog
|
msleep(100);//TODO try to solve the problem with the udpate dialog
|
||||||
emit(finished());
|
emit(finished());
|
||||||
|
creation = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryCreator::stop()
|
void LibraryCreator::stop()
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
//qulonglong insertFolder(qulonglong parentId,const Folder & folder);
|
//qulonglong insertFolder(qulonglong parentId,const Folder & folder);
|
||||||
//qulonglong insertComic(const Comic & comic);
|
//qulonglong insertComic(const Comic & comic);
|
||||||
bool stopRunning;
|
bool stopRunning;
|
||||||
|
//LibraryCreator est<73> en modo creaci<63>n si creation == true;
|
||||||
|
bool creation;
|
||||||
signals:
|
signals:
|
||||||
void finished();
|
void finished();
|
||||||
void coverExtracted(QString);
|
void coverExtracted(QString);
|
||||||
|
Reference in New Issue
Block a user