modified comics and folders information served to remote devices (YACReader for iOS 2.0)

This commit is contained in:
Luis Ángel San Martín
2014-09-03 12:42:52 +02:00
parent 26c94ccccd
commit df36159956
13 changed files with 133 additions and 66 deletions

View File

@ -31,7 +31,7 @@ QString ComicDB::toTXT()
txt.append(QString("currentPage:%1\r\n").arg(info.currentPage));
txt.append(QString("contrast:%1\r\n").arg(info.contrast));
//Informaci<63>n general
//Informaci<63>n general
if(!info.coverPage.isNull())
txt.append(QString("coverPage:%1\r\n").arg(info.coverPage.toString()));
@ -80,7 +80,7 @@ QString ComicDB::toTXT()
if(!info.coverArtist.isNull())
txt.append(QString("coverArtist:%1\r\n").arg(info.coverArtist.toString()));
//Publicaci<63>n
//Publicaci<63>n
if(!info.date.isNull())
txt.append(QString("date:%1\r\n").arg(info.date.toString()));
@ -127,7 +127,13 @@ QString ComicDB::getParentFolderName() const
if(paths.length()<2)
return "";
else
return paths[paths.length()-2];
return paths[paths.length()-2];
}
qulonglong ComicDB::getFileSize() const
{
//the size is encoded in the hash after the SHA-1
return info.hash.right(info.hash.length()-40).toLongLong();
}
//-----------------------------------------------------------------------------

View File

@ -139,6 +139,9 @@ public:
//returns parent folder name
QString getParentFolderName() const;
//return the size of the file in bytes
qulonglong getFileSize() const;
QString toTXT();
ComicInfo info;