• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 7
Experimental Youtube Music Addon
#16
Hi, @foreverguest do you have a Repo at Github?
Reply
#17
(2021-03-31, 20:55)zypy Wrote: Hi, @foreverguest do you have a Repo at Github?

Hi, not yet, I'll provide one soon.
Reply
#18
I was wondering if a small video on how to retrieve cookie and visitor-id strings to get the addon running. Thanks
Reply
#19
(2021-04-12, 18:48)kobyboy Wrote: I was wondering if a small video on how to retrieve cookie and visitor-id strings to get the addon running. Thanks

that would be a lot of blurring on the video because of personal data.

try to follow this:

- Open a new empty tab in chrome/edge
- press F12 so the console opens
- now go to music.youtube.com
-  in the console you opened with F12, go to "network"
- filter the search for "/browse" there (without the quotes) - you'll se the "filter" search box in the network tab
- now you will see your ctoken, it will be the only result of the search - click on it
- copy the "cookie: " part (without the "cookie: ")
- below the cookie part, you can see "x-goog-visitor-id: "
- copy the part after "x-goog-visitor-id: "

that's it. 

so, what you need to do with "cookie" and "x-goog-visitor-id" is just to paste them accordingly to the notepad file you created (leave the quotes, paste between them):
Quote:{
    "Cookie": "PASTE COOKIE HERE",
    "X-Goog-Visitor-Id": "PASTE HERE",
    "origin": "https://music.youtube.com"
}

save it somwhere you'll be able to access it from kodi (i saved it to my documents folder). you can save it as a text file, it doesn't have to be .json extension
when you open the youtube music addon in kodi, it will ask you to browse to find the file. find it and open it.

that's it.
the cookie will expire after some time, so you'll need to do this again when it does.
that's how it works for me on a windows PC.
Reply
#20
Tried this on an FTV but was unable to get it to recognise the cookie file (log). Had it stored in the download directory so would think it'd be ok but I guess it has something to do with typical Android permissions problems.

On a Windows laptop I was able to login - I could see my played history - but got a series of errors (log) and playback never worked.
Reply
#21
@foreverguest : Thank you for doing this. Its something that was stopping me from adopting Matrix . 
I have to admit that I am struggling at the "cookies " bit
I have followed all the steps and extracted "set cookies "  which is a long string . when I am using these as saved  as a text file to enter as headers when running the addon but there is always and error and wouldnt accept the cookies.
Can I share this " cookie " data and maybe one of the experienced people could kindly point which file / string to use 
sorry to be such a nuisance
Reply
#22
(2021-06-08, 11:58)shaktoo Wrote: @foreverguest : Thank you for doing this. Its something that was stopping me from adopting Matrix . 
I have to admit that I am struggling at the "cookies " bit
I have followed all the steps and extracted "set cookies "  which is a long string . when I am using these as saved  as a text file to enter as headers when running the addon but there is always and error and wouldnt accept the cookies.
Can I share this " cookie " data and maybe one of the experienced people could kindly point which file / string to use 
sorry to be such a nuisance
Hi,

Have you tried these instructions, shared by ray:
- Open a new empty tab in chrome/edge
- press F12 so the console opens
- now go to music.youtube.com
-  in the console you opened with F12, go to "network"
- filter the search for "/browse" there (without the quotes) - you'll se the "filter" search box in the network tab
- now you will see your ctoken, it will be the only result of the search - click on it
- copy the "cookie: " part (without the "cookie: ")
- below the cookie part, you can see "x-goog-visitor-id: "
- copy the part after "x-goog-visitor-id: "
Reply
#23
So got the login alright. However its not playing any file ?
Ill try the errors 'morrow
Reply
#24
Hi,

Added new version, with updated dependencies, should fix some access errors.

plugin.audio.ytmusic.exp-1.0~beta2.zip
Reply
#25
Thanks for this, tried it on a Windows machine and playback is working (with video).

Search worked and I was able to see history and liked songs, couldn't get access to other parts of music library (Artists, albums, playlists). Log
Reply
#26
Good to see progress on this. I tested on Ubuntu.
YT Music Library appears to be empty. Uploads Library is working.
Playback of Uploads Library content is working. Playback of Search results crashed kodi.
Reply
#27
(2021-06-26, 13:29)sluigon Wrote: Good to see progress on this. I tested on Ubuntu.
YT Music Library appears to be empty. Uploads Library is working.
Playback of Uploads Library content is working. Playback of Search results crashed kodi.

Windows 10 x64 - YouTube Music Library is broken for me too. i get this in the log:
Code:
2021-06-27 14:54:24.595 T:17596    INFO <general>: [YtMusicEXP-1.0~beta2]  ARGV: ['plugin://plugin.audio.ytmusic.exp/', '164', '?path=playlist&playlist_id=ytmusic_songs', 'resume:false']
2021-06-27 14:54:24.607 T:17596    INFO <general>: [YtMusicEXP-1.0~beta2] #1# INIT STARTED :'0' - FETCHED TIME: 1624798182
2021-06-27 14:54:24.635 T:17596    INFO <general>: [YtMusicEXP-1.0~beta2] PATH: playlist
2021-06-27 14:54:24.635 T:17596    INFO <general>: [YtMusicEXP-1.0~beta2] Loading playlist: ytmusic_songs
2021-06-27 14:54:25.780 T:17596   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'contents'
                                                   Traceback (most recent call last):
                                                     File "C:\Users\raych\AppData\Roaming\Kodi\addons\plugin.audio.ytmusic.exp\resources\lib\addon.py", line 90, in <module>
                                                       Navigation().listMenu(params)
                                                     File "C:\Users\raych\AppData\Roaming\Kodi\addons\plugin.audio.ytmusic.exp\resources\lib\navigation.py", line 62, in listMenu
                                                       listItems = self.listPlaylistSongs(get("playlist_id"))
                                                     File "C:\Users\raych\AppData\Roaming\Kodi\addons\plugin.audio.ytmusic.exp\resources\lib\navigation.py", line 174, in listPlaylistSongs
                                                       songs = self.api.getPlaylistSongs(playlist_id)
                                                     File "C:\Users\raych\AppData\Roaming\Kodi\addons\plugin.audio.ytmusic.exp\resources\lib\api.py", line 39, in getPlaylistSongs
                                                       self.getApi().get_playlist(playlist_id))
                                                     File "C:\Users\raych\AppData\Roaming\Kodi\addons\plugin.audio.ytmusic.exp\resources\lib\ytmusicapi\mixins\playlists.py", line 67, in get_playlist
                                                       results = nav(response,
                                                     File "C:\Users\raych\AppData\Roaming\Kodi\addons\plugin.audio.ytmusic.exp\resources\lib\ytmusicapi\parsers\utils.py", line 155, in nav
                                                       raise err
                                                     File "C:\Users\raych\AppData\Roaming\Kodi\addons\plugin.audio.ytmusic.exp\resources\lib\ytmusicapi\parsers\utils.py", line 149, in nav
                                                       root = root[k]
                                                   KeyError: 'contents'
                                                   -->End of Python script error report<--
                                                   
2021-06-27 14:54:26.272 T:17596    INFO <general>: Python interpreter stopped
2021-06-27 14:54:26.284 T:24284   ERROR <general>: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.audio.ytmusic.exp/?path=playlist&playlist_id=ytmusic_songs
2021-06-27 14:54:26.289 T:26328   ERROR <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.ytmusic.exp/?path=playlist&playlist_id=ytmusic_songs) failed
2021-06-27 14:54:26.295 T:14168    INFO <general>: initializing python engine.
2021-06-27 14:54:26.480 T:14168    INFO <general>: [YtMusicEXP-1.0~beta2]  ARGV: ['plugin://plugin.audio.ytmusic.exp/', '165', '?path=ytmusic_library', 'resume:false']
2021-06-27 14:54:26.492 T:14168    INFO <general>: [YtMusicEXP-1.0~beta2] #1# INIT STARTED :'0' - FETCHED TIME: 1624798182
2021-06-27 14:54:26.518 T:14168    INFO <general>: [YtMusicEXP-1.0~beta2] PATH: ytmusic_library
2021-06-27 14:54:26.519 T:14168    INFO <general>: CPythonInvoker(197, C:\Users\raych\AppData\Roaming\Kodi\addons\plugin.audio.ytmusic.exp\resources\lib\addon.py): script successfully run
2021-06-27 14:54:26.998 T:14168    INFO <general>: Python interpreter stopped

Everything else, including the search (and playback from search) works great here.
Reply
#28
New version:
plugin.audio.ytmusic.exp-1.0~beta3.zip
- added a preference to stream only audio
- fixed some library navigation errors
Reply
#29
Hey foreverguest

Firstly, thanks so much for putting in the effort for this add-on. I'll definitely be donating when I get the chance.

I see that you have a video setting but after playing a few songs I haven't seen a Music Video like I would on the YT Music app. To confirm, is the "Video" the album art is it intended to play the song's video?

More asking in case I need to do something definitely to get that to work.
Reply
#30
Differently*

I feel like I am missing something obvious, but for the life of me, I can't find an edit button.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 7

Logout Mark Read Team Forum Stats Members Help
Experimental Youtube Music Addon0