Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1
    Senior Member
    Join Date
    Jan 2013
    Posts
    228

    [Plugin Request/Offer] Mute or Skip tracks on a Blacklist

    Hi,
    As I still have no skills to create a new plugin, I'm just suggesting.

    Can we have a simple plugin which has a blacklist in settings for the artist name or/and track name. Than if one of the names on the list matched, LMS can mute or skip the track.
    This can be useful for any plugin playing randomly or any big playlists.
    But one of the benefits to have it in the background is to skip annoying radio announcements on a stream. I see that all streams with track information have also a name for their announcements(I'm not totally against them, but some of them are annoying). The plugin can mute volume while that announcement is playing, or skip a blacklisted track if it is in a playlist ( like Dont stop the music or random playlists, or a friends playlist from Spotify) No need to integrate blacklists in individual plugins.
    Anyone?

  2. #2
    Senior Member
    Join Date
    May 2017
    Posts
    274
    +1
    SqueezeBoxes: 2x SB2 (Living room and study), 1x Radio (Kitchen), 1x Boom (Dining room), 1x piCorePlayer (jacuzzi), 1x piCorePlayer (Garden) 1x OSMC + Squeezelite (Movie room), 1x Touch (Bedroom)
    Server: LMS on Pi3 7.9.1. on PcP 3.21
    Network: AVM Fritzbox, D-Link Smart Switch 24p, 3x Ubiquity

  3. #3
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    742
    fyi, there's a shell script for this posted here

  4. #4
    Senior Member
    Join Date
    Jan 2013
    Posts
    228
    Quote Originally Posted by Roland0 View Post
    fyi, there's a shell script for this posted here
    Yes, Thank you for that. I've been on that thread.
    Although I don't know how to use it, I believe I will search the forum and try; I'll be glad if someone show me where to look.

    I still think a general plugin for this purpose would be great and simple.

    Thanks again

  5. #5
    Senior Member
    Join Date
    Jan 2013
    Posts
    228
    Quote Originally Posted by Roland0 View Post
    fyi, there's a shell script for this posted here
    Hi Roland,
    I'm trying to use the script, but no success.. Here is what I did so far:

    -- I did install netcat6 and "which nc6" returns /bin/nc6
    -- I have created NoAdsLms.sh file with the code in /bin.
    -- I did use "Hostname" from Server Settings/Information as LMS, and track name as TRIGGER.
    -- I did "chmod +x /bin/NoAdsLms.sh"
    -- and run ./NoAdsLms.sh

    When I use test track with the TRIGGER name nothing happens.
    My test device is Odroid U3 with Max2Play installation.

  6. #6
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    742
    Quote Originally Posted by mkkyah View Post
    I'm trying to use the script, but no success..
    When I use test track with the TRIGGER name nothing happens..
    Change the line
    Code:
    DEBUG=
    to
    Code:
    DEBUG=1
    and check the output.
    Make sure your trigger matches exactly (e.g. incl. the encoded spaces (%20))

  7. #7
    Senior Member
    Join Date
    Jan 2013
    Posts
    228
    Quote Originally Posted by Roland0 View Post
    Change the line
    Code:
    DEBUG=
    to
    Code:
    DEBUG=1
    and check the output.
    Make sure your trigger matches exactly (e.g. incl. the encoded spaces (%20))
    Thanks Roland, but where should I get the output?
    This is what I get when using bash -x:

    S:/bin# bash -x ./NoAdsLms
    + which nc6
    + LMS=OdroidLMS
    + TRIGGER=Subject
    + DEBUG=1
    + declare -A plStat
    + declare -A plMute
    + true
    + psAR=(`echo "players 0 99"|nc6 -q1 $LMS 9090 2>/dev/null`)
    ++ echo 'players 0 99'
    ++ nc6 -q1 OdroidLMS 9090
    + sleep 2
    + true
    + psAR=(`echo "players 0 99"|nc6 -q1 $LMS 9090 2>/dev/null`)
    ++ echo 'players 0 99'
    ++ nc6 -q1 OdroidLMS 9090
    + sleep 2
    + true
    + psAR=(`echo "players 0 99"|nc6 -q1 $LMS 9090 2>/dev/null`)
    ++ echo 'players 0 99'
    ++ nc6 -q1 OdroidLMS 9090
    + sleep 2

  8. #8
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    742
    Quote Originally Posted by mkkyah View Post
    This is what I get when using bash -x:
    Don't use -x, execute the script normally
    if DEBUG=1 you should see some output just by running the script, provided the connection to your LMS server works, check with
    Code:
    echo "players 0 99"|nc6 -q1 OdroidLMS 9090
    If you don't, change the script as follows:
    Code:
        for i in "${psAR[@]}"; do
    # add this:
            [ $DEBUG ] && echo "LINE: $i
    which should result in a lot of output

  9. #9
    Senior Member
    Join Date
    Jan 2013
    Posts
    228
    Quote Originally Posted by Roland0 View Post
    Don't use -x, execute the script normally
    if DEBUG=1 you should see some output just by running the script, provided the connection to your LMS server works, check with
    Code:
    echo "players 0 99"|nc6 -q1 OdroidLMS 9090
    If you don't, change the script as follows:
    Code:
        for i in "${psAR[@]}"; do
    # add this:
            [ $DEBUG ] && echo "LINE: $i
    which should result in a lot of output
    Roland, thanks for your help.

    I get no debug info when I run the script
    But echo "players 0 99"|nc6 -q1 OdroidLMS 9090 returns:

    nc6: forward host lookup failed for remote endpoint OdroidLMS: Name or service not known

    Am I using correct "LMS="? OdroidLMS is taken from Server Settings/İnformation/Logitech Media Server Status/Hostname
    BTW I'm running all this script as root on Odroid.

  10. #10
    Senior Member
    Join Date
    Aug 2012
    Location
    Austria
    Posts
    742
    Quote Originally Posted by mkkyah View Post
    nc6: forward host lookup failed for remote endpoint OdroidLMS: Name or service not known
    Am I using correct "LMS="?
    Seems not. Check with
    Code:
    uname -n
    in the shell, or use the IP address, or use localhost if the script is running on the server itself.

    BTW I'm running all this script as root on Odroid.
    You should always use an unprivileged user for stuff like this.

Posting Permissions

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