Skip to main content

Clean your XBMC library using one of the coloured buttons on your MCE remote

I frequently purge my video library on my Synology NAS and needed a quick and easy way to clean the video library. I tried the automatic method but this comes with a caveat. If your library isn't quite ready when the clean-up starts, your entire library gets deleted. Got burnt twice so have instigated the button push method below under Openelec 3.0.2.

  1. SSH into Openelec using something like WinSCP
  2. Navigate to /usr/share/xbmc/system/keymaps/ and copy the remote.xml file to your local machine
  3. Using Wordpad (or any XML editor) search (F3) for 'Red' and edit the global section so you have whatever coloured button you want to clean the library and if you want, another to update the video library e.g:

    <green>XBMC.CleanLibrary(video)</green>
    <blue>XBMC.UpdateLibrary(video)</blue>

    Section will look like this:

    <keymap>
      <global>
        <remote>
          <play>Play</play>
          <pause>Pause</pause>
          <stop>Stop</stop>
          <forward>FastForward</forward>
          <reverse>Rewind</reverse>
          <left>Left</left>
          <right>Right</right>
          <up>Up</up>
          <down>Down</down>
          <select>Select</select>
          <enter>FullScreen</enter>
          <pageplus>PageUp</pageplus>
          <pageminus>PageDown</pageminus>
          <back>Back</back>
          <menu>PreviousMenu</menu>
          <title>ContextMenu</title>
          <info>Info</info>
          <skipplus>SkipNext</skipplus>
          <skipminus>SkipPrevious</skipminus>
          <display>FullScreen</display>
          <start>PreviousMenu</start>
          <record>Screenshot</record>
          <volumeplus>VolumeUp</volumeplus>
          <volumeminus>VolumeDown</volumeminus>
          <mute>Mute</mute>
          <power>XBMC.ShutDown()</power>
          <myvideo>XBMC.ActivateWindow(MyVideos)</myvideo>
          <mymusic>XBMC.ActivateWindow(MyMusic)</mymusic>
          <mypictures>XBMC.ActivateWindow(MyPictures)</mypictures>
          <mytv>XBMC.ActivateWindow(MyPVR)</mytv>
          <guide>XBMC.ActivateWindowAndFocus(MyPVR, 31,0, 10,0)</guide>
          <livetv>XBMC.ActivateWindowAndFocus(MyPVR, 32,0, 11,0)</livetv>
          <liveradio>XBMC.ActivateWindowAndFocus(MyPVR, 33,0, 12,0)</liveradio>
          <recordedtv>XBMC.ActivateWindowAndFocus(MyPVR, 34,0, 13,0)</recordedtv>
          <epgsearch>XBMC.ActivateWindowAndFocus(MyPVR, 35,0, 14,0)</epgsearch>
          <red>XBMC.ActivateWindow(MyPVR)</red>
          <green>XBMC.CleanLibrary(video)</green>
          <yellow>XBMC.ActivateWindow(MyMusic)</yellow>
          <blue>XBMC.UpdateLibrary(video)</blue>

          <zero>Number0</zero>
          <one>Number1</one>
          <two>JumpSMS2</two>
          <three>JumpSMS3</three>
          <four>JumpSMS4</four>
          <five>JumpSMS5</five>
          <six>JumpSMS6</six>
          <seven>JumpSMS7</seven>
          <eight>JumpSMS8</eight>
          <nine>JumpSMS9</nine>
        </remote>
  4. Using SMB, you can now navigate to \\OPENELEC\Userdata\keymaps\ and pop the newly edited 'remote.xml' file in there.
  5. Reboot.
You can now use those coloured buttons on your MCE remote to manage your video library.

N.B My remote is one of the OrigenAE RC197 remotes that has the coloured buttons at the bottom. The OrigenAE one (if you can find it), also has a TV button you can program along with volume buttons that can learn your stereo commands. I highly recommend it. You can get clones on eBay. Just make sure you order the one with the coloured buttons at the bottom as some don't have these. Works flawlessly with XBMC on Openelec.

Comments

Popular posts from this blog

Using ESPEasy with Home Assistant via MQTT

Preface: I've just started playing around with Home Assistant on a Raspberry Pi and exploring the world of MQTT to control devices on the network. Learning curve is a bit steep but worth the effort as MQTT is very fast. The hardware and software tools I'm using are as follows: 2 x Sonoff relay units 2 x NodeMCU Boards ESPEasy firmware (must be version 121 or above as that contains the MQTT 'retain' flag option. Home Assistant software on Raspberry Pi2 MQTT Test Software: PC: MQTT.fx Android: MQTT Dashboard

My Notepad++ tricks when editing YAML files in Home Assistant

To comment out a whole section in one go: Highlight the text you want to comment out and use CTRL + Q. If you do this at the start of a line, it will only comment that line. CTRL + Q is toggle mode (comment on/off). CTRL + K will allow you to add multiple comments one after the other.

How to check what entities are filling up your Home Assistant database

If you use the Home Assistant MariaDB add-on, this tip will show you how to query the database so see what Home Assistant entity states are triggering the most, filling up your database. What were going to do: Install the phMyAdmin add-on for MariaDB. Query the MariaDB database. See what entity state changes have the most action. Paste the code below into the SQL query box:  select entity_id,count( * ) from states group by entity_id order by count ( * ) desc; And if you're using the internal home-assistant_v2.db instead, you can use the SQLite Web add-on to achieve the same thing.