<commit_before><?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="oomusic_folder_view_form" model="ir.ui.view">
        <field name="name">oomusic.folder.form</field>
        <field name="model">oomusic.folder</field>
        <field name="arch" type="xml">
            <form string="Folder">
                <header>
                    <button name="action_scan_folder" string="Scan" type="object"/>
                    <button name="action_scan_folder_full" string="Force Full Scan"
                        type="object" groups="base.group_no_one"/>
                </header>
                <sheet>
                    <field name="user_id" invisible="1"/>
                    <div class="oe_title">
                        <h1>
                            <field name="name" placeholder="Name"/>
                        </h1>
                    </div>
                    <group>
                        <field name="path"/>
                        <field name="exclude_autoscan"/>
                    </group>
                    <group>
                        <field name="last_scan" readonly="1"/>
                        <field name="last_scan_duration" readonly="1" groups="base.group_no_one"/>
                        <field name="locked" groups="base.group_no_one"/>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="oomusic_folder_view_tree" model="ir.ui.view">
        <field name="name">oomusic.folder.tree</field>
        <field name="model">oomusic.folder</field>
        <field name="arch" type="xml">
            <tree string="Folders" decoration-danger="locked == True">
                <field name="locked" invisible="1"/>
                <field name="name"/>
                <field name="path"/>
                <field name="last_scan"/>
            </tree>
        </field>
    </record>

    <record id="action_folder" model="ir.actions.act_window">
        <field name="name">Folders</field>
        <field name="res_model">oomusic.folder</field>
        <field name="type">ir.actions.act_window</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="domain">[('root', '=', True)]</field>
        <field name="help" type="html">
            <p class="oe_view_nocontent_create">
                Set-up the music directories to scan.
            </p><p>
                Your music wil be automatically organized by album and artist in the corresponding
                menu. Scanning a directory is usually quite fast, taking around 30 seconds to scan
                1,000 files.
            </p>
        </field>
    </record>

    <record id="action_oomusic_browse" model="ir.actions.client">
        <field name="name">Browse Files</field>
        <field name="tag">oomusic_browse</field>
    </record>

    <!-- Third Level Menu -->
    <menuitem id="menu_action_folder" parent="menu_oomusic_config" action="action_folder" sequence="10"/>
    <menuitem id="menu_action_oomusic_browse" parent="menu_oomusic_library" action="action_oomusic_browse" sequence="40"/>
</odoo>
<commit_msg>Make folder scanning clearer<commit_after><?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="oomusic_folder_view_form" model="ir.ui.view">
        <field name="name">oomusic.folder.form</field>
        <field name="model">oomusic.folder</field>
        <field name="arch" type="xml">
            <form string="Folder">
                <header>
                    <button name="action_scan_folder" string="Scan" type="object"/>
                    <button name="action_scan_folder_full" string="Force Full Scan"
                        type="object" groups="base.group_no_one"/>
                </header>
                <div class="alert alert-danger" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('locked', '=', False)]}">
                    This folder is being scanned. The music library will be updated progressively.
                </div>
                <sheet>
                    <field name="user_id" invisible="1"/>
                    <div class="oe_title">
                        <h1>
                            <field name="name" placeholder="Name"/>
                        </h1>
                    </div>
                    <group>
                        <field name="path"/>
                        <field name="exclude_autoscan"/>
                    </group>
                    <group>
                        <field name="last_scan" readonly="1"/>
                        <field name="last_scan_duration" readonly="1" groups="base.group_no_one"/>
                        <field name="locked" groups="base.group_no_one"/>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="oomusic_folder_view_tree" model="ir.ui.view">
        <field name="name">oomusic.folder.tree</field>
        <field name="model">oomusic.folder</field>
        <field name="arch" type="xml">
            <tree string="Folders" decoration-danger="locked == True">
                <field name="locked" invisible="1"/>
                <field name="name"/>
                <field name="path"/>
                <field name="last_scan"/>
            </tree>
        </field>
    </record>

    <record id="action_folder" model="ir.actions.act_window">
        <field name="name">Folders</field>
        <field name="res_model">oomusic.folder</field>
        <field name="type">ir.actions.act_window</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form</field>
        <field name="domain">[('root', '=', True)]</field>
        <field name="help" type="html">
            <p class="oe_view_nocontent_create">
                Set-up the music directories to scan.
            </p><p>
                Your music wil be automatically organized by album and artist in the corresponding
                menu. Scanning a directory is usually quite fast, taking around 30 seconds to scan
                1,000 files.
            </p>
        </field>
    </record>

    <record id="action_oomusic_browse" model="ir.actions.client">
        <field name="name">Browse Files</field>
        <field name="tag">oomusic_browse</field>
    </record>

    <!-- Third Level Menu -->
    <menuitem id="menu_action_folder" parent="menu_oomusic_config" action="action_folder" sequence="10"/>
    <menuitem id="menu_action_oomusic_browse" parent="menu_oomusic_library" action="action_oomusic_browse" sequence="40"/>
</odoo>

{'fraction_non_alphanumeric': 0.14227272727272727, 'fraction_numerical': 0.005909090909090909, 'mean_word_length': 1.8415841584158417, 'pattern_counts': {'":': 0, '<': 159, '<?xml version=': 2, '>': 159, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7034583', 'n_tokens_mistral': 1890, 'n_tokens_neox': 1792, 'n_words': 368}