From 7ea56a60b730409a262eff6a753ab1c00c0373f0 Mon Sep 17 00:00:00 2001 From: Marco Ziener Date: Wed, 13 Oct 2010 01:24:13 +0200 Subject: Audiofiles geadded && mediamodul angefangen zu schreiben --- ac/01 - Northern Lights.mp3 | Bin 0 -> 3644552 bytes ac/02 - Angels.mp3 | Bin 0 -> 4988418 bytes ac/03 - Disease (08 03 08).mp3 | Bin 0 -> 10424149 bytes ac/04 - Little Light.mp3 | Bin 0 -> 3990623 bytes ac/05 - Happy People.mp3 | Bin 0 -> 3760791 bytes ac/06 - Hold Back.mp3 | Bin 0 -> 3487965 bytes ac/07 - Choose to Be.mp3 | Bin 0 -> 4132180 bytes ac/08 - Wedding Song.mp3 | Bin 0 -> 3345972 bytes ac/License.txt | 12 + ac/Readme - www.jamendo.com .txt | 254 +++++++++++++++++++++ ...r] Allison Crowe - Little Light (originals).jpg | Bin 0 -> 3157 bytes ac/allison crowe/01 - Northern Lights.mp3 | Bin 0 -> 3644552 bytes ac/allison crowe/02 - Angels.mp3 | Bin 0 -> 4988418 bytes ac/allison crowe/03 - Disease (08 03 08).mp3 | Bin 0 -> 10424149 bytes ac/allison crowe/04 - Little Light.mp3 | Bin 0 -> 3990623 bytes ac/allison crowe/05 - Happy People.mp3 | Bin 0 -> 3760791 bytes ac/allison crowe/06 - Hold Back.mp3 | Bin 0 -> 3487965 bytes ac/allison crowe/07 - Choose to Be.mp3 | Bin 0 -> 4132180 bytes ac/allison crowe/08 - Wedding Song.mp3 | Bin 0 -> 3345972 bytes ac/allison crowe/License.txt | 12 + ac/allison crowe/Readme - www.jamendo.com .txt | 254 +++++++++++++++++++++ ...r] Allison Crowe - Little Light (originals).jpg | Bin 0 -> 3157 bytes media.erl | 49 ++++ 23 files changed, 581 insertions(+) create mode 100644 ac/01 - Northern Lights.mp3 create mode 100644 ac/02 - Angels.mp3 create mode 100644 ac/03 - Disease (08 03 08).mp3 create mode 100644 ac/04 - Little Light.mp3 create mode 100644 ac/05 - Happy People.mp3 create mode 100644 ac/06 - Hold Back.mp3 create mode 100644 ac/07 - Choose to Be.mp3 create mode 100644 ac/08 - Wedding Song.mp3 create mode 100644 ac/License.txt create mode 100644 ac/Readme - www.jamendo.com .txt create mode 100644 ac/[cover] Allison Crowe - Little Light (originals).jpg create mode 100644 ac/allison crowe/01 - Northern Lights.mp3 create mode 100644 ac/allison crowe/02 - Angels.mp3 create mode 100644 ac/allison crowe/03 - Disease (08 03 08).mp3 create mode 100644 ac/allison crowe/04 - Little Light.mp3 create mode 100644 ac/allison crowe/05 - Happy People.mp3 create mode 100644 ac/allison crowe/06 - Hold Back.mp3 create mode 100644 ac/allison crowe/07 - Choose to Be.mp3 create mode 100644 ac/allison crowe/08 - Wedding Song.mp3 create mode 100644 ac/allison crowe/License.txt create mode 100644 ac/allison crowe/Readme - www.jamendo.com .txt create mode 100644 ac/allison crowe/[cover] Allison Crowe - Little Light (originals).jpg diff --git a/ac/01 - Northern Lights.mp3 b/ac/01 - Northern Lights.mp3 new file mode 100644 index 0000000..fc79340 Binary files /dev/null and b/ac/01 - Northern Lights.mp3 differ diff --git a/ac/02 - Angels.mp3 b/ac/02 - Angels.mp3 new file mode 100644 index 0000000..e1011b2 Binary files /dev/null and b/ac/02 - Angels.mp3 differ diff --git a/ac/03 - Disease (08 03 08).mp3 b/ac/03 - Disease (08 03 08).mp3 new file mode 100644 index 0000000..25886e2 Binary files /dev/null and b/ac/03 - Disease (08 03 08).mp3 differ diff --git a/ac/04 - Little Light.mp3 b/ac/04 - Little Light.mp3 new file mode 100644 index 0000000..2dd8cff Binary files /dev/null and b/ac/04 - Little Light.mp3 differ diff --git a/ac/05 - Happy People.mp3 b/ac/05 - Happy People.mp3 new file mode 100644 index 0000000..b379be5 Binary files /dev/null and b/ac/05 - Happy People.mp3 differ diff --git a/ac/06 - Hold Back.mp3 b/ac/06 - Hold Back.mp3 new file mode 100644 index 0000000..f3c0697 Binary files /dev/null and b/ac/06 - Hold Back.mp3 differ diff --git a/ac/07 - Choose to Be.mp3 b/ac/07 - Choose to Be.mp3 new file mode 100644 index 0000000..d9bd188 Binary files /dev/null and b/ac/07 - Choose to Be.mp3 differ diff --git a/ac/08 - Wedding Song.mp3 b/ac/08 - Wedding Song.mp3 new file mode 100644 index 0000000..017e2e0 Binary files /dev/null and b/ac/08 - Wedding Song.mp3 differ diff --git a/ac/License.txt b/ac/License.txt new file mode 100644 index 0000000..040e8da --- /dev/null +++ b/ac/License.txt @@ -0,0 +1,12 @@ + +Track | License URL +---------------------------------------------- + 01 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 02 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 03 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 04 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 05 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 06 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 07 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 08 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + artwork | http://creativecommons.org/licenses/by-nc-sa/3.0/ \ No newline at end of file diff --git a/ac/Readme - www.jamendo.com .txt b/ac/Readme - www.jamendo.com .txt new file mode 100644 index 0000000..8126e88 --- /dev/null +++ b/ac/Readme - www.jamendo.com .txt @@ -0,0 +1,254 @@ +This 'Readme' file is available below in: English, Français, Italiano, Español, Deutsch, Polski, Русский, Português. + + + + + +Thank you for downloading this album! + +It’s FREE and LEGAL distribution by Jamendo: + +http://www.jamendo.com/ + +On the website you'll be able to: + + - Write a review about the album and check out other reviews already written by members of our community. + + - Obtain more information about the artist and/or album. + + - Download other quality music for FREE. + + - Learn more about Jamendo. Sign up and post messages in our forums. + + - Make a donation to the artist to support them. + + +Visit Jamendo and help us promote FREE music! + +Thanks again, we hope you enjoy listening to this album. + +--- +The Jamendo team. + + + +------------------- + + + +Merci d'avoir téléchargé cet album ! + +Sa diffusion gratuite et légale est assurée par jamendo : + +http://www.jamendo.com/ + +Sur ce site, vous pourrez, entre autres : + + - Déposer une critique sur cet album, et consulter les nombreuses critiques déjà présentes. + + - Obtenir plus d'informations sur l'artiste auteur de cet album. + + - Télécharger d'autres albums de qualité, complets et gratuits. + + - Vous informer sur la contribution de jamendo en faveur d'une musique gratuite et légale, et participer au forum de jamendo. + + - Rejoindre son fan-club pour être tenu au courant des prochains concerts, sorties d'albums, ... c'est en même temps un petit geste de soutien ! + + +Alors n'hésitez pas à nous rendre visite, pour apporter votre soutien à notre action et nous aider à prouver qu'une autre musique est possible, une musique libre ! + + +Merci, et bonne écoute ! + +--- +L'équipe de jamendo. + + + +------------------- + + + +Grazie per avere scaricato questo album! + +La sua distribuzione legale e veloce è fatta da jamendo: + +http://www.jamendo.com/ + +Tramite questo sito sarai in grado di: + + - scrivere una recensione su questo album e leggere le altre recensioni già scritte dagli altri membri della nostra comunità; + + - ottenere maggiori informazioni su questo album/artista; + + - scaricare altri album interi di qualità, gratuitamente; + + - saperne di più su jamendo, registrarti, inserire messaggi nei nostri forum. + + - fare una donazione a questo artista per supportare il suo album. + +Quindi visita liberamente jamendo e aiutaci a promuovere la musica libera! Grazie ancora! + +---- +Il team di jamendo. + + + +------------------- + + + +Gracias por descargar este álbum ! + +Su distribución gratis y legal es realizada por jamendo : + +http://www.jamendo.com/ + +En el sitio web, podrás : + + - Escribir tu opinión sobre este álbum, y checar todas las opiniones ya escritas por miembros de la comunidad jamendo. + + - Obtener mayor información sobre este artista/álbum. + + - Descargar otros álbumes de calidad, gratis. + + - Aprender más sobre jamendo, escribir un mensaje en los foros. + + - Hacer una donación a este artista para apoyarlo. + + +No dudes en visitar jamendo, y ayúdanos a promover música gratis y de buena calidad ! + +Gracias otra vez, que pases un buen rato oyendo este álbum ! + +--- +El equipo de jamendo. + + + +------------------- + + + +Vielen Dank für den Download dieses Albums! + +Die freie und legale Distribution wird von Jamendo gewährleistet: + +http://www.jamendo.com + +Auf dieser Webseite kannst du auch: + + - eine Rezension zu diesem Album schreiben und die zahlreichen anderen Rezensionen lesen. + + - mehr Informationen zu diesem Album und dem/den Künstler/n einsehen. + + - kostenlos weitere komplette Alben herunterladen. + + - mehr über Jamendo und dessen Unterstützung einer kostenlosen und legalen Verbreitung von Musik erfahren und an unseren Foren teilnehmen. + + - dem Fanclub des Künstlers beitreten, um Infos über Konzerte und neue Alben zu erhalten - und ihn damit auch zu unterstützen! + + +Besuche Jamendo jederzeit und unterstütze unsere Aktion: Denn wir suchen nach einer anderen Musik, nämlich freie Musik! + +Nochmals vielen Dank und viel Spaß beim Hören dieses Albums! + +--- +Das Jamendo-Team + + + +------------------- + + + +Dziękujemy za pobranie tego albumu! + +Jego darmowa i legalna dystrybucja odbywa się przez jamendo: + +http://www.jamendo.com/ + +Na stronie tej możesz: + + - Napisać opinię o tym albumie oraz sprawdzić opinie napisane już przez innych użytkowników. + + - Zdobyć więcej informacji o tym artyście/albumie. + + - Pobrać inne albumy w dobrej jakości, za darmo. + + - Dowiedzieć się więcej o jamendo, zarejestrować, wysyłać wiadomości na nasze fora. + + - Wpłacić pieniądze dla artysty, aby go wesprzeć. + +Nie wahaj się więc odwiedzić jamendo i pomóż nam promować wolną muzykę! + +Jeszcze raz dzięki, życzymy miłego czasu spędzonego przy słuchaniu albumu! + +--- +Zespół jamendo. + + + +------------------- + + + +Спасибо за скачивание этого альбома! +Это бесплатно, и он легально распространяется Jamendo: + +http://www.jamendo.com/ + + +На этом сайте вы сможете: +- Написать рецензию на этот альбом, и просмотреть все остальные рецензии, уже написанные членами нашего сообщества. +- Получить больше информации о данном исполнителе/альбоме. +- Скачать бесплатно другие качественные полные альбомы. +- Узнать больше о Jamendo, зарегистрироваться, оставлять сообщения на наших форумах. +- Сделать пожертвование этому исполнителю для его поддержки + +Поэтому, не стесняйтесь, заходите на Jamendo и помогайте нам нести в массы бесплатную музыку! + +Еще раз спасибо, желаем Вам отличного прослушивания этого альбома! + +-- +Команда Jamendo. + + + +------------------- + + + +Obrigado por baixar esta álbum! + +Sua distribuição gratuita e legal é assegurada pelo Jamendo: + +http://www.jamendo.com/ + +Sobre o site, você pode também: + + - Fazer críticas aos álbuns e consultas críticas já feitas. + + - Obter mais informações sobre o artista autor deste álbum. + + - Baixar outros álbuns de qualidade, completos e gratuitos. + + - Se informar sobre a contribuição do Jamendo em favor da música gratuita e legal, além de participar do fórum do Jamendo. + + - Participar de seu fã-club para ficar por dentro de seus shows, lançamento de álbuns, etc... E fazer doações ao artista! + + +Não deixe de nos fazer uma visita e ajudar a promover a música livre! + + +Obrigado, e boa música! + +--- +Equipe do Jamendo. + + + +------------------- + + + diff --git a/ac/[cover] Allison Crowe - Little Light (originals).jpg b/ac/[cover] Allison Crowe - Little Light (originals).jpg new file mode 100644 index 0000000..90091ae Binary files /dev/null and b/ac/[cover] Allison Crowe - Little Light (originals).jpg differ diff --git a/ac/allison crowe/01 - Northern Lights.mp3 b/ac/allison crowe/01 - Northern Lights.mp3 new file mode 100644 index 0000000..fc79340 Binary files /dev/null and b/ac/allison crowe/01 - Northern Lights.mp3 differ diff --git a/ac/allison crowe/02 - Angels.mp3 b/ac/allison crowe/02 - Angels.mp3 new file mode 100644 index 0000000..e1011b2 Binary files /dev/null and b/ac/allison crowe/02 - Angels.mp3 differ diff --git a/ac/allison crowe/03 - Disease (08 03 08).mp3 b/ac/allison crowe/03 - Disease (08 03 08).mp3 new file mode 100644 index 0000000..25886e2 Binary files /dev/null and b/ac/allison crowe/03 - Disease (08 03 08).mp3 differ diff --git a/ac/allison crowe/04 - Little Light.mp3 b/ac/allison crowe/04 - Little Light.mp3 new file mode 100644 index 0000000..2dd8cff Binary files /dev/null and b/ac/allison crowe/04 - Little Light.mp3 differ diff --git a/ac/allison crowe/05 - Happy People.mp3 b/ac/allison crowe/05 - Happy People.mp3 new file mode 100644 index 0000000..b379be5 Binary files /dev/null and b/ac/allison crowe/05 - Happy People.mp3 differ diff --git a/ac/allison crowe/06 - Hold Back.mp3 b/ac/allison crowe/06 - Hold Back.mp3 new file mode 100644 index 0000000..f3c0697 Binary files /dev/null and b/ac/allison crowe/06 - Hold Back.mp3 differ diff --git a/ac/allison crowe/07 - Choose to Be.mp3 b/ac/allison crowe/07 - Choose to Be.mp3 new file mode 100644 index 0000000..d9bd188 Binary files /dev/null and b/ac/allison crowe/07 - Choose to Be.mp3 differ diff --git a/ac/allison crowe/08 - Wedding Song.mp3 b/ac/allison crowe/08 - Wedding Song.mp3 new file mode 100644 index 0000000..017e2e0 Binary files /dev/null and b/ac/allison crowe/08 - Wedding Song.mp3 differ diff --git a/ac/allison crowe/License.txt b/ac/allison crowe/License.txt new file mode 100644 index 0000000..040e8da --- /dev/null +++ b/ac/allison crowe/License.txt @@ -0,0 +1,12 @@ + +Track | License URL +---------------------------------------------- + 01 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 02 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 03 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 04 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 05 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 06 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 07 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + 08 | http://creativecommons.org/licenses/by-nc-sa/3.0/ + artwork | http://creativecommons.org/licenses/by-nc-sa/3.0/ \ No newline at end of file diff --git a/ac/allison crowe/Readme - www.jamendo.com .txt b/ac/allison crowe/Readme - www.jamendo.com .txt new file mode 100644 index 0000000..8126e88 --- /dev/null +++ b/ac/allison crowe/Readme - www.jamendo.com .txt @@ -0,0 +1,254 @@ +This 'Readme' file is available below in: English, Français, Italiano, Español, Deutsch, Polski, Русский, Português. + + + + + +Thank you for downloading this album! + +It’s FREE and LEGAL distribution by Jamendo: + +http://www.jamendo.com/ + +On the website you'll be able to: + + - Write a review about the album and check out other reviews already written by members of our community. + + - Obtain more information about the artist and/or album. + + - Download other quality music for FREE. + + - Learn more about Jamendo. Sign up and post messages in our forums. + + - Make a donation to the artist to support them. + + +Visit Jamendo and help us promote FREE music! + +Thanks again, we hope you enjoy listening to this album. + +--- +The Jamendo team. + + + +------------------- + + + +Merci d'avoir téléchargé cet album ! + +Sa diffusion gratuite et légale est assurée par jamendo : + +http://www.jamendo.com/ + +Sur ce site, vous pourrez, entre autres : + + - Déposer une critique sur cet album, et consulter les nombreuses critiques déjà présentes. + + - Obtenir plus d'informations sur l'artiste auteur de cet album. + + - Télécharger d'autres albums de qualité, complets et gratuits. + + - Vous informer sur la contribution de jamendo en faveur d'une musique gratuite et légale, et participer au forum de jamendo. + + - Rejoindre son fan-club pour être tenu au courant des prochains concerts, sorties d'albums, ... c'est en même temps un petit geste de soutien ! + + +Alors n'hésitez pas à nous rendre visite, pour apporter votre soutien à notre action et nous aider à prouver qu'une autre musique est possible, une musique libre ! + + +Merci, et bonne écoute ! + +--- +L'équipe de jamendo. + + + +------------------- + + + +Grazie per avere scaricato questo album! + +La sua distribuzione legale e veloce è fatta da jamendo: + +http://www.jamendo.com/ + +Tramite questo sito sarai in grado di: + + - scrivere una recensione su questo album e leggere le altre recensioni già scritte dagli altri membri della nostra comunità; + + - ottenere maggiori informazioni su questo album/artista; + + - scaricare altri album interi di qualità, gratuitamente; + + - saperne di più su jamendo, registrarti, inserire messaggi nei nostri forum. + + - fare una donazione a questo artista per supportare il suo album. + +Quindi visita liberamente jamendo e aiutaci a promuovere la musica libera! Grazie ancora! + +---- +Il team di jamendo. + + + +------------------- + + + +Gracias por descargar este álbum ! + +Su distribución gratis y legal es realizada por jamendo : + +http://www.jamendo.com/ + +En el sitio web, podrás : + + - Escribir tu opinión sobre este álbum, y checar todas las opiniones ya escritas por miembros de la comunidad jamendo. + + - Obtener mayor información sobre este artista/álbum. + + - Descargar otros álbumes de calidad, gratis. + + - Aprender más sobre jamendo, escribir un mensaje en los foros. + + - Hacer una donación a este artista para apoyarlo. + + +No dudes en visitar jamendo, y ayúdanos a promover música gratis y de buena calidad ! + +Gracias otra vez, que pases un buen rato oyendo este álbum ! + +--- +El equipo de jamendo. + + + +------------------- + + + +Vielen Dank für den Download dieses Albums! + +Die freie und legale Distribution wird von Jamendo gewährleistet: + +http://www.jamendo.com + +Auf dieser Webseite kannst du auch: + + - eine Rezension zu diesem Album schreiben und die zahlreichen anderen Rezensionen lesen. + + - mehr Informationen zu diesem Album und dem/den Künstler/n einsehen. + + - kostenlos weitere komplette Alben herunterladen. + + - mehr über Jamendo und dessen Unterstützung einer kostenlosen und legalen Verbreitung von Musik erfahren und an unseren Foren teilnehmen. + + - dem Fanclub des Künstlers beitreten, um Infos über Konzerte und neue Alben zu erhalten - und ihn damit auch zu unterstützen! + + +Besuche Jamendo jederzeit und unterstütze unsere Aktion: Denn wir suchen nach einer anderen Musik, nämlich freie Musik! + +Nochmals vielen Dank und viel Spaß beim Hören dieses Albums! + +--- +Das Jamendo-Team + + + +------------------- + + + +Dziękujemy za pobranie tego albumu! + +Jego darmowa i legalna dystrybucja odbywa się przez jamendo: + +http://www.jamendo.com/ + +Na stronie tej możesz: + + - Napisać opinię o tym albumie oraz sprawdzić opinie napisane już przez innych użytkowników. + + - Zdobyć więcej informacji o tym artyście/albumie. + + - Pobrać inne albumy w dobrej jakości, za darmo. + + - Dowiedzieć się więcej o jamendo, zarejestrować, wysyłać wiadomości na nasze fora. + + - Wpłacić pieniądze dla artysty, aby go wesprzeć. + +Nie wahaj się więc odwiedzić jamendo i pomóż nam promować wolną muzykę! + +Jeszcze raz dzięki, życzymy miłego czasu spędzonego przy słuchaniu albumu! + +--- +Zespół jamendo. + + + +------------------- + + + +Спасибо за скачивание этого альбома! +Это бесплатно, и он легально распространяется Jamendo: + +http://www.jamendo.com/ + + +На этом сайте вы сможете: +- Написать рецензию на этот альбом, и просмотреть все остальные рецензии, уже написанные членами нашего сообщества. +- Получить больше информации о данном исполнителе/альбоме. +- Скачать бесплатно другие качественные полные альбомы. +- Узнать больше о Jamendo, зарегистрироваться, оставлять сообщения на наших форумах. +- Сделать пожертвование этому исполнителю для его поддержки + +Поэтому, не стесняйтесь, заходите на Jamendo и помогайте нам нести в массы бесплатную музыку! + +Еще раз спасибо, желаем Вам отличного прослушивания этого альбома! + +-- +Команда Jamendo. + + + +------------------- + + + +Obrigado por baixar esta álbum! + +Sua distribuição gratuita e legal é assegurada pelo Jamendo: + +http://www.jamendo.com/ + +Sobre o site, você pode também: + + - Fazer críticas aos álbuns e consultas críticas já feitas. + + - Obter mais informações sobre o artista autor deste álbum. + + - Baixar outros álbuns de qualidade, completos e gratuitos. + + - Se informar sobre a contribuição do Jamendo em favor da música gratuita e legal, além de participar do fórum do Jamendo. + + - Participar de seu fã-club para ficar por dentro de seus shows, lançamento de álbuns, etc... E fazer doações ao artista! + + +Não deixe de nos fazer uma visita e ajudar a promover a música livre! + + +Obrigado, e boa música! + +--- +Equipe do Jamendo. + + + +------------------- + + + diff --git a/ac/allison crowe/[cover] Allison Crowe - Little Light (originals).jpg b/ac/allison crowe/[cover] Allison Crowe - Little Light (originals).jpg new file mode 100644 index 0000000..90091ae Binary files /dev/null and b/ac/allison crowe/[cover] Allison Crowe - Little Light (originals).jpg differ diff --git a/media.erl b/media.erl index e69de29..13e84c3 100644 --- a/media.erl +++ b/media.erl @@ -0,0 +1,49 @@ +-module(media). +-export([init/0,insert/3, ask/2]). + +% Since we are not willing to calculate and deliver all the id3 tags everytime they are requested, +% we try to get something persistent with mnesia. +% Concerning the parsing of id3tags we use the library id3v2 by Brendon Hogger. For detailed information take a +% look at the header of the library. + +% What is an entry in our database made of? By the way the filepath includes the filename. + +-record(track, {artist, title, votes, locked, filepath }). + +% With which application do we play mp3s? + +player(path) -> + {ok, ["/usr/bin/env", "mplayer", "-quiet", path]}. + +% Before this module becomes usable, we must initialize it with the following steps: +% 1. Initialize the mnesiadatabase and create the table within it. +% 2. Parse the mp3s in the working directory and add them to the database +% 3. Get into a loop so the database can be actually queried and files can be played. + +init() -> + mnesia:create_schema([node()]), + mnesia:start(), + mnesia:create_table(track, [{attributes, record_info(fields, track)}]), + io:format("Initialisation of mnesia successful.\n"). + +% Basic insertion of entrys into the database. Some entries are left out because they are 0 or false. + +insert(Artist, Title, Filepath) -> + F = fun() -> + mnesia:write(#track{artist = Artist, title = Title, votes = 0, locked = false, filepath = Filepath}) + end, + mnesia:transaction(F). + +% We want to query in order to simplify the next calls. +ask(Artist, Title) -> + F = fun() -> + mnesia:match_object({track, Artist, Title, '_', '_', '_'}) + end, + {atomic, Results} = mnesia:transaction(F), + Results. + +% We want to play mp3s from our database. +play(Artist, Title) -> io:format("blub"). + + + -- cgit v1.2.3