Comments (7)
Hey Michael,
Thanks for the suggestion! I've got a few open source contributions I need to test before pushing out an update, I'll be sure this change gets in there.
Charles
On Aug 17, 2012, at 9:19 PM, Michael Mahemoff [email protected] wrote:
Hi, I'm the creator of Player FM, which a Scroblr contributor recently patched in support for. The way my player works is it's always present, but invisible, so Scroblr is sending an empty track on startup, and I suspect this may happen with other audio apps. My suggestion is to update pollSongInfo where it checks if it should send an update:
if (currentsong.name != song.name || currentsong.artist != song.artist)
I would suggest adding a check that $.trim(currentsong.name) isn't empty here. Alternatively, you may wish to default song name and artists to be '' (empty string) instead of 'undefined', though I think the aforementioned check is probably more robust (in case a value includes space characters for some reason).โ
Reply to this email directly or view it on GitHub.
from scroblr.
Looking into this a little further, pollSongInfo uses the following selector to grab the artist:
artist = $('.permaplayer .meta .track-wrapper .title :first-child').text();
If you enter that in the console on the Player.fm homepage without playing a track, it returns the character "ยป". Furthermore , if you inspect the request that get's sent to Last.fm you'll notice those characters showing up as the track name / artist. I guess for some reason it's picking up the title/source seperator (ยป) as the first-child when the anchor tag is empty. I think the workaround would be to check first if the player was visible or perhaps if the title/source had a length greater than 1, otherwise return empty strings.
from scroblr.
I see. Actually it might be due to some update I made, but I think it's probably selecting too much.
Would you mind trying this:
artist: $('.permaplayer .meta .track-wrapper .current-series-link').text(),
name: $('.permaplayer .meta .track-wrapper .current-episode-link').text(),
for the Player FM entry? Combined with the check for zero-length string, it should work.
(I'd try myself, but I haven't set up the project for development. If this quick fix doesn't work, I'll set it up and work it out.)
from scroblr.
Hey, that's pretty much exactly what I did, then I noticed your reply :)
from scroblr.
Excellent, does that mean it worked? :)
from scroblr.
Yea, it seems to be working so far. I'd like to test it some more over the weekend and hopefully push out all these fixes on Sunday. Thanks for your help!
from scroblr.
Great, thanks for your help too. Looking forward to the update!
from scroblr.
Related Issues (20)
- NPR support
- Fix vk.com support (new.vk.com)
- Amazon Music scrobbling broken
- Does not scrobble from Youtube Playlist HOT 1
- Plug.dj Support
- Deezer support HOT 1
- Support for Microsoft's Edge browser in Windows 10? HOT 3
- Download Chrome extension for Opera
- Scrobble from BBC Radio Player?
- Scrobbling doesn't work on non-Bandcamp hostnames HOT 4
- Hoopla no longer scrobbling HOT 2
- Doesn't scrobble from YouTube on Safari 11.0.3 HOT 2
- Scrobble support for Amazon Prime Music India HOT 2
- Does not scrobble from YouTube at all on Safari HOT 3
- Does not work on Spotify Web Client HOT 3
- Removed from Chrome Web Store? HOT 5
- Safari VK not work
- Album Art is never displayed HOT 1
- Pandora and Soundcloud not working on Safari
- npm run build fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scroblr.