How-to Guide: Setting default language for audio track & subtitles on managed accounts (e.g. Guest)

Update: While someone below has claimed that from PMS 3.4.0 on default language setting is also supported for managed users, other users claim that it isn’t true for the audio. The following How-To Guide describes how to fix the default language issue in Plex Media Server, including version 3.4.0 (and likely thereafter)

The fact that managed user accounts (which includes Guest) do ignore Plex Media Server’s global default language setting (so which audio track to pick, as well as subtitle behavior by default on playback), drove me nuts since more than a year. I finally decided to dig into this issue and wrote a summary on how to fix this. Unfortunately it requires database editing on a command line level, no idea why the Plex guys don’t implement this as a clickable option.

  1. Open a shell window.
    Before you begin editing the database file, quit or stop the server app/plug-in.
    The sql database file we need to edit is com.plexapp.plugins.library.db.
    I personally run my Plex Media Server on a FreeNAS 9.10 Server, where the path is:
    cd /mnt/Name_of_your_Datapool_here/jails/plexmediaserver_1/var/db/plexdata/Plex Media Server/Plug-in Support/Databases

  2. Type ls, and you’ll see numerous .db files, including com.plexapp.plugins.library.db. That’s the one we are looking for and need to edit. But first, lets make a backup, in case you f*ck it up:
    cp com.plexapp.plugins.library.db com.plexapp.plugins.library.db_BU

  3. Next open the database file for editing
    sqlite3 com.plexapp.plugins.library.db
    As you can tell by the sqlite> prompt, you’re now in the SQL editor. Note that the sqlite inputs are CASE SENSITIVE! So enter commands exactly as shown below.

  4. To understand which section of the listed table is which, we enable headers:
    sqlite> .headers ON

  5. Also enable column mode when listing:
    sqlite> .mode column

  6. Now list the existing user accounts:
    sqlite> SELECT * FROM accounts;


    The managed accounts in this example, which sadly aren’t affected by the global default language settings, are ‘Guest’ and ‘Wookie’, only ‘Admin’ follows my global settings, which is ‘de’ (= german) for default_audio_language, and subtitles turned off (the ‘0’ under auto_select_subtitle). So in the following steps, we set the language defaults manually:

  7. Change default_audio_language for the desired account:
    sqlite> UPDATE accounts SET default_audio_language = 'de' WHERE name = 'Guest';

  8. Change auto_select_subtitle:
    sqlite> UPDATE accounts SET auto_select_subtitle = '0' WHERE name = 'Guest';
    Repeat the process for each other managed account name, in my case ‘Wookie’.

  9. Verify the result:
    sqlite> SELECT * FROM accounts;


  10. Quit the sqlite Editor:
    sqlite> .quit

  11. Now start the Plex Media Server again and try the settings, but leave the shell open. If everything works as desired, remove the database backup we’ve created in the beginning:
    rm com.plexapp.plugins.library.db_BU
6 Likes

Great tutorial, this has been driving me nuts for months now.
Will try to edit the db file as described as soon as I have a few hours spare time.
Not really into the command line editing, but worth the try.
Is it possible to stop PMS, copy the db, send this to a friend (with SQL knowledge :)) let him edit this and copy it back?
I have PMS on my Synology and am a little worried that copying will change the permissions.
Permissions are now set to ‘plex’ as owner. Will copying the db, editing on different machine and copying back, break the permissions?

The editing is really just what you see here. It doesn’t require knowledge of a command line based editor like vi. Simply follow the steps as described above. No worries. Fairly simple. (I’m not UNIX expert either and only have very basic skills).

Thanks for believing in me
Will give it a try this weekend.

@Storm_ryder said:
Is it possible to stop PMS, copy the db, send this to a friend (with SQL knowledge :)) let him edit this and copy it back?

It should be possible.
But you must completely quit / end / stop Plex Server on your NAS before you copy the database file. Otherwise you may end up with a damaged database!

If you have a Windows installation somewhere, you can use this little tool which hides all the SQL jazz behind some menus:
forums.plex.tv/discussion/120292/moviefans-database-tool-for-plex/p1#top

It’ll happily edit the copied database file from your Syno.

Thanks for the offer. Will try myself first and if this doesn’t work I will take you up on it.

Tnx for this, it is very useful.

Do you know if it is there the possibility to change Plex User name?
I mean the name you see connecting with plex client.
For all managed user i have the name i like, but for my plex user i have a bad name.
Maybe in DB there is a alias you can manually modify.
Tnx

Followed the tutorial and it was the easiest thing.
Now both of my managed users have correct settings, thanks for your help.

@fbrassin said:
Do you know if it is there the possibility to change Plex User name?
I mean the name you see connecting with plex client.
For all managed user i have the name i like, but for my plex user i have a bad name.

https://plex.tv/users/edit

Clients may require a reboot or in extreme cases a ‘sign out’/‘sign in’ to pick up the change.
(Do not sign out your server - only the clients!)

The latest Plex/web update addresses this issue
Ref: http://forums.plex.tv/discussion/comment/1418394/#Comment_1418394

@OttoKerner said:

@fbrassin said:
Do you know if it is there the possibility to change Plex User name?
I mean the name you see connecting with plex client.
For all managed user i have the name i like, but for my plex user i have a bad name.

https://plex.tv/users/edit

Clients may require a reboot or in extreme cases a ‘sign out’/‘sign in’ to pick up the change.
(Do not sign out your server - only the clients!)

The problem is that my name has already been taken.
I’d like to give my plex name an alias that i see only in my home.

@fbrassin said:
The problem is that my name has already been taken.
I’d like to give my plex name an alias that i see only in my home.

That is not possible.

@hthighway said:
The latest Plex/web update addresses this issue
Ref: http://forums.plex.tv/discussion/comment/1418394/#Comment_1418394

Been living with the language issue for ages, ~~and when I finally decide to invest some time to find a fix and share the solution, the Plex guys implement language support a week later. Grrreat… :confused: :tired_face: :smiley: ~~

They probably saw this post and thought; that is an easy solution, lets copy and implement this :wink:

The audio language can’t be changed in the web UI 3.4.
Thank you for this very interresting how-to :slight_smile:

@Eins84 said:
Been living with the language issue for ages, and when I finally decide to invest some time to find a fix and share the solution, the Plex guys implement language support a week later. Grrreat… :confused: :tired_face: :smiley:

Sorry, your HowTo is still needed for a little while longer.
The language setting that was added is only for the interface language of the plex clients.

@Eins84 said:

@hthighway said:
The latest Plex/web update addresses this issue
Ref: http://forums.plex.tv/discussion/comment/1418394/#Comment_1418394

Been living with the language issue for ages, and when I finally decide to invest some time to find a fix and share the solution, the Plex guys implement language support a week later. Grrreat… :confused: :tired_face: :smiley:

You are the reason we all get to enjoy this now. Thanks :slight_smile:

So, whats the status on here? Its been more than a year now.
I’m currently using a minutely crontab to change the library database. This should not be the way we have to handle default languages for managed accounts!
This is really a usability issue because on every play they need to switch from en to another audio language when not having a minutely crontab for that. That takes time and it produces unnecessary load on both storage and server.

This has long since been solved. In fact very shortly after my last post above.

You must become your managed user by clicking on ‘Switch User’. (Click on the user avatar in the upper right corner of the web app)
Then go on ‘Account’ (same place).
There, you can set both the language preferences and an avatar for that user.

Hi there! I know I can switch users and edit the language preferences for my Home or managed users. Can this be done for friends (shared non-managed users) by editing the database as well?

I tried doing so using DB Browser for SQLite, saved changes, but once I came back to check it reverted all my non-managed users values to 0. So I was wondering if I did something wrong.