User(s) browsing this thread: 1 Guest(s)
[AUDIO] lastfm script (bookmarks, auto-login, etc.)
|
|
01-16-2009, 10:16 PM
(This post was last modified: 03-01-2009 08:47 PM by mk11.)
|
|||
|
|||
|
[AUDIO] lastfm script (bookmarks, auto-login, etc.)
EDIT: Version 0.2.1 is now available. It has some bug fixes and some new (small) features. Download it from here: http://www.mediafire.com/?k41egfgg10d and follow the instructions for version 0.2 (below).
EDIT: Here comes a new version that works now, and also has some more features. It's still not completely finished, but it's already in a usable state (see below for limitations). The instructions are slightly different now -- I leave the original post just for reference. New instructions: 1. Download the .zip archive from http://www.mediafire.com/?nrnnuenexyy and unpack it to your NMT hard drive (e.g., the top directory). 2. Make files lastfm-cli.cgi and lastfm-downloader.sh executable (see in this thread for instructions on how to do it). 3. Edit the configuration file lastfm-cli-config.txt: you must enter there your last.fm user name and an MD5 hash of your password (use, e.g., http://www.fileformat.info/tool/hash.htm to compute the MD5 hash). You should also put there your last.fm bookmarks (3 of them are already there, but they are just an example). If you know CSS, you can also change the look of the pages generated by the script (I'm looking forward to some nice themes on this thread). 4. If you installed the files in the top directory of your NMT hard drive, skip to step 5. Otherwise, you have to edit file lastfm-bookmarks.html and put the correct path there. 5. The first time you select file lastfm-bookmarks.html nothing will show up until you press "stop" on your remote (but wait a few seconds before doing so -- the script must start some background services). Quick manual: select a bookmark and then either choose one song to play (rather impractical -- see the limitations) or select "Play station". "Next" gets a new playlist. Note: the script stores a lot of data in the folder set in the configuration file (Music/lastfm-cli-cache by default). Click on "Clear cache" to delete all the files from this directory (you should probably do it once in a while). Current limitations: 1. It takes a long time before playback starts. 2. If you stop playback in the middle of a song, it might be impossible to play anything else for some time. 3. The installation procedure is long -- an installer would be nice. 4. The script downloads the songs to the cache directory, so there might be some legal issues in some countries. (I take no responsibility for any problems you might encounter.) Old contents of this post follows. --------------------------------------------- Here is a script that I wrote and find more convenient to use for listening to last.fm than the MSP portal. I'd say it's not exactly for total beginners, but if you know how to use FTP and write simple web pages, you should be fine using it. Standard disclaimer applies: the code is public domain but I take no responsibility if it doesn't work or breaks something in your system. Here are the instructions: 1. Create a file "lastfm-cli.cgi" and copy the following code into it: Code: #!/bin/sh2. Change in this file "lastfm-username" to your lastfm username, and "md5sum-of-lastfm-password" to the md5 hash of your lastfm password (you can use, e.g., http://www.fileformat.info/tool/hash.htm to compute the md5 hash). 3. Copy the file "lastfm-cli.cgi" to your Popcorn Hour: either to the hard drive (e.g., via FTP) or to a USB pendrive. Make sure the file is executable, e.g., using FTP: Code: site chmod 755 lastfm-cli.cgi4. Create a HTML file with your lastfm bookmarks. Here is an example (this assumes you put "lastfm-cli.cgi" in the root directory of the hard drive): Code: <html><body><h1>Last.fm bookmarks:</h1>You get the point. For USB pendrive you have to replace "HARD_DISK" with "USB_DRIVE_A" or "USB_DRIVE_B". 5. Open the HTML file (as a playlist) on your Popcorn, choose the bookmark, select PLAY, and enjoy! A note for advanced users: the script also works directly in the command-line. It then outputs an URL that you can pass directly to mono for playback. |
|||
1 user says Thank You to mk11 for this post |
|
01-17-2009, 12:13 AM
(This post was last modified: 01-17-2009 12:16 AM by empatico.)
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
I will try because i need an user-friendly way to listen lastfm for my parents. Could you provide some URLs for playing genres, tags or users radios?
|
|||
|
01-17-2009, 08:52 PM
|
|||
|
|||
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
(01-17-2009 12:13 AM)empatico Wrote: I will try because i need an user-friendly way to listen lastfm for my parents. Could you provide some URLs for playing genres, tags or users radios? Global tags: globaltags/jazz Library: user/user-name/personal Loved: user/user-name/loved Neighbours: user/user-name/neighbours Recommendations: user/user-name/recommended In general: if you set in your lastfm profile settings "use external player" (or something like that), then the links to radio stations become in the form of "lastfm://some/station" -- then you use "some/station" in the script. |
|||
|
01-18-2009, 01:57 PM
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Thank you for your great job. It works perfectly and easy for my parents.
|
|||
|
01-18-2009, 09:38 PM
|
|||
|
|||
| RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.) | |||
|
01-18-2009, 09:42 PM
|
|||
|
|||
| RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.) | |||
|
01-19-2009, 05:04 AM
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Thank you, that worked. What do you put in the html file to make it play your radio station?
|
|||
|
01-19-2009, 01:14 PM
(This post was last modified: 01-19-2009 01:20 PM by empatico.)
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
My own lastfm.htm file:
http://www.uar.jazztel.es/Documentos/lastfm.htm Edit it with your own users, genres and artists. Also edit the path to your own file lastfm-cli.cgi |
|||
|
01-19-2009, 03:22 PM
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Excellent. I put mine on a share and named it index.htm, so that when I click on the share it launches. I will be copying your file. Thank you very much.
|
|||
|
01-19-2009, 04:30 PM
(This post was last modified: 01-19-2009 04:31 PM by ricocarlos.)
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Now you guys need to get a cgi for Pandora...do that and you shall rule the world.
|
|||
|
01-20-2009, 04:59 AM
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
thanks again, empatico, I modified your file added a kickin background to it, and it is so freakin sweet. Now, is there a way to get it to play once you select an option, rather than selecting it and then having to tell it to play?
And is there any way possible to get album art to display?? I actually feel guilty asking for more from this near perfect app. This totally makes the PCH such a more powerful device. |
|||
|
01-20-2009, 02:41 PM
(This post was last modified: 01-20-2009 02:43 PM by empatico.)
|
|||
|
|||
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
(01-20-2009 04:59 AM)ricocarlos Wrote: Now, is there a way to get it to play once you select an option, rather than selecting it and then having to tell it to play? The only way to do that it's editing the lastfm-cli.cgi script. I have no cgi skills, maybe mk11 can help you with that. (01-20-2009 04:59 AM)ricocarlos Wrote: And is there any way possible to get album art to display?? Same here, it need lastfm-cli.cgi script changes. Also i prefer shutdown my television and listen the music with my hifi because having a fixed image during long time could hang the television. (01-20-2009 04:59 AM)ricocarlos Wrote: I actually feel guilty asking for more from this near perfect app. This totally makes the PCH such a more powerful device. You can try the http://nmt.kowalczuk.eu/last.fm/ msp plug in. It is more powerful than lastfm-cli.cgi script. I prefer lastfm-cli.cgi script because it's just what my parents and i need. keep it simple! ![]() mk11 really did a good job and he deserves our thanks. |
|||
|
01-20-2009, 03:09 PM
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
Rock on, mk11, you did a yeoman's job here.
|
|||
|
01-22-2009, 02:26 AM
(This post was last modified: 01-22-2009 02:26 AM by meowmoo.)
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
I cant get it to work :/
i copy the lastfm-cli.cgi and the lastfm.htm via samba to the popcorn and when i start an bookmark from the htm the error screen come ![]() lastfm-cli.cgi is in the ROOT and the htm looks like this Code: http://localhost.drives:8883/HARD_DISK/lastfm-cli.cgi?user/emtee_elp/personaldo i miss something? |
|||
|
01-22-2009, 04:18 PM
|
|||
|
|||
|
RE: [AUDIO] lastfm script (bookmarks, auto-login, etc.)
I am giving up
![]() It wont start the .cgi no matter where it is usb/root/newfolder in root.... |
|||
|
« Next Oldest | Next Newest »
|

Twitter
Facebook
NMT Wiki
Search
Member List
Help
A-400 [13 May 2013]

[AUDIO] lastfm script (bookmarks, auto-login, etc.)



![[+]](images/collapse_collapsed.gif)





