Change Default Profile Setting (profiles.xml)

  • Hi everyone,


    I am compiling successfuly Libreelec v9 for s905 device. But I want to set default profile setting (profiles.xml) myself.

    The structure normally does not contain the profiles.xml file. Generating when Kodi starts.

    I tried change package kodi files and add manual profiles.xml but completed profiles.xml file is empty

    When system run on device auto generate standard new profiles.xml file with kodi starts.


    I waiting your helps. Thanks everyone.

  • You need to create the profiles.xml file and stash it somewhere in the image, e.g. /usr/config/profiles/profiles.xml, and then you need to modify the Kodi startup script (kodi.sh) to check whether /storage/.kodi/userdata/profiles.xml exists, and if not (because it's first boot) copy it from the /usr/config location before Kodi is started. You can do this within the Kodi package.mk.

  • Thank you chewitt.

    I changed "packages/mediacenter/kodi/scripts/kodi-config" and "packages/mediacenter/kodi/package.mk" and added myself profiles.xml. It's great working.


    Now I have new a question.

    I want hiding "Profile Directory" selection in the File manager. I didn't do it.


    Thanks everyone.

  • It is sad. I think about kodi code like you. So I browsing kodi package file system but counldn't find yet. Thank you for answer.

  • I did find. I chanced some lines in (kodipackage)/xbmc/windows/GUIWindowFileManager.cpp

    Someone wrote a note on line 629, I didn't do anything about it. Only I did disable lines 514-529. It's working.


    if (strDirectory.empty())

    {

    CFileItemPtr pItem(new CFileItem("special://profile/", true));

    pItem->SetLabel(g_localizeStrings.Get(20070));

    pItem->SetArt("thumb", "DefaultFolder.png");

    pItem->SetLabelPreformatted(true);

    m_vecItems[iList]->Add(pItem);


    #ifdef TARGET_DARWIN_IOS

    CFileItemPtr iItem(new CFileItem("special://envhome/Documents/Inbox", true));

    iItem->SetLabel("Inbox");

    iItem->SetArt("thumb", "DefaultFolder.png");

    iItem->SetLabelPreformatted(true);

    m_vecItems[iList]->Add(iItem);

    #endif

    }