PDA

View Full Version : Library pane is empty - yet again



HomerRamone
07-30-2021, 06:29 PM
Im seeing repeated instances of the library view being empty. I've had this before many months again and ended up having to rebuild my whole database from scratch because the backup was pretty old.
(Still no way to automate the backup system :( )

For clarity here... the LIBRARY isnt empty - I just cant see it. The window where it should be is empty. I can stream files from it - but obviously as the library window is empty I cant actually do anything such as edit or create playlists.

It happened again earlier in the week. I sorta got it working again by:
backing up the database
uninstall
reboot
reinstall
restored the database.

All seemed well. But its just done it again.
I have been having some issues with a USB hub failing in the machine, but I wouldn't have expected this to render the library pane empty.

Peter
08-02-2021, 09:17 AM
Hi,
you can automate backups using Windows Task Scheduler and a batch file. Create a batch file called backup_mezzmo.bat and set the contents as:

COPY c:\mymezzmodb\Mezzmo.db c:\mymezzmobackups\Mezzmo_%time:~0,2%%time:~3,2%%t ime:~6,2%_%date:~-10,2%%date:~-7,2%%date:~-4,4%.db

You will need to change the path to the Mezzmo.db file to match what is in your Options page in Mezzmo for the path to the db.

Create a scheduled task in Windows and set it to run the backup_mezzmo.bat file.

The library appears empty when the Library item is missing from the database. You can restore it using an sqlite editor and running:

INSERT INTO "MGOPlaylist" VALUES(0,'Library',16,'Your collection of music files, video files and photos',-1,0,0,':1:',NULL,NULL,NULL,NULL,0,NULL,0,0,NULL,NU LL,NULL,0,NULL,1,1,0,1,'',NULL,NULL,0);

If the Music, Video or Photos playlist is also missing you can run the following sql:

INSERT INTO "MGOPlaylist" VALUES(3,'Music',16,'Playlist for all your music files and music playlists',0,8,61,':4:',NULL,NULL,NULL,NULL,0,NULL ,0,0,NULL,NULL,NULL,1,NULL,2,1,0,1,'',NULL,NULL,0) ;

INSERT INTO "MGOPlaylist" VALUES(15,'Video',16,'Playlist for all your videos and video playlists',0,10,62,':12:',NULL,NULL,NULL,NULL,0,NU LL,0,0,NULL,NULL,NULL,2,NULL,14,1,0,1,'',NULL,NULL ,0);

INSERT INTO "MGOPlaylist" VALUES(30,'Photos',16,'Playlist for all your photos and photo slideshows',0,9,63,':20:',NULL,NULL,NULL,NULL,0,NU LL,0,0,NULL,NULL,NULL,3,NULL,20,1,0,1,'',NULL,NULL ,0);

HomerRamone
08-02-2021, 07:42 PM
Thanks

Ill try that to restore if it disappears again. Though ideally stopping it from doing so be a nicer option :)

HomerRamone
10-18-2021, 05:35 PM
This has just happened yet again.

Remembering that I had posted about it before I looked at the solution.
Unfortunately I dont have any SQL applications on my media server machine. I did try downloading a SQL editor but when I try to execute the first command as above I get:

Execution finished with errors.
Result: attempt to write a readonly database
At line 1:
INSERT INTO "MGOPlaylist" VALUES(0,'Library',16,'Your collection of music files, video files and photos',-1,0,0,':1:',NULL,NULL,NULL,NULL,0,NULL,0,0,NULL,NU LL,NULL,0,NULL,1,1,0,1,'',NULL,NULL,0);

Im not familiar with SQL so I have no idea what the issue is. I did close mezzmo first, then I also tried copying the mezzmo.db file and tried opening that and running the command on the copy and get the same error.

In any case this isnt really a solution - the solution would be for it not to do this following a reboot - which it has done several times now.

Peter
10-19-2021, 09:03 AM
When rebooting it is possible that the database is not closed correctly. Mezzmo does cause the Windows shutdown to wait until it has closed the database but it is possible for this to be overridden or if the reboot is unexpected (power loss or restart button) then the database may suffer damage.

HomerRamone
10-27-2021, 04:52 AM
Its now happening almost every time I reboot the machine. Which isnt that often but having to backup and restore the database each time I do isnt exactly ideal.

Peter
10-29-2021, 11:54 AM
Before rebooting the machine can you please try running the Mezzmo application and stop the Mezzmo server then exit Mezzmo to see if the database remains intact after the reboot?

HomerRamone
10-29-2021, 06:13 PM
Will do.
Thanks

HomerRamone
10-31-2021, 08:13 PM
Tried this. Didnt help.
I also tried resetting the database, stopping the server and closing mezzmo. Then I rebooted again - and even with an empty database on restart the pane is empty.

Peter
11-01-2021, 08:59 AM
If it is happening after stopping the server and exiting Mezzmo then it could be an issue with the drive. Is the Mezzmo database stored in the default location on the main drive?

HomerRamone
11-01-2021, 07:20 PM
No - its on a different drive than the main OS one (an SSD). Drive checks out fine though. Will try it on a different drive anyway.