DBRepair development

Additionally, the results from each of my selections appeared above the rest of the text. I had to scroll up to see them; otherwise, it looked like the program had done nothing but return to the main menu.

That’s the way to do it on Windows, and will be in the Wiki when it’s ready

Maybe one of the child processes was still running and locking the database?
DBRepair handles that when you issue a Stop from the menu

Heh, and I bet you would not be the only one that would be coming to the same conclusion
@ChuckPa : Maybe a prompt after each run saying something like: Job ended. Press a key to proceed and only show the main menu after that?

A prompt ? Interesting thought.

I usually just make the window taller (about 30 lines) and everything fits

I’ll look at improving the guy

I think a Clear Screen, send results and then a “Press Any Key To Continue …” to go back to menu (maybe after another Clear Screen?) could work well?

My brain keeps looking for the results after the menu, and then I realise what I’m after is above the (new) menu, not below? Maybe I’m weird though … others may feel differently?

ALL:

From your responses and having chatted around here,
I think there’s a few messages for me to take into consideration.

  1. Scrolling control
  2. Tightening up the output (less wasted space)

If I’m understanding correctly, how does this sound ?

  1. In command line mode (arguments on the command line), nothing changes.
  2. În interactive mode:
  • Tighten up each command’s output to be less white space
  • Before printing the menu, show a “Press any key to continue prompt”
    (Where is the “any” key? I don’t have one. :roll_eyes: )
  1. To disable the prompt, command line option --noprompt
  2. You still have the “menu on” and “menu off” commands.

Did I get everyone’s concerns ?

UI Suggestion: Make the navigation menu stationary and add a live command window directly underneath it. The window would log active and completed system actions so users have clear, real-time feedback. (Just a constructive suggestion, not a complaint!)

I just tried the latest version on QNAP Hero 6.xx (the latest non-beta version), and using the latest PMS non-beta. Option 2 - Auto.

It reported all DBs as healthy, but did raise a warning:

****

Stopping PMS. (60 second max delay)

Stopped PMS.

Checking the PMS databases…

Warning: Failed to set cache size: SQL logic error

Main DB is OK.

Blobs DB is OK.

Main and Blobs databases are healthy - nothing to do.

Starting PMS.

Started PMS.

****

Thanks for your great work!

@Viralfrag

I can make the menu stationary ( ‘curses’ and ‘pdcurses’ windowed mode )

My only concern with that is a 24x80 window gets really cramped.
I would need to height-compact it pretty severely but it would fit.

The problem with stationary menu is that you’d have 4 lines for the command’s output and you’d have to scroll through it all the time. That didn’t feel like a good option. Did I miss something there with how to implement it ?

What about a side by side view? kind of like the old plex ui. Menu to the left, output on the right.

Thank you! That’s a first from QNAP to do that.
Are you trying to set the DB’s record size for the dataset ?

@Viralfrag

Cool idea!

What about the descriptive text ? Drop it ?

I like that or a simple hover description on each item in menu?

@Viralfrag

This is a Text UI, not a Graphical UI.

I’m not sure that can be done but I will look

No, I just fired up DBRepair 00.99.12 and selected Option 2. TBH, not sure where I would even start to do that :confused:

Not sure if it makes any difference, but it’s the x86_64 version.
EDIT: Okay, something really screwy is going on with my PMS - can’t access it - QNAP reports it running, but no client can connect.

Also, for giggles, I thought I’d try reindexing (option 6):

-– Reindexing Main DB —

Warning: Failed to set cache size: SQL logic error

ERROR: Index could not open source database: /share/ZFS530_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

ERROR: Main DB Reindex failed.

*****

Still investigating what’s going on, but seems that DBRepair should not have reported ‘all good’ with the auto option.

@balthazarr1

Are you running in a SSH session with ‘sudo’ privilege ( “#” prompt )

Warning: Failed to set cache size: SQL logic error

ERROR: Index could not open source database: /share/ZFS530_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

what’s the exact command line you used ?

Yes, won’t run otherwise - raises errors about unable to open the logs, and then prints a statement that QNAP requires root.

EDIT: Commands:

sudo bash

./DBRepair

2 [enter]

Then, later, in a new SSH session - same, except option 6.

that’s a requirement.

On QNAP, PMS runs as “admin” user. (aka ‘root’)

You must type:

sudo DBRepair

go elevate your privileges

Did you run this as a user with admin rights, but not as admin perhaps?

Hmm… it seems to be reindexing the Blobs DB just fine - but that’s taking a while, so still running.

EDIT: Yes, it completed the reindex of blobs, but didn’t make any changes because the main DB failed:

-– Reindexing Main DB —

Warning: Failed to set cache size: SQL logic error

ERROR: Index could not open source database: /share/ZFS530_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db

ERROR: Main DB Reindex failed.

-– Reindexing Blobs DB —

Reindexing Blobs DB

Database REINDEX completed successfully.

Checking Blobs DB after reindex…

ERROR: One or both pipelines failed. Aborting file swap.

Can you share your “DBRepair.log” file please ?

It’s stored with the Plex Databases