Help for a liquidsoap script please... playlist
  • Hi,

    This is my script in liquidsoap (Thank you Albert FR for the code) :


    promotions = playlist ("/srv/airtime/indicatifs")
    musics = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/airtime/stor/imported")
    default = rotate(weights=[1,6], [promotions, musics])


    I want to skip reading audio files that are longer than 20 minutes (by example) because in "imported" folder there are shows (recorded)

    Do you know a code for that ?

    Thanks
  • 3 Comments sorted by
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    the easy way :
    change directory :-)

    find the files < 10Mo (for example) and move them to another directory :

    find  /srv/airtime/stor/imported/ -type f -size -10000000 -exec mv {} /srv/airtime/mp3/\;


  • Ok Albert, but i don't want duplicate my library, i have over 100Go !

    Oups sorry, but if i move files, links in show will be broken ;-(

    ls_script is powerful no ?
    Post edited by Yannick at 2014-09-22 07:13:11
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    mv command line is for move not for duplicate (that cp for that)
    and, links will be recreate by liquidsoap

    and liquidsoap il powerful effectively but this action will be dangerous to use (in my opinion)