MP2 - V2.4.1 Add version info to settings section (1 Viewer)

ge2301

Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Unfortunately sqlite does not support to drop column from a table, so the downgrade takes a few more steps:
    SQL:
    begin transaction;
    
    alter table attached_clients rename to bak_clients;
    
    CREATE TABLE ATTACHED_CLIENTS (SYSTEM_ID TEXT COLLATE NOCASE NOT NULL PRIMARY KEY,   LAST_HOSTNAME TEXT COLLATE NOCASE ) WITHOUT ROWID;
    
    insert into attached_clients (system_id, last_hostname) select system_id, last_hostname from bak_clients;
    
    update mediaportal_basis set version_minor = 0 where subschema_name = 'ClientManager';
    
    drop table bak_clients;
    
    commit;

    Please first take a backup of the datastore.s3db.
    Where can I execute this code? I have just DBBrowser at the moment.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I use this one, works well. Don't know DBBrowser myself:
    1659900810504.png
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Ok, I downloaded the same software and executed the script. The server does still not start, seems the entry LAST_CLIENT_NAME is not existing.
    [2022-08-07 21:43:04,128] [767 ] [Main ] [FATAL] - Error starting application
    code = Error (1), message = System.Data.SQLite.SQLiteException (0x800007BF): SQL logic error
    no such column: LAST_CLIENT_NAME
    bei System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
    bei System.Data.SQLite.SQLiteCommand.BuildNextCommand()
    bei System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
    bei System.Data.SQLite.SQLiteDataReader.NextResult()
    bei System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
    bei System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
    bei System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior)
    bei System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    bei MediaPortal.Backend.Services.ClientCommunication.ClientManager.ReadAttachedClientsFromDB()
    bei MediaPortal.Backend.Services.ClientCommunication.ClientManager.Startup()
    bei MediaPortal.Backend.BackendExtension.StartupBackendServices()
    bei MediaPortal.Server.ApplicationLauncher.Start()
    Backup is existing.
     
    Last edited:

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Ok, I downloaded the same software and executed the script. The server does still not start, seems the entry LAST_CLIENT_NAME is not existing.
    Oh, I am sorry. I removed one column too much, my fault :oops:

    To restore the structure run:
    SQL:
    alter table ATTACHED_CLIENTS add LAST_CLIENT_NAME TEXT COLLATE NOCASE;

    I also fixed the code block above
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I made some progress and added a screen that shows you all online UPnP devices and version information if available. This is not limited to MediaPortal components but also shows other devices like modems, TV, MediaServers etc.

    1660995915948.png


    I now think about my change to add version information to database, it is not neccessary if we go this route. On the other hand it has the advantage that also version information about attached clients are visible, even if they are currently offline
     
    Last edited:

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    I made some progress and added a screen that shows you all online UPnP devices and version information if available. This is not limited to MediaPortal components but also shows other devices like modems, TV, MediaServers etc.

    View attachment 210650

    I now think about my change to add version information to database, it is not neccessary if we go this route. On the other hand it has the advantage that also version information about attached clients are visible, even if they are currently offline
    Can we distinguish it into 2 groups „MediaPortal devices“ (Everything starting with mediaportal) and „Other devices“?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Yes, I planned this already. I thought about a checkbox "also show other devices" which is disabled by default. And could you maybe create another server image for the case, that there is another one in network, that you are not attached to?
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Yes, I planned this already. I thought about a checkbox "also show other devices" which is disabled by default. And could you maybe create another server image for the case, that there is another one in network, that you are not attached to?
    I will add one when I’m back home.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    This is how the filtered list now looks like in my LAN:
    The 2 lower entries are from my production single-seat HTPC in living room which do not have version information yet.
    1661079586277.png
     

    Users who are viewing this thread

    Top Bottom