[Airtime] Playlists + Know how
  • Hello everybody,

    A friend of mine has installed Airtime on my server.
    I have thousands (really lots) of musics, divided by folders and subfolders (by artist, album, year, etc) and I'm wondering how Airtime works. How it reads the musics. How it reads the playlists.

    When I build a playlist, where it saves it? Do it uses a playlist file (like Icecast)?
    When I upload a music, where Airtime stores (path) it inside my server?

    At Icecast I used to upload musics (even folders of musics) to a directory on my server and, then build a playlist.txt file containing the uploaded musics in order to play it.


    Thanks for your time
    DarkEden Genesis
    www.darkedengenesis.com
  • 16 Comments sorted by
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    "When I build a playlist, where it saves it?"
    It saves it in the database.

    "When I upload a music, where Airtime stores (path) it inside my server?"
    It stores it in the import folder, which you set in Config->Manage Media Folders in the interface.
    You can also add your existing folders there as a "Watch Folder" so you dont have to manually import anything.

    For more info, check out the manual:
    http://en.flossmanuals.net/airtime/manage-media-folders/



  • I'm having an issue where the music I upload or add to the music manager is disappearing.  I see it when I CD into the directory, but from Airtime GUI, It's not there?


    www.djlance.net
    @djlancestl
  • Thank you Paul,

    That's cool.
    I could find out the musics path.

    Now tell me, where is stored the playlists??
    When I create a playlist it must be stored somewhere...

    I made a search:
    "# find / -iname "test playlist".

    but it didn't returned any results.

    So tell me, how the system works?
    How it build a playlist? How is it called by the system when I program it on the calendar?
    DarkEden Genesis
    www.darkedengenesis.com
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    as it's a database you can not use file utilities. Use psql instead:
     psql -U airtime -W -d airtime -h localhost -c "select * from cc_playlist"


    it will ask for password: airtime
  • Cool, now tell me.
    When my friend was installing AirTime on my server, he configured mysql user, pass, etc.

    There is a config file, where I can see those confs?


    Thank you Andrey Podshivalov, great life for Polish.
    DarkEden Genesis
    www.darkedengenesis.com
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    mysql is not used by airtime, only postgresql

    the config files of airtime are available in /etc/airtime
  • Ok, I found it out...

    Are there many differences between MySQL and PostgreSQL?
    I ask that, because I know only a few of MySQL...never worked with PSQL, anyway it can be a good class.

    Another question.

    On this statement:

    psql -U airtime -W -d airtime -h localhost -c "select * from cc_playlist"

    What is what??
    "airtime" is repeated twice.
    The first airtime is the DB User?
    Second is the DB Name?


    Thank you again.
    DarkEden Genesis
    www.darkedengenesis.com
  • I found the airtime.conf file.

    But the password on it didn't worked.

    psql: FATAL:  Ident authentication failed for user "airtime"
    DarkEden Genesis
    www.darkedengenesis.com
  • Hey,

    How can I view all tables on my Airtime DB??
    I could see my playlists created on my AirtimeDB, but I can't see what musics are on it??
    I need to know which musics are in each playlist. Do you get it? Can I see it through PSQL?


    Thanks
    DarkEden Genesis
    www.darkedengenesis.com
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    get all files:
    psql -U airtime -W -d airtime -h localhost -c "select * from cc_files" -A
    get playlist content:
    psql -U airtime -W -d airtime -h localhost -c "select * from cc_playlistcontents"

    play with psql parameters (psql --help) to get suitable output format


  • I have already figured out...thanks anyway...

    I could find those tables through command:

    \dt

    Andrey, tell me, there is anyway that I can build playlists like on Icecast?

    On Icecast I used to do this:

    find / -name *.mp3 > playlist.txt

    Is there such solution for Airtime??
    I have really lots of musics and I must make a big playlist to make it repeats.

    Maybe a script that adds all uploaded musics for a single playlist?
    Post edited by DarkEden Genesis at 2011-12-01 13:15:44
    DarkEden Genesis
    www.darkedengenesis.com
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team

    Is there such solution for Airtime??
    I have really lots of musics and I must make a big playlist to make it repeats.


    airtime has tracks import utility utils/airtime-import/airtime-import but nothing for playlists currently. It could be possible in future version via rest api
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    We hope this feature coming soon ;)
  • Guys, I have checked it out.

    Maybe a psql (or PHP whatever) script can be written for that?

    A script where it takes all needed info from cc_files (such as id, length, etc), to set in cc_playlistcontents ???

    Tell me if I'm saying something impossible.
    I just don't have knowledge on PSQL.

    What you think?
    DarkEden Genesis
    www.darkedengenesis.com
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    of course,  you can implement playlist import utility based on php/python/perl etc but it requires some software programming skills. PSQL is some dialect of standard sql lanquage. If you familiar with mysql then it shouldn't be a problem
  • I have small MySQL knowledge...
    But I guess that some PHP script maybe could do this job automatically

    1- Get musics info:
    "Select id, lenght, etc from cc_files;"

    2- Update the cc_playlistcontents with the previous acquired info:
    "update cc_playlistcontents **with the info gotten from the previous function**;"

    I think it's possible, but I wouldn't know how to make.
    Post edited by DarkEden Genesis at 2011-12-02 15:03:06
    DarkEden Genesis
    www.darkedengenesis.com