kobolabs / Kobo-Reader

http://www.koboereader.com/
599 stars 126 forks source link

Let user choose where to download e-books #118

Open GLSimard opened 2 years ago

GLSimard commented 2 years ago

At the present time, the repertory where Kobo desktop application stores downloaded e-books and other files is hardcoded. this is causing problems for users using several drives (including) cloud-based drives). I have not used C and C++ in several years. Could someone suggest where this could be changed in the code please?

Szybet commented 2 years ago

it would be nice if a custom path could be provided to the app but a warkaround is to use symlinks?

batman210473 commented 2 years ago

how do i find my downloaded ebooks on my kobo ereader

jasteele12 commented 1 year ago

@batman210473 - On Windows, they are under:

C:\Users\USERNAME\AppData\Local\Kobo\Kobo Desktop Edition\kepub\

They are named by their ContentID (with no extension). These are actually EPUB files, so you could copy and rename them with a .zip extension to look at them somewhere else. Calibre can probably import them.

In the directory above, there is a file called Kobo.sqlite - you can use many free SQLite3 tools to extract/view (a copy of) the information there. You can use a free Chrome-based browser by going to SQLite Viewer Web App - nothing gets uploaded, and it's read-only.

Here's a query that I found helpful for identifying Titles for books that I have in Kobo:

SELECT DISTINCT(Title), ContentID,
    SubTitle, Attribution, Series, SeriesNumber AS '#', SUBSTR(DateCreated,0,11) AS DatePub,
    Publisher, Description, ISBN, SUBSTR(DateLastRead,0,11) AS LastRead,
    PreviewFileSize, IsDownloaded
      --  , EpubType, AverageRating, RatingCount, Language, ___UserID
  FROM content
  WHERE ___UserID != 'removed' AND ___UserID != ''
    AND DateCreated != ''
 ORDER BY IsDownloaded DESC, Title;

The downloaded books will be at the top of the list. It's probably not the best way, but something I hacked together that suites my needs. Your mileage may vary ;)

Here's a handy one if you want to rename a copy of your downloaded books:

SELECT ContentID,
    REPLACE(Attribution,' ','-') || '--' || REPLACE(Title,' ','-') || '.epub' AS Epub
  FROM content
  WHERE DateCreated IS NOT NULL
    AND ___UserID != 'removed' AND ___UserID != ''
    AND IsDownloaded = 'true'
 ORDER BY ContentID;

You can also paste the above code into a similar web app at SQLite Viewer