Skip to content

Commit bf755d8

Browse files
committed
Fixing lib2inpx format processing bug introduced by flibusta ehancements.
Removing new incompatibility of librusec sequence number format
1 parent a8bca3c commit bf755d8

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
1414

1515
# Project version number
1616
set(PRJ_VERSION_MAJOR 8)
17-
set(PRJ_VERSION_MINOR 62)
17+
set(PRJ_VERSION_MINOR 63)
1818
configure_file("${PROJECT_SOURCE_DIR}/cmake/version.h.in" "${PROJECT_BINARY_DIR}/version.h")
1919
include_directories("${PROJECT_BINARY_DIR}")
2020

lib2inpx/lib2inpx.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,15 @@ void get_book_author(const mysql_connection& mysql, const string& book_id, strin
411411

412412
mysql.query(str);
413413

414-
mysql_results avtor_ids(mysql);
415-
if ((e20100206 == g_format) || (e20100317 == g_format) || (e20100411 == g_format) || (e20111106 == g_format)) {
414+
if ((e20100206 == g_format) || (e20100317 == g_format) || (e20100411 == g_format)) {
416415
str = "SELECT `FirstName`,`MiddleName`,`LastName` FROM libavtorname WHERE aid=";
416+
} else if (e20111106 == g_format) {
417+
str = "SELECT `FirstName`,`MiddleName`,`LastName` FROM libavtors WHERE aid=";
417418
} else {
418419
str = "SELECT `FirstName`,`MiddleName`,`LastName` FROM libavtorname WHERE AvtorId=";
419420
}
420421

422+
mysql_results avtor_ids(mysql);
421423
while (record = avtor_ids.fetch_row()) {
422424
string good_author_id(record[0]);
423425

@@ -554,7 +556,8 @@ void get_book_squence(const mysql_connection& mysql, const string& book_id, stri
554556
while (record = seq.fetch_row()) {
555557
string seq_id(record[0]);
556558

557-
seq_numb = record[1];
559+
// Make sure this is integer
560+
seq_numb = tmp_str("%d", (int)atof(record[1])).c_str();
558561

559562
if ((e20100206 == g_format) || (e20100317 == g_format) || (e20100411 == g_format)) {
560563
str = "SELECT SeqName FROM libseqname WHERE sid=";

0 commit comments

Comments
 (0)