Thread: Mythmusic - Command line scan for music?

Reply to Thread
Results 1 to 6 of 6
  1. Default Mythmusic - Command line scan for music? #1
    hitch is offline MythTV lil' Helper
    Join Date
    Jul 2006
    Posts
    78
    MythTV Gallery
    0
    Is it possible to scan for music from the command line? It's a bit of a pain to always have to go specifically and scan for music in the UI, which takes a long time.

    Reply With Quote  

  2. Default #2
    jonnybignote is offline MythTV Friend
    Join Date
    Sep 2009
    Posts
    26
    MythTV Gallery
    0
    that is a question I'm trying to find out myself and its strange that you don't see more requests for it...


    Reply With Quote  

  3. Default #3
    bernied is offline MythTV Friend
    Join Date
    Aug 2008
    Location
    Edinburgh
    Posts
    24
    Distribution
    Debian
    MythTV Version
    0.21
    MythTV Gallery
    0
    Quote Originally Posted by hitch View Post
    Is it possible to scan for music from the command line? It's a bit of a pain to always have to go specifically and scan for music in the UI, which takes a long time.
    I know this is an old post, but it's the only mention I see of this question.
    Does anyone know the answer?

    I often add music remotely, and also like to use MythWeb to play my music, but there seems to be no way to update the DB remotely.


    Reply With Quote  

  4. Default #4
    hitch is offline MythTV lil' Helper
    Join Date
    Jul 2006
    Posts
    78
    MythTV Gallery
    0
    I haven't found a way to do it by command line yet - not sure if it's possible in the latest version. I did find in the latest version that there is now a "key" option - i.e. in the "Edit Keys" section there's a scan music option, which I've set to Ctrl-S - now anywhere in mythtv if I hit Ctrl-S it will scan. doesn't solve your problem, but makes it easier to scan than it used to be..


    Reply With Quote  

  5. Default #5
    bernied is offline MythTV Friend
    Join Date
    Aug 2008
    Location
    Edinburgh
    Posts
    24
    Distribution
    Debian
    MythTV Version
    0.21
    MythTV Gallery
    0
    Thanks - this could be the solution.

    If a key can be mapped then there should be a way to send a key command to mythfrontend, say using the telnet socket:
    Telnet socket - MythTV
    (but I don't think you can send the Ctrl key)

    I think this could probably be automated into a script. I'll try to figure it out later today.
    Then you could run the script every day at 4am, or similar. Or at least be able to run it remotely through ssh.


    Reply With Quote  

  6. Default #6
    bernied is offline MythTV Friend
    Join Date
    Aug 2008
    Location
    Edinburgh
    Posts
    24
    Distribution
    Debian
    MythTV Version
    0.21
    MythTV Gallery
    0
    A crude script, seems to work:
    Code:
    bernie@shinym:~$ cat ./MusicScan
    #!/bin/bash
    #
    # Script to send signal to mythfrontend to scan music files
    # Change 'f6' to whatever key you've mapped
    #
    ( sleep 2
      echo key f6
      sleep 2
      echo quit ) | telnet localhost 6546
    And the result:
    Code:
    bernie@shinym:~$ ./MusicScan
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    MythFrontend Network Control
    Type 'help' for usage information
    ---------------------------------
    # OK
    # Connection closed by foreign host.


    Reply With Quote  

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Mythmusic - Scan for New music - Missing Songs
    By wizgnome in forum General
    Replies: 1
    Last Post: 11-21-2008, 10:29 PM
  2. Screen command line option
    By innominate in forum General
    Replies: 2
    Last Post: 07-02-2008, 02:53 AM
  3. Command line to Internal Player ?
    By hubbe in forum General
    Replies: 2
    Last Post: 02-21-2008, 11:00 PM
  4. Update database from command line
    By mrreload in forum General
    Replies: 1
    Last Post: 03-18-2005, 05:47 AM
  5. How to transcode .vob files at the command line.
    By rcldesign in forum General
    Replies: 0
    Last Post: 11-16-2004, 07:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts