You are not logged in.
Im not sure, but doesn't calling sh, run the script in sh compatible mode, instead of in normal bash.
I may have read this somewhere, or, I may have dreamed it knowing me, so please don't take it as fact
Offline
Hi !
I made this modification, plus:
83: # play album via moc
84: mocp -c; mocp -a `w3m -no-cookie -dump \`w3m -no-cookie -dump http://www.jamendo.com/get/album/name/t … in/${tag// /+}/?n=$n | sed -n "$number"p\``; mocp -p; mocp;
It works.
I not programmer, but is possible join finderflu script with moc console ?
Maurício
Offline
Just would like to say thank you, finferflu, for the script and - introducing me to jamendo
Best wishes from very grateful,
tami
"Possession means worries and luggage bags one has to drag along." Little My
Offline
Ah sorry, I didn't get notified about those new posts... odd...
@ Mauriicio
I'm sorry, but I don't know moc enough to answer your question. So, from what I understand, you would like to make my script part of moc?
@ tami
Thanks for your feedback, I appreciate that
And enjoy the music!
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Hi finferflu
Not sure if you are going to carry on devloping this app anymore if it's a one off, but I have a little feature request for future scipts if you do. To be able to bookmark favorite albums and store them in ~/.jam for easy retrieval in the future. What are your thoughts?
Thanks
Offline
Yeah sure!
I'm planning to write a ncurses player, but I might add some features in the bash script if I find time. Currently I'm quite busy with university, so I think I'll be more active in a few months. But I'm very open for suggestions and feature requests
Actually Jamendo allows you to save albums, if you create an account. The Jamendo team is in the process of releasing a new API, so I'll see if I can do it that way. Otherwise I'll ask it as a feature
I also plan to have the option of downloading the albums straight away, but that's when I think a ncurses interface is more appropriate.
I'm learning C at the moment, in the spare time, and I will do my best to make a nice and nifty player. And while I'm at it, I might turn it into an MPD client (we only have ncmpc in the CLI).
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Sounds great. Looking really forward to seeing it. Was going to suggest a download feature but didn't want to push my luck
I have never looked for another cli mpd client, probably because ncmpc works so great. Allthough I would obviously use a client within your Jamendo interface to kill 2 birds with one stone
Keep up the good work
Last edited by gazj (2008-02-07 22:51:40)
Offline
works great, thank you.
Offline
@ gazj
It's just too bad I can't start working on it right now. I have to desist, literally. The world of programming is really fascinating.
I also think ncmpc is great. I love the simplicity. I will try to do something similar for the Jamendo player (even though I'm secretly planning to add the possibility to display the album covers, using the w3m image viewer, you know I pick albums also by looking at the cover, so I find it almost essential).
@ koch
Thanks
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Great script
Just two little things :
- The last line (to remove the file) is never executed : you should replace the "exit" in the infinite loop by "break".
- When choosing tag rocknroll, then the 7th album (The Neo Tabou Project : Decyphered days / Apocalypse in a room, http://www.jamendo.com/fr/album/780 ), my whole mpd music library is added to the playlist. I don't know what the problem is because it works fine for all others albums i tried.
Thank you very much for this script. It makes it really easier to listen to different albums quickly
Offline
Thanks for your tips, that's the kind of help I'm always looking for
I'll be honest, and admit that someone has already pointed out to me that the last line is never executed, but I didn't have time to get around that and fix it.
As for the the album that gives you problems, I guess there's something wrong with the API. However the Jamendo team is developing a new one, and I'm planning to use that in the future.
I'll be finally free in June, and I'm planning to start working on a new version of the CLI browser straight away
Thanks for your feedback
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
why not learning python first and writing the player using that and pygtk, you can create a final product much quicker than in C.
Offline
Because I'm not planning to use Gtk. I want to write a ncurses player, and ncurses code is very similar to C. Does is sound reasonable? I'm a complete beginner here.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Yeah sorry, the previous domain was moved, so I have updated the link on my first post
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
@finerflu: thank you, im really enjoying your script!
You are thinking about writing this with ncurses? I just thought about how crazy i would go if such a thing would be implemented in ncmpcpp, what about that?!
Offline
Well, I'm not a real coder yet, I'm still finding my way through learning C, so I'm not sure how able I could be. I have surely considered creating a sort of MPD client integrated into my Jamendo player. We'll see what I will be able to come up with...
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
I would use case instead of ifs:
# exit with q and enter
if [ "$tag" = "" ]; then
exit
else
if [ "$tag" = "q" ]; then
exit
fi
fi
# if the user types "t", then display the list of the 100 most popular tags
if [ "$tag" = "t" ]; then
case $tag in
""|q) exit ;;
t) do_top_tags ;;
*) Default_case ;;
esac
Last edited by Daenyth (2008-11-20 18:34:02)
[git] | [AURpkgs] | [arch-games]
Offline
Thanks Daenyth, I will update the script as soon as I can... as you can surely notice, this is one of the first scripts I have written.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Also you should put your color escape codes into variables so you can do echo -e "${RED}redtext${NO_COLOR}". This also makes it very simple to disable color for those who don't want it.
[git] | [AURpkgs] | [arch-games]
Offline
That's a good idea, but I don't seem to be able to use those variables, for example:
NO_COLOR="\033[m"
BLUE="\E[1;34;m"
echo -e "${BLUE} Welcome to the Jamendo CLI Tag Browser${NO_COLOR}"
returns a plain uncolored text. Am I missing something?
EDIT: Nevermind, stupid typo
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Alright, I have updated the script, now it should look tidier and much clearer than before
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Hi, looks like your link does not work anymore... Could you fix it please, I am very interested in your project!
Offline
Hi, sorry for the inconvenience. I have recently switched server, and I forgot to update the link: here you go and hope you enjoy it
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline