[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
[AUDIO] lastfm script (bookmarks, auto-login, etc.)
02-25-2009, 09:03 PM
Post: #46
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Script works fine for me Smile many tnx!

but there is just one problem....

I put the hole thing in the folder Music/Last.fm
Changed the CACHE path in the config.txt to: CACHE_DIR='/share/Music/Last.fm/lastfm-cli-cache'
Edited the .html for the url to: http://localhost.drives:8883/HARD_DISK/M...?bookmarks
I added a link in the web services page to: http://localhost.drives:8883/HARD_DISK/M...marks.html
This is the link I use to start the html and cgi etc..
Works fine, but when I stop using it and want to start it again the error appears and have to reboot the popcorn...

anyone?
Find all posts by this user
02-25-2009, 09:56 PM
Post: #47
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
(02-25-2009 09:03 PM)Boui Wrote:  Script works fine for me Smile many tnx!

but there is just one problem....

I put the hole thing in the folder Music/Last.fm
Changed the CACHE path in the config.txt to: CACHE_DIR='/share/Music/Last.fm/lastfm-cli-cache'
Edited the .html for the url to: http://localhost.drives:8883/HARD_DISK/M...?bookmarks
I added a link in the web services page to: http://localhost.drives:8883/HARD_DISK/M...marks.html
This is the link I use to start the html and cgi etc..
Works fine, but when I stop using it and want to start it again the error appears and have to reboot the popcorn...

anyone?

There is a bug in the script -- you cannot play anything anymore after playing a last.fm station. I've solved it already and will post a new version after some testing (but so far everything seems to work fine).
Find all posts by this user
02-26-2009, 11:09 AM
Post: #48
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
I'm looking forward to it. Smile
Find all posts by this user
02-27-2009, 02:47 PM
Post: #49
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Can i use this to scrobble my music on the local NMT system to the last.fm site?
or is there a way to get such a script?
Find all posts by this user
03-01-2009, 01:50 AM (This post was last modified: 03-01-2009 11:43 AM by tonne.)
Post: #50
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Hi,
when I use this app, the songs are downloaded to the cache dir but they are not played.

Code:
/opt/sybhttpd/localhost.drives/HARD_DISK/Music/lastfm-cli-cache # ls -l
-rw-r--r--    1 root     root      2861347 Mar  1 01:38 18e27ba6fbc84b0a0232d68f3b11.mp3
-rw-r--r--    1 root     root      4693752 Mar  1 01:46 9c1b54649fab45a02481426c760f.mp3
-rw-r--r--    1 root     root            0 Mar  1 01:42 9c1b54649fab45a02481426c760f.mp3.inprog
-rw-r--r--    1 root     root      3189445 Mar  1 01:42 9f6b10fe3f990bd2598973eb77bf.mp3
-rw-r--r--    1 root     root        13962 Mar  1 01:42 lastfm-cli-log
[solved]
The pch screen is shown for a short time, then the message "Could not play" appears.
Any hints to figure out the problem?
[/solved]

Solution:
A command in last-cli.cgi is pointed to php5-cgi, but php5-cgi, that seems to be located in
Code:
/mnt/syb8634/server/
did not exist, so I did
Code:
cd /mnt/syb8634/server
ln -s php php5-cgi
Big Grin

tonne
~~~~~~~~~~~
Popcornhour A100
dbox2
Find all posts by this user
03-01-2009, 03:40 PM (This post was last modified: 03-01-2009 03:42 PM by wickedgame76.)
Post: #51
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Really cool this script is working again a little. I'm doing something stupid somehow; I've ftped everything to my PCH, have setted the specific attributes. But when displaying the lastfm bookmark file displays the contents of the cgi file on my tv. What do i do wrong?

And another question: http://<ip pch>:8883/HARD_DISK/lastfm-bookmarks.html gives me a 404 page not found. Am i looking at the wrong location?
Find all posts by this user
03-01-2009, 08:49 PM
Post: #52
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Version 0.2.1 is now available -- see the first post. Anyone willing to make some nice CSS style for that?
Find all posts by this user
[+] 2 users say Thank You to mk11 for this post
03-01-2009, 10:30 PM
Post: #53
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
(03-01-2009 08:49 PM)mk11 Wrote:  Version 0.2.1 is now available -- see the first post. Anyone willing to make some nice CSS style for that?

Hi mk11,
works fine, thank you.Smile

A little bit "off topic":
Usually I'm using mpd as my favorite player on Ubuntu.
This script (mcf) worked fine for playing lastfm stations but a few weeks ago it stopped working. I think lastfm did some changes.

I've read in this thread that your script stopped working too a few weeks ago, so I hope you can help.

Some info:
Code:
mympd:/tmp# ./mcf a sting
Setting up a session with last.fm...
Requesting stream from last.fm...
Station found: Sting Radio
volume:100% repeat: off random: off

It seems to work, but nothing happens.

mpd / mpc shows this stream url, but mpd does not play:
Code:
http://195.24.233.49:80/last.mp3?Session=003c30787fb63c36fe1688d46f4988

mpd error log
Code:
Input does not appear to be a mp3 bit stream.
Input does not appear to be a mp3 bit stream.
Input does not appear to be a mp3 bit stream.

tonne
~~~~~~~~~~~
Popcornhour A100
dbox2
Find all posts by this user
03-01-2009, 10:53 PM
Post: #54
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
@tonne: indeed, there was some change in the last.fm protocol. If you want to use mpd, you can either (1) modify the mcf script (you can see my script for reference -- the protocol is pretty simple and most of the "hacks" that are there are because of the bugs in "mono", the NMT media player), or (2) feed the playlists generated by my script to mpd (if you run the script from the command-line, with a station name as an argument, then it will output a list of links for the next few songs to play -- take the string up to the first '>' and then the stream url of a given song is http://play.last.fm/user/{the string}.mp3).
Find all posts by this user
03-02-2009, 12:18 AM (This post was last modified: 03-02-2009 07:18 AM by tonne.)
Post: #55
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Hi mk11,
thank you for your quick answer.
I tried to figure out what went wrong with the mcf script and followed this guide.
But the returned stream url from last.fm doesn't play any music.Angry
In fact I think the mcf script does exactly what the guide describes.
I hope to get the mcf script working again because it is a slim possibility to play last.fm stations and I don't want to use LastfmProxy.
What are the changes in the last.fm protocol?
Unfortunately I'm not very familiar with shell or cgi programming.
Please can you tell me what the important sections are (in your script) in relation to the mcf script?

tonne
~~~~~~~~~~~
Popcornhour A100
dbox2
Find all posts by this user
03-02-2009, 10:10 AM
Post: #56
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
(03-02-2009 12:18 AM)tonne Wrote:  Hi mk11,
thank you for your quick answer.
I tried to figure out what went wrong with the mcf script and followed this guide.
But the returned stream url from last.fm doesn't play any music.Angry
In fact I think the mcf script does exactly what the guide describes.
I hope to get the mcf script working again because it is a slim possibility to play last.fm stations and I don't want to use LastfmProxy.
What are the changes in the last.fm protocol?
Unfortunately I'm not very familiar with shell or cgi programming.
Please can you tell me what the important sections are (in your script) in relation to the mcf script?

If you skip the parts of the script written in awk and php, then the rest is very short and describes the protocol pretty well. Otherwise, you can still use the script as it is and feed its output directly to mpd -- you just have to parse the output of the script run from the command-line, e.g., "lastfm-cli.cgi globaltags/jazz" (see my previous post).
Find all posts by this user
03-02-2009, 01:01 PM
Post: #57
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Quote:Anyone willing to make some nice CSS style for that?

willing, yes, but it don't work like it shouldSad
Find all posts by this user
03-02-2009, 01:06 PM
Post: #58
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
(03-02-2009 01:01 PM)meowmoo Wrote:  willing, yes, but it don't work like it shouldSad

what's the problem?
Find all posts by this user
03-02-2009, 01:23 PM
Post: #59
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
if I add something to the config.txt nothing happend, when I reload the html,

I know very little about css, so I try somthin easy like
background-color: #3366FF

but nothing change Blush
Find all posts by this user
03-02-2009, 09:14 PM (This post was last modified: 03-02-2009 09:16 PM by wickedgame76.)
Post: #60
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Hmm. Can anyone explain why i just see the source code of the cgi file on my tv? (if you help me out i can do some css styling ;-)
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Pure Web Remote Control or Listening Audio with switched off TV pompon 165 66,829 03-27-2013 08:05 PM
Last Post: luciano63
  Bierdopje auto-sub for A-110 BeeVee 13 2,799 02-06-2013 09:15 PM
Last Post: Gsxie
Star [Apps] Bierdopje 4 NMT PHP script SilverViper 4 1,326 11-26-2012 04:57 PM
Last Post: Djiest
  Audio App to play lists or whole directories? danielfm 1 917 01-24-2012 12:55 AM
Last Post: geerten
  PCH Audio playlist format? Nono 4 1,742 10-05-2011 10:10 PM
Last Post: Nono
  Need help debugging a simple script to enable NTFS write on HDD user33 10 3,193 04-05-2011 06:05 PM
Last Post: nuke12
  Help with Server Timeout Error running a script hindibuff 0 1,681 03-29-2011 06:21 AM
Last Post: hindibuff
Bug Executing a script on the server from the NMT? johnk 6 3,210 02-21-2011 10:59 PM
Last Post: johnk
  Stream movie audio over network Irri 0 1,454 11-06-2010 11:52 AM
Last Post: Irri
  help with auto unrar script. kiranos 0 1,772 05-15-2010 10:24 AM
Last Post: kiranos

Forum Jump: