Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: My wsh panel code (Read 55119 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

My wsh panel code

Reply #25
Panels pack lastfm_me_pak.zip updated. Changes:
2010-11-22:
. Wget works with path with non-ASCII now.

My wsh panel code

Reply #26
can't use relative path eh, well, take your time, I'm pretty happy with your current script D:

umm, about your new updates, i didnt really get what it means cause i have a folder like this -> "R:\lastfm_info\霜月はるか" from your script (edited it so it use $replace(%artist%,\,,/,,:,,*,,?,,<,,>,,|,,) instead of $crc32(%artist%), just pray that no artist will use " on their names XD) so maybe if i didnt really need it i'll skip this update lol
and the readme said that issue won't be fixed XD

here's my current setup, using albumart, lastfm_artistart, lastfm_bio and some formatting for esplylist from you, playcount sync, aero seekbar, playback button, weblinks and thumbs from marc2003
also, thanks T.P Wang XD

My wsh panel code

Reply #27
Well, it won't be fixed because I haven't found a way before and I decided that not many ppl will have the problem as the cache path was hardcoded. But now that path is not hardcoded and I found a way to fix it so I did.

About your example, I think these japanese character worked for you is because your system codepage is japanese, otherwise it wouldn't. But now, with the fix we won't have this problem anymore. Also, tonight I will release another update (at work now), this might be the final version of my script for a while, some final cleanup and decrease some unnecessary lastfm query.

My wsh panel code

Reply #28
Panel code lastfm_me_pak.zip updated. Changes:
2010-11-23:
. Some code cleanup
. Do not query last.fm for artist image anymore if artist.getinfo xml response (biography response) does not contain an artist picture.

Download in first post.

My wsh panel code

Reply #29
I messed up, if anyone wasn't able to download artist art, please change wget settings (Right click Bio panel -> Artist art options -> Wget settings) and remove the last line or change it to your proxy server url. I updated the pack so users who download it later won't have to do that anymore.

My wsh panel code

Reply #30
it seems i have another question lol


how did you make grouping title like that?
I tried %album%$clrf()%artist% and it didnt work >.<

My wsh panel code

Reply #31
lastfm_me_pak.zip updated. User who is using theme.zip, please update your panels, too. Instruction inside the archive.

Changes:
2010-11-28:
. Some code cleanup
. Stop forward.png and back.png to be loaded multiple times
. Use INI file to store settings, user need to reenter their settings
. scripts/input.wsf is replaced by scripts/input.vbs. Old file is unnecessary, please delete it
. Small change to support relative path without trailing slash
. Fix crash when user scrolls the bio panel when playback stop

Download in first post.

My wsh panel code

Reply #32
lastfm_me_pak.zip updated. User who is using theme.zip, please update your panels, too. Instruction inside the archive.

Changes:
2010-11-28.0:
. Fix drag scroll crash when playback stop
. Some code cleanup
. No more new object created on on_paint function for all panels
. Add scroll hint for biography and lyrics panels
. Top tracks and recent tracks lastfm panels are updated to work again

Download in first post.

My wsh panel code

Reply #33
Quick question, am I correct in thinking I need a last.fm api key if I want to utilise this code?

My wsh panel code

Reply #34
Yes, you'll need one. It's easy to get though, considering you're already has an lastfm account. I only started using lastfm recently and had to register for both.

My wsh panel code

Reply #35
lastfm_me_pak.zip updated. User who is using theme.zip, please update your panels, too. Instruction inside the archive.

Changes:
2010-11-29:
. Migrate marc2003 lastfm charts panel into my config (depends on lastfm_bio panel for lastfm query, offline support...), this panel superceded lastfm_usertoptracks panel
. User lastfm recent tracks panel's updated, move lastfm query into lastfm_bio panel, offline mode, rework behavior and move code from lastfm_user_common.js back into the panel. lastfm_user_common.js is redundant now, please remove it.
. Some small fixes

The new panel:


Download in first post.

As of now, I consider these wsh panels has reached the purpose of replacing biography panel lastfm mode (my original purpose of doing this), from functionality stand point, with better speed and it should be very stable now. I will continue to fix bugs (don't think that's many left) if there's any. Love, unlove and similar features of lastfm are technically possible and might get implemented sometime in the future, if I feel like it.

EDIT: lastfm charts and recent tracks panels should be loaded after lastfm_bio panel, in some instances panels are loaded in this order by default otherwise please enable Delay Load in lastfm charts and recent tracks panels.

My wsh panel code

Reply #36
Playing around, this is extremely good work.  What would be quite cool is panel that grabs the user info/picture. Just a suggestion if you get bored.  Again, really good work on the code.

My wsh panel code

Reply #37
What would be quite cool is panel that grabs the user info/picture.

What did you mean by this? Is it this this one http://www.last.fm/api/show?service=344 ? If so where do you suggest I should put it? If it is sensible, I might include this feature sometime in the future.

BTW my code is pretty much a fork of marc2003's samples. I ripped off his design and put my code in as back-end. I'm only good at code grunt .

My wsh panel code

Reply #38
The new panel:

hmmm, how to change maximum chart entries to display? i mean, in your example it goes until 15 while mine only 5, and it seems you can't right click on the panel too (i just recently know you left click last.fm button for menu lol, i thought it was meant to open the chart page)

EDIT: lastfm charts and recent tracks panels should be loaded after lastfm_bio panel, in some instances panels are loaded in this order by default otherwise please enable Delay Load in lastfm charts and recent tracks panels.

ahaha, i spent 2 hours fiddling with those panel until i remember to tick delay load lol, it always show "overall artist charts for [insert last.fm API here]" and not my username, eventhough the bio panel working fine lol

My wsh panel code

Reply #39
hmmm, how to change maximum chart entries to display? i mean, in your example it goes until 15 while mine only 5, and it seems you can't right click on the panel too (i just recently know you left click last.fm button for menu lol, i thought it was meant to open the chart page)

I copied marc2003's panel behavior. As for number of entries, this panel shows the maximum it can by panel height so if your panel is longer there'll be more.

My wsh panel code

Reply #40
ah so that's why
thanks for the answer D:

My wsh panel code

Reply #41
lastfm_me_pak.zip updated. User who is using theme.zip, please update your panels, too. Instruction inside the archive.

Changes:
2010-12-01:
. Mimimizing file handle usage
. Work around wsh panel mod utils.Glob() function file handle leak problem (wrote my own function)

Download in first post.

My wsh panel code

Reply #42
lastfm_me_pak.zip updated. User who is using theme.zip, please update your panels, too. Instruction inside the archive.

Changes:
2010-12-05:
. Entering lastfm account information should update lastfm charts and recent tracks now
. Artist art panel: cache resized thumbnails and images for better performance
. Artist art panel: Stop artist art cycle when user access context menu
. Switch to DrawText function to draw visually better text
. Code refractoring to accomondate above changes
. lastfm charts chart style changed a little

Download in first post.

My wsh panel code

Reply #43
I'm pleased to announce lastfm love/unlove track is supported now. As lastfm authentication is available now, other lastfm write services can be implemented as well if I find them useful. For now, I only find love/unlove is. Following is a picture of my config.

First time you use that love/unlove button, my panel will ask you to authenticate and allow my code to access your lastfm account. If you need more information please read this document.

lastfm_me_pak.zip updated. User who is using theme.zip, please update your panels, too. Instruction inside the archive.

Changes:
2010-12-07:
. Added md5 hash and utf8 encode functions (copied from somewhere) to support lastfm authentication
. Album art panel is obsolete. Playing track info is moved to a new panel called lastfm_playingtrackinfo
. Love and unlove playing track button in lastfm_playingtrackinfo
. Code optimization in artist art panel
. Implement additional lastfm web service queries in lastfm_bio panel to authenticate user and love/unlove track
. Remove image dependencies
. Change lastfm_charts panel right click behavior to be the same as other panels, how tooltip appears and where user can click to access lastfm artist page
. Modify title parts of all lastfm related panels, replace lastfm button with clickable title

Download in first post.

My wsh panel code

Reply #44
WOW nice update!
thanks as always thuan D:

My wsh panel code

Reply #45
can't edit so here it is...

i got an error whenever i tried to set my secret
Code: [Select]
Error: WSH Panel Mod (Biography, Last.fm main panel): Microsoft JScript runtime error:
'lfm_secret' is undefined
Ln: 765, Col: 9
<source text only available in compile time>

what did i do wrong here?

My wsh panel code

Reply #46
Sorry, it's my fault, change line number 765 to:
Code: [Select]
lfm_secret = text_input_box("Simple Biography", "Please enter your Last.fm secret\n\nhttp://www.last.fm/api/account", "default", "secret", utils.ReadINI(inifile, "default", "secret", ""));


I also found another misbehavior, when user love a track he/she loved the track with title and artist information from tag, but unofficial audioscrobbler auto correct tag when submitting track, ergo when playing this track again it will show up as not loved. I fixed this in my current code, but will update later when I can add another feature that I want to implement.

My wsh panel code

Reply #47
wow SO FAST o.O
ok now it works, thank you
will wait eagerly for new update XD

My wsh panel code

Reply #48
lastfm_me_pak.zip updated. User who is using theme.zip, please update your panels, too. Instruction inside the archive.

Changes:
2010-12-08:
. Fix bug causing user unable to enter lastfm secret
. Love/unlove a track with artist and track information from lastfm instead from tags when possible, thus working in line with autocorrected scrobbling
. Similar artist names in lastfm_bio panel are now clickable link
. Change love/unlove heart colors

Download in first post.

My wsh panel code

Reply #49
thank you for fast updates ^^

Quote
. Similar artist names in lastfm_bio panel are now clickable link

i can't clink it though ?_?