Giter Site home page Giter Site logo

tjhrulz / webnowplaying Goto Github PK

View Code? Open in Web Editor NEW
201.0 201.0 26.0 2.7 MB

A NowPlaying like plugin for rainmeter built for getting music info from websites

License: GNU General Public License v2.0

C# 93.08% C 6.92%
google-play-music music rainmeter soundcloud twitch youtube

webnowplaying's Introduction

The WebNowPlaying Rainmeter plugin has been rewritten to take advantage of the new adapter library for easier implementation. The source code for the new version can be found here

Note: The new version is fully compatible with the old version and is a drop in update. All skins will continue to work as before with the new version

webnowplaying's People

Contributors

tjhrulz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webnowplaying's Issues

Type to tell what if shuffle/repeat/rating controls are accessible

Originally I had planned to have the plugin expose what all controls were available but thought that was to tedious. However having a simple what control set is visible would be nice.
Something simple like:
0 is none
1 is shuffle/repeat controls
2 is rating controls
3 is both.

Then a skin could only expose the buttons that are most likely to be missing in some players.

YouTube Issue

The skin didn't respond when I playing some music from Youtube. But the skin is still respond to soundcloud. Either the skin example and my edited skin had this same problem. This happen when I playing both the Mix and a single song/vid in youtube.
image
This is what I used :
image
I also used the 0.4.7 version of the Companion

Google Play Music - Current Track Length Inaccurate

The current track position shows the total time since I started playing any album/playlist, not the current position in the currently playing track - see the screenshot attached. (Where it says 12:48 and 413%).

capture

Youtube shuffle broken?

Rainmeter 4.4.0.3338 beta (64-bit)
Language: German (1031)
Build time: 2019-11-19 7:55:40
Commit Hash: ab72019a
Windows 10 Pro 1909 64-bit (build 18363) - German (1031)
Path: C:\Program Files\Rainmeter
SkinPath: D:\Daten*\Rainmeter\Skins
SettingsPath: C:\Users*\AppData\Roaming\Rainmeter
IniFile: C:\Users*\AppData\Roaming\Rainmeter\Rainmeter.ini

and the same with the "4.3.1 Final Release"

Browser: Brave "Chromium: 79.0.3945.88 (Official Build) (64-bit)"
Chrome Extensions: WebNowPlaying "0.4.7"

I always get this error.

Protocol:
NOTE (15:21:06.492) WebNowPlayingExample\Example.ini: Refreshing skin
ERRO (15:21:07.506) : WebNowPlaing.dll - Error converting volume to integer, volume was:57.5144564799235
ERRO (15:21:07.517) : Web Side Error:Error updating shuffle for Youtube
ERRO (15:21:08.505) : Web Side Error:Error updating shuffle for Youtube
ERRO (15:21:09.505) : Web Side Error:Error updating shuffle for Youtube
ERRO (15:21:10.505) : Web Side Error:Error updating shuffle for Youtube

Debug Protocol:
DBUG (15:09:40.631) WebNowPlayingExample\Example.ini: Reading file: D:\Daten*\Rainmeter\Skins\WebNowPlayingExample\Example.ini
DBUG (15:09:40.635) : Reading file: C:\Users*\AppData\Roaming\Rainmeter\Rainmeter.ini
DBUG (15:09:44.518) : System.OverflowException: Der Wert für einen Int16 war zu groß oder zu klein. ---> System.OverflowException: Der Wert für einen Int32 war zu groß oder zu klein.

bei System.Decimal.ToInt32(Decimal d)

bei System.Decimal.ToInt16(Decimal value)

--- Ende der internen Ausnahmestapelüberwachung ---

bei System.Decimal.ToInt16(Decimal value)

bei WebNowPlaying.Measure.WebNowPlaying.OnMessage(MessageEventArgs arg)
DBUG (15:09:44.539) : Web Error:TypeError: Cannot read property 'getAttribute' of undefined
DBUG (15:09:45.517) : Web Error:TypeError: Cannot read property 'getAttribute' of undefined
DBUG (15:09:46.514) : Web Error:TypeError: Cannot read property 'getAttribute' of undefined
DBUG (15:09:47.519) : Web Error:TypeError: Cannot read property 'getAttribute' of undefined

WebNowPlaying not working, but other plugins are.

I don't know what happened, I don't recall updating anything recently but now it seems like it's not working:
Screenshot 1

Neither WebNowPlayingExample or Cleartext seem to work, but if I start playing spotify, Cleartext seems to pick it up:
Screenshot 2

As far as I know everything is installed and activated, and Cleartext is configured correctly to use WebNowPlaying as a secondary source and it worked fine before, if I need to provide any log files please let me know.

Stops working if I connect to VPN, even after I disconnect or restart browser+rainmeter

Windows 10 ver 1903
Firefox 69.0a1
Latest versions of rainmeter, webnowplaying.dll, and webnowplaying companion
The VPN is private internet access, latest version. When I connect, the plugin stops working. Even after disconnecting it still doesn't work. Of course the internet works fine, as do other internet-related plugins. This plugin is the only thing that stops working. The companion says "not connected, click to troubleshoot" which does nothing. Then if I reload rainmeter it sometimes throws an error in the log saying that there were problems loading the plugin or something. I can't remember exactly what it says, and the majority of the time it doesn't mention the plugin at all, it's just kinda failing but not throwing any errors. But at some point, the log said something like I can only define one of port/proxy/domain or something. I'm totally misremembering, but it was something like that. Like the VPN changed some type of network connection property which caused the plugin to fail, and thereafter the plugin just stops looking or something. The first time I noticed this I just restarted my computer and it worked fine after that. The second time I tried closing rainmeter and firefox, then disabling and re-enabling my network adapter. This also worked fine. But these aren't really good solutions, I feel like it shouldn't fail during a VPN connection at all, but if it must, it should be able to boot back up by just refreshing the skin or at least opening and closing rainmeter. It seems to have nothing to do with firefox, I reproduced the issue with chrome too. I also tried connecting to the VPN while firefox was closed, and then opening firefox. Same deal. It's like the plugin is listening for something that it shouldn't need to. I don't have any other VPN subscriptions so I can't test if this is true for any other VPN but I posted here so that users of other VPNs can test it out.

My temporary workaround is to create a second, identical layout, except this layout loads a different music player skin which looks the same, but which has no measures calling the plugin. That way if I connect to the VPN while this skin is loaded instead of my normal music player skin, then the plugin doesn't get loaded at all. And I can safely connect, disconnect, then switch to my normal skin, and webnowplaying initializes just fine. I'm not a huge fan of increasing the number of steps though. If I don't find a better solution to this then I will write a little autohotkey script to automatically switch layouts when I click the VPN tray icon. Still a very imperfect solution, since then I have to be careful not to click the tray icon but choose not to actually connect or disconnect. But the only alternative would be listening for network changes for a trigger, and then I don't think it will switch the layouts fast enough to have the plugin unloaded by the time it recognizes the network change that causes it to break. So really this is the kind of problem that calls for fixing the underlying issue, but I'm not sure if it's my VPN client, or the webnowplaying plugin. It seems like the plugin shouldn't care about my network connection at all though, so even if it is unique to my VPN client it seems like it's due to something unnecessary.

Add background page (remove dev tools spam)

Your chrome extension keeps sending numerous requests. While I normally wouldn't mind that if that's needed for its functionality, I do mind it taking up my dev tools. The console and networks tab of the dev tools keeps getting spammed with your requests.

I believe most extensions use their own background page for requests, so those requests don't show up on other webpages you visit. Perhaps, if possible, you can consider doing the same?

Check is album art to download is the same as the old album art before downloading

This plugin has relied on the client (aka the extension/app) to cache the data and only send it to the plugin on change. I do not want to change this behavior as I believe send as little communication of the websocket as needed is a good thing. However since other programs have figured out how to emulate the communication of this plugin I feel I should add a check to the album art to prevent needlessly downloading the same album art.

Amazon Music / Twitch don't work

It seems that the Amazon Music and Twitch integration is broken - doesn't deliver any data.
Tested with Rainmeter 4.2 r3064 and Chrome 66 / Firefox 58.

Google Play Music, Soundcloud, Spotify and Youtube work properly.

Rewrite Album Art downloader/Fix info fighting

The album art downloader was hacked together in an hour since I was leaving to visit family and should probably be rewritten instead of just kludging together more fixes. While rewriting it I should at the same time make it so song info does not fight for visibility as often (Possibly by checking who sent new important info last and which if any are visible)

Soundcloud album art no longer working

OS: Windows 10
Rainmeter Version: 4.3.1.3321 (64-bit)
I am using the most recent version of the plugin.

When using Soundcloud, the track and artist name still works, but the album art no longer shows up. YouTube works just fine. This breaks in both the example skin and in the Monstercat Visualizer. In the Rainmeter log you get something along the lines of

Unable to get album art from: https://i1.sndcdn.com/artworks-gv6BU6dXdgHcyD8y-sCsKrA-t500x500.jpg

though the URL is valid and works fine in browser. This happened recently, as I believe it was working just a month or two ago, so it may be a change with whatever Soundcloud API the Extension uses, or it might be an issue with the Rainmeter plugin breaking due to a Rainmeter update.

Deezer not working.

It works for youtube, soundcloud, and every other one I tried, but deezer won't have the ablum art appear.

Firefox addon causes Error: Permission denied to object

I'm not sure of the cause, as I cannot find any reference to this function call in the source code, but it seems this addon somehow causes Firefox to make window.onbeforeunload() a "restricted function". This causes any calls to it to fail as "Error: Permission denied to access object"

This occurs on any website, and can be witnessed simply by trying to view the object or run the function in the browser console.

without the extension installed:
image

with the extension installed:
image

This is on Windows 10 Insider Preview, using Firefox 67.0.1 with addon version 0.4.5.

Soundcloud progress not working

When I use this extension and plugin with soundcloud, every variable works except for progress. It should be impossible to give anything above 100, but the only values I get from it are above 100. I'm using the chrome extension.

If using relative SetVolume or SetPosition in rapid succession old info is used

Since I wait for return info from the website to update info it is possible for the old volume to be used if you were to send the command twice within the 50ms update window.

While the simple fix would be to assume that the value will change I think if I want to do that I might as well write every command to assume the info will update and rewrite the javascript to resend info if I assumed wrong (and possibly even if I assumed right). This will mean I can lower the refresh rate on the js side and while there is not any noticeable increase in CPU usage from the plugin it would just be nice.

last.fm

Could you add last.fm support?

coding languge

what coding languge do you guy use to create add-on's for programs

API besides rainmeter?

Any way I could interface with your plugin using Python or have the plugin simply output now playing info to text?

Fetch Error 12002

Steps I did to reproduce this error:

  • Delete rainmeter plugin folder
  • Install WebNowPlaying for Chrome
  • Clean install Monstercat Visualizer
  • Uncheck SpotifyPlugin and Chameleon(So I don't saturate the log with those errors 😉)
ERRO (16:53:47.588) monstercat-visualizer\Song Information\Left.ini - [MeasureWebParser]: (Fetch error) The operation timed out  (ErrorCode=12002)
ERRO (16:53:47.619) monstercat-visualizer\visualizer.ini - [MeasureWebParser]: (Fetch error) The operation timed out  (ErrorCode=12002)
ERRO (16:53:47.779) monstercat-visualizer\visualizer.ini - [MeasureWebParser]: (Fetch error) The operation timed out  (ErrorCode=12002)
ERRO (16:54:57.200) monstercat-visualizer\visualizer.ini - [MeasureWebParser]: (Fetch error) The operation timed out  (ErrorCode=12002)
ERRO (16:56:06.685) monstercat-visualizer\visualizer.ini - [MeasureWebParser]: (Fetch error) The operation timed out  (ErrorCode=12002)
ERRO (16:56:49.446) monstercat-visualizer\Song Information\Cover\Cover.ini - [MeasureWebParser]: (Fetch error) The operation timed out  (ErrorCode=12002)
ERRO (16:56:49.593) monstercat-visualizer\Song Information\Left.ini - [MeasureWebParser]: (Fetch error) The operation timed out  (ErrorCode=12002)
ERRO (16:57:16.077) monstercat-visualizer\visualizer.ini - [MeasureWebParser]: (Fetch error) The operation timed out  (ErrorCode=12002)
ERRO (16:58:25.454) monstercat-visualizer\visualizer.ini - [MeasureWebParser]: (Fetch error) The operation timed out  (ErrorCode=12002)

It eventually got over it and worked as expected, but I felt like i should open the issue here.

Could this be made to work with Waterfox?

When FireFox switched to web extensions, a lot of people "jumped ship" and moved to other browsers that still supported legacy addons, one of those being Waterfox - a forked version of FireFox.

Given that there is already a companion addon for FireFox and that Waterfox is probably pretty similar, I was curious if a companion addon could be made for Waterfox as well (I can confirm it doesn't work with Waterfox 54.0.1).

Either way, thank you and keep up the great work!!

Spotify Local File Album Art

Since Spotify doesn't return album art for local files, is it possible to detect if Spotify is listening to a local file and then use Spotify's logo as the cover or the DefaultPath? Currently, it shows the previous non local file album art when playing a local file.

Thanks.

Support for vk.com

It would be great if this plugin could support VK music.
I know that VK is not at all popular in your country, but this is the most popular social network in Russia. Such as facebook in USA :)
https://vk.com

Cannot build from source

I am trying to build the project from source. I am using Visual Studio 2019, on Windows 10.

I cloned the repo and added my api keys, but I get the following error:
syntax error at token '-' in: IL_0029: ldc.r8 -inf

Is this an issue with ILMerge?

Support For Web-based Desktop Apps?

Is it possible to make tidal work with rainmeter by chance ? - im aware its possible with the web-page version but im curious about the actual client since its more practical. - thanks for your time

Support for Mixcloud

I love this and use it for soundcloud and youtube, but noticed my rainmeter apps weren't working with https://www.mixcloud.com and notice that WNP doesn't support it. If you're free please add this site! :D Thanks and love the WNP functionality keep up the good work!

Soundcloud not working?

Input error when SoundCloud is selected, and the extension give me this error or 'Needs to update' error.
image
image

SetPosition with Spotify or Soundcloud doesn't work

Integer-value:
SetPosition <100 and it jumps to 0% of the current track.
SetPosition >=100 and it jumps to the next track.

Double-value one decimal:
SetPosition <= 9.9 and it jumps to 0% of the current track.
SetPosition > 9.9 and it jumps to the next track.

Double-value two decimals:
SetPosition <= 1.00 and it jumps to 0% of the current track.
SetPosition > 1.00 and it jumps to the next track.

It seems the dot in the double value gets terminated (I don't use double values anyway).

If you use double-values it will also jump to 0% with the Google Play Music or Youtube, otherwise the bang works properly with these two players.

Tested with Rainmeter 4.2 r3064 and Chrome 66 / Firefox 58.

installation is crazy (tidal not working)

let me preface this... i am not very smart.

i have tried installing manually, and automatically. ive even gotten it to the point where the Magick Album Art visualizer will show album covers when i play a song on soundcloud. But i cant get the monstercat visualizer to work with it, and i cant get it to work with tidal.

i've followed everything ive managed to find online, and am lost.

Bandcamp Support

Would it be possible to include support for Bandcamp?
Thank you for making this extension!

Web Side Errors for repeat and shuffle with stations on Amazon Music

When listening to a "Station" on Amazon Prime there is no "Shuffle" or "Repeat" available. This makes Rainmeter throw both a "Web Side Error:Error updating shuffle for Amazon Music" error and a "Web Side Error:Error updating repeat for Amazon Music" error every 100ms. However, when listening to an album or other playlist where "Shuffle" and "Repeat" are available, these errors do not occur.

Performance issue

The plugin takes up a lot of performance.
It Occupies CPU 10% to 80%.
I tried a lot of skins, but the problem still remains unresolved.

Web Side Errors updating cover for Spotify

In Rainmeter log Web Side Error:Error updating cover for Spotify. No Album art is displayed from Spotify playlists. This is affected by both the Chrome and Firefox extensions 0.4.6

EDIT: This issue is not occurring with WebNowPlaying Spotify with spicetify-cli.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.