No, I’m pretty sure that this means ‘I think that if I had known the difficulty [level] of this book, I would not have bought it’.
It’s more like… I think (right now) that if (in the past) I had been aware of the difficulty level of this book (知っていたら because 知る is usually in a continuous tense in affirmative form, and in a non-continuous tense for negative forms, because ‘knowing’ is seen as a continuous state that begins from the point of discovering something in Japanese), I would not have bought it (in the past, which is why it’s 買わなかった and not 買わない).
That aside, while I don’t really know how to explain this properly and it’s not that helpful here, tenses don’t always work the same way in Japanese. First of all, the continuous tenses just express a continuous state in the past or the present, and how exactly that state is continuous depends on usage and context (e.g. in the famous お前はもう死んでいる meme, 死んでいる means ‘to have died’ or ‘to be dead’, because 死ぬ is usually treated as a point action). Secondly, whether a ‘present’ or ‘past’ tense is used is often something determined relative to the… ‘cognitive subject’ i.e. the person who is acquiring knowledge and understanding of the action in question. It’s really a matter of whether or not the action is complete relative to the relevant frame of reference, not whether or not it’s over for the speaker. For example,
日本に行く時ビザを取った
When I was headed for/about to go to/was on the way to Japan, I got a visa
The action of ‘going’ occurred in the past, but relative to the next/main verb (取った) – which points us towards the relevant frame of reference – it was not yet complete, so 行く is the form it has to take. By a similar token, it’s OK to use either continuous tense to talk about a continuous background state in the past with an expression like 〜時, like in
学校に通っていた・いる時、ゲームが好きでした
When I was going to school, I liked games
The reason is that even with the past continuous, seeing as we’re talking about something in the past, the verb before 時 could just indicate that that state started a little earlier in the past.
The paper (most of) these ideas are based on is this one:
I need to find time to read it again though, because I honestly didn’t understand absolutely everything the first time, and I’m still a little confused about certain bits. Either way though, it changed how I looked at tense in Japanese, and I think that’s helped me quite a bit.