seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.43k stars 229 forks source link

Custom column only shows first tag #418

Open BBDiaz opened 5 years ago

BBDiaz commented 5 years ago

Version 1.1.2. I've added a custom column in Calibre as type: Comma separated text, however only the first tag is shown in the overview and on the book details page. When searching on the custom column on the second tag, the result is correct but also only the first tag is shown.

woidi commented 5 years ago

Comma separated text custom columns are not fully supported; their values are stored in multiple rows while COPS only fetches a single row. You could hack group_concat(value) into the database queries of getCustom() and getCustomByBook() in lib/CustomColumnTypeText.php or use the attached CustomColumnTypeText.zip Since I have no use case on my own I did no thorough testing - we would be happy if you reported your results.

BBDiaz commented 4 years ago

Thanks woidi, for your time and effort, but this did not work for me.

horus68 commented 4 years ago

@woid Your fix (changing the lib/CustomColumnTypeText.php) is working for me! It fixes the book detail page, now showing all the tags for that field (Comma separated text custom columns). Note: The Category pages was already displaying the full list of words for my custom column.

BBDiaz commented 4 years ago

Apparently I had another installation on my NAS outside the WWW directory which somehow is the active one. Your solution does work. Thanks again!

horus68 commented 3 years ago

@BBDiaz can you reopen this? This is not implemented yet!