Jump to content

Upgrade to Version 3.0.5724.4 library missing


Go to solution Solved by fc7,

Recommended Posts

Posted

Hi all, 

 

My Emby server is on Ubuntu Server 15.04, x64. I've got Emby installed from the installation guides on this site, so it's nothing special. Mono is version 4.0.3.

 

Last night, I ran a system upgrade using aptitude, nothing out of the ordinary, and my Emby version was upgraded. According to the apt log, I went from version 3.0.5675.1, to 3.0.5724.4, so not a massive jump. I've had this server installed for probably six months or so.

 

When I restarted Emby, my Kodi clients (running the Emby plugin) complained they couldn't log in, and on further inspection I found when I tried to go to the web admin, I got the new setup wizard! On closer inspection of how Emby was running, I found it was using /var/lib/emby-server as a data directory, but I recalled that up until now Emby had been using /var/lib/mediabrowser for its data. The fix seemed simple enough; I stopped emby, renamed the emby-server folder (just in case!), then copied the mediabrowser folder to a new folder called emby-server. Finally, I chowned it all to emby, and restarted. I restarted Emby and my clients seemed happy enough and were playing media again.

 

However, the web interface isn't showing any of my libraries, and all I get is Live TV from a TVHeadend plugin. The Movies and TV data folders are still configured, and the paths are correct. I consulted the server log and there's nothing major in there that I can see.

 

Any ideas?

 

 

Posted

D'oh forgot the logs. Sorry!

 

I ran a scan, and it completes instantly, but makes no change (i.e. I think it's actually doing nothing).

 

 

server-63577670672.txt

Posted

i would go to library setup, remove your paths, and add them back.  something funky must have happened with the upgrade.

Posted

Just tried that, and it's made no difference. I also tried removing it, then scanning, then adding it back, also no luck.

 

However, I just found my way into the Metadata Manager, and saw this:

 

55f4413667d2f_2015091216_12_28Movies.png

 

That's the old path. Is that editable somehow? If the databases are sqllite I can do that. Is it likely to be stored somewhere else, perhaps?

 

Of course, the slightly less elegant way out of this is to just symlink the directory, but I'd rather get the paths all the same and be a in position for future upgrades.

Posted

ok, rather than remove the paths, try removing the entire library trees from setup. just try one. then add it back.

Posted

Do you mean from here:

 

55f444dd1dcad_2015091216_29_12Photos.png

 

Because I already tried that, but no joy.

Posted

can you try adding a new one with a different name? i am going to have to ask the package maintainer about this because it looks like some attempt to move your installation from mediabrowser to emby that just went wrong. truthfully my real suggestion is a fresh installation, i just hate suggesting that.

Posted

Added a whole new Movies library, and same thing. I think it's pretty broken. :(

 

 truthfully my real suggestion is a fresh installation, i just hate suggesting that.

 

If that IS the case, is there a way to export the play history? I mean, it's hardly required, but it'd be nice.

Posted

yes, migrate the users.db file as well as userdata.db file

  • Like 1
Posted

Ah, awesome! I'll give that a go and report back.

 

Thanks, Luke. :)

Posted

I can help you with your problem and fix the library. If you can wait I just need 2hrs or so to post back. Thanks

 

 

Sent from my iPhone using Tapatalk

  • Solution
Posted (edited)

Ok, let's try to fix this.

 

Actually you have two ways of doing it.

One is to tell Emby where is your old library. This can be done adding:

EMBY_DATA="/var/lib/mediabrowser"

in /etc/emby-server.conf and restarting Emby server.

 

Another way is to fix the library DB for good since the new data path shouldn't change in the near future.

If you decide to go this way, just follow the procedure below.

 

First of all stop Emby and double check is not running.

During this procedure I will assume that Emby is running with emby user and group.

For the sake of consistency and assuming that you still have your original "/var/lib/mediabrowser" folder I would start with removing your current "/var/lib/emby-server" folder completely.

$ sudo rm -fr /var/lib/emby-server

Then as you did before do:

$ sudo cp -a /var/lib/mediabrowser /var/lib/emby-server
$ sudo chown emby.emby /var/lib/emby-server -R

This will put you back in square one but that's fine. Now go into the data directory under /var/lib/emby-server and backup your current library db:

$ cd /var/lib/emby-server/data
$ sudo cp -a library.db librarydb.bak
$ rm library.db-*

Then let's use sqlite to modify your library db:

$ sudo sqlite3 library.db

And in the SQLite prompt execute:

SELECT COUNT(*) FROM TypedBaseItems WHERE CAST(data AS TEXT) LIKE '%var/lib/mediabrowser/%';

This will tell you how many rows need updating. So let's update them:

UPDATE TypedBaseItems SET data = CAST(REPLACE(CAST(data AS TEXT), '/var/lib/mediabrowser', '/var/lib/emby-server') AS BLOB);

Now you can check if all the needed rows were updated with the following queries:

SELECT COUNT(*) FROM TypedBaseItems WHERE CAST(data AS TEXT) LIKE '%var/lib/mediabrowser/%';

The output should be 0 and then run:

SELECT COUNT(*) FROM TypedBaseItems WHERE CAST(data AS TEXT) LIKE '%var/lib/emby-server/%';

The output should be equal the the output of the first query of the procedure.

Once you did this, just exit sqlite and start Emby.

Now your library should be fixed and in the new path.

If you find any problems or you have any doubt just post it here.

Thanks.

Edited by fc7
  • Like 3
Posted

Success!

 

That worked perfectly. 

 

Thankyou very much @@fc7 and @@Luke for all the help. :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...