Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Song details becomes '?' when the song name is not English #9

Closed
seromy opened this issue Nov 4, 2020 · 6 comments
Closed

Song details becomes '?' when the song name is not English #9

seromy opened this issue Nov 4, 2020 · 6 comments

Comments

@seromy
Copy link

seromy commented Nov 4, 2020

Hi, first of all, thank you for making this such a good package for us :)

Problem: Not able to show non-ASCII characters

Details: The song name in the attached image is originally call '早送りカレンダー ' in Japanese, but the console output ???????? and my application also show this.
Screenshot 2020-11-04 183818
⬆Console capture

Screenshot 2020-11-04 202631
⬆The song info box in iTunes

Screenshot 2020-11-04 202843
⬆Sample of using currentTrack.name inside an electron app.

How can I solve this problem or this is a bug?


Electron version: v8.3.0
Nodejs version: v12.18.3
npm version: 6.14.6
@AngryKiller
Copy link
Owner

Hello and sorry for the long delay.
I'm gonna see if this problem also happens on macOS, if it isn't the case then it's probably an issue with WScript on Windows and I'm gonna try to find a workaround.

@N0chteil
Copy link
Contributor

json = {
            "name": encodeURIComponent(currentTrack.name),
            "artist": encodeURIComponent(currentTrack.artist),
            "album": encodeURIComponent(currentTrack.album),
            "mediaKind": currentTrack.kind,
            "duration": currentTrack.duration,
            "elapsedTime": iTunesApp.PlayerPosition,
            "remainingTime": remainingTime,
            "genre": encodeURIComponent(currentTrack.genre),
            "releaseYear": currentTrack.year,
            "id": encodeURIComponent(currentTrack.name), // I haven't found a way to get the current track ID with iTunes COM :/
            "playerState": playerState
        };
decodeURIComponent(currentTrack.name)
decodeURIComponent(currentTrack.artist)
decodeURIComponent(currentTrack.album)
...

Not the best way, but it works
image

@AngryKiller
Copy link
Owner

```js
json = {
            "name": encodeURIComponent(currentTrack.name),
            "artist": encodeURIComponent(currentTrack.artist),
            "album": encodeURIComponent(currentTrack.album),
            "mediaKind": currentTrack.kind,
            "duration": currentTrack.duration,
            "elapsedTime": iTunesApp.PlayerPosition,
            "remainingTime": remainingTime,
            "genre": encodeURIComponent(currentTrack.genre),
            "releaseYear": currentTrack.year,
            "id": encodeURIComponent(currentTrack.name), // I haven't found a way to get the current track ID with iTunes COM :/
            "playerState": playerState
        };
decodeURIComponent(currentTrack.name)
decodeURIComponent(currentTrack.artist)
decodeURIComponent(currentTrack.album)
...

Not the best way, but it works

Thanks for that fix! You can create a pull request if you want and I will implement it.

@seromy
Copy link
Author

seromy commented May 30, 2021

Thank you so much!

@AngryKiller
Copy link
Owner

@itztaylorau can you confirm that the issue is resolved using iTunes-bridge 0.6.7?

@seromy
Copy link
Author

seromy commented Jun 18, 2021

@itztaylorau can you confirm that the issue is resolved using iTunes-bridge 0.6.7?

Yes and I can confirm that the latest version 0.6.7 works with special characters.

Sample:
Screenshot 0003-06-19 at 02 59 22

@seromy seromy closed this as completed Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants