[PLUGIN] YouTube2

I think you just did :grinning:

1 Like

22 years in NL and I still can’t drop the British politeness language tics. I am most dreadfully sorry.

2 Likes

Don’t drop it, there are still many Dutch people who could learn from it, like in the “tweede kamer” debates….

hi @patrickkfkan - i deleted the youtube2 plugin folder and rebooted but volumio still unresponsive. anything else i could try?

had to remove ytcr and ytmusic as well

rm -rf /data/plugins/music_service/ytcr
rm -rf /data/plugins/music_service/ytmusic

rebooted and now responsive

II ran into this issue yesterday, my system became unresponsive after I did a search in the YTMusic plugin. After doing some other things (reboot, check SD cards for errors), I figured the first step was to remove the YTMusic plugin. In addition to issue the command;

rm -rf /data/plugins/music_service/ytmusic

I also removed the plugin from the config file:

sudo nano /data/configuration/plugins.json

and remove the part related to the ytmusic plugin

restart volumio;

volumio vrestart

System was functional again, and installed the 0.2.2. plugin. Problems solved.

ETA: I did search the volumio community, never figured the issue would be discussed in this topic. It would have been a lot faster to get this issue solved if a new thread had been started specifically for this issue :wink:

1 Like

Updated v1.1.3:

  • Fix recursive loading of playlist items (when ‘Load Full Playlist’ enabled)
  • Lazy-load API instead of loading when plugin starts. This avoids the issue that plagued earlier versions, where the API effectively froze Volumio.

There has been refactoring of some parts of the code. If you spot any regressions, please report them here.

v1.1.3 currently in beta channel of Volumio plugin store. To install:

  • Uninstall current version.
  • Enable Plugins Test Mode in http://<volumio address>/dev
  • Find plugin in the plugin store. Click the Details button under it and choose latest beta version to install.
  • Restart Volumio.

(All steps mandatory)

2 Likes

Good afternoon!
Problems with youtube2 plugin. When installing I do everything according to your instructions. When the plugins are installed, I enable it and nothing opens when I go to his settings.
Below is part of the log.

info: Downloading plugin at https://plugins.volumio.workers.dev/pluginsv2/downloadLatest/youtube2/volumio/buster/armhf
info: END DOWNLOAD: https://plugins.volumio.workers.dev/pluginsv2/downloadLatest/youtube2/volumio/buster/armhf
info: Folder /tmp/plugins removed
info: Check plugin dependencies
info: CoreCommandRouter::executeOnPlugin: system , getSystemVersion
info: Checking if plugin already exists
info: Rename folder
info: Folder /tmp/downloaded_plugin.zip removed
info: Move to category
info: Checking if install.sh is present
info: Executing install.sh
 volumio : unable to resolve host restorns-recepcija
 volumio : problem with defaults entries ; TTY=unknown ; PWD=/ ; USER=root ;
 volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/sh /data/plugins/music_service/youtube2/install.sh
pam_unix(sudo:session): session opened for user root by (uid=0)
pam_unix(sudo:session): session closed for user root
info: Install script completed
info: Adding reference to registry
info: Done installing plugin.
info: CoreCommandRouter::executeOnPlugin: my_volumio , getMyVolumioStatus
info: CoreCommandRouter::executeOnPlugin: my_volumio , getMyVolumioToken
info: YouTube2 plugin installed
Plugin install end detected on script
info: Folder /tmp/plugins removed
info: Folder /tmp/downloaded_plugin.zip removed
info: Folder /data/temp removed
info: Enabling plugin youtube2
info: Loading plugin "youtube2"...
info: PLUGIN START: youtube2
info: CoreCommandRouter::volumioAddToBrowseSources[object Object]
info: [1690885527062] CoreMusicLibrary::Adding element YouTube2
info: CoreCommandRouter::executeOnPlugin: my_music , getDisabledSources
Cannot find translation for source YouTube2
info: Done.
info: Enabling plugin youtube2
info: Loading plugin "youtube2"...
info: PLUGIN START: youtube2
info: CoreCommandRouter::volumioAddToBrowseSources[object Object]
info: [1690885608426] CoreMusicLibrary::Adding element YouTube2
info: CoreCommandRouter::executeOnPlugin: my_music , getDisabledSources
Cannot find translation for source YouTube2
info: Done.
info: CoreCommandRouter::getUIConfigOnPlugin
info: [youtube2] InnertubeLoader: creating Innertube instance...
(node:795) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of undefined
    at Function. (/data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:22428:48)
    at Generator.next ()
    at /data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:233:73
    at new Promise ()
    at __awaiter (/data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:212:16)
    at Function._Session_retrieveSessionData (/data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:22415:10)
    at Function. (/data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:22348:99)
    at Generator.next ()
    at /data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:233:73
    at new Promise ()
    at __awaiter (/data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:212:16)
    at Function.getSessionData (/data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:22343:12)
    at Function. (/data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:22338:78)
    at Generator.next ()
    at /data/plugins/music_service/youtube2/node_modules/volumio-youtubei.js/bundle/node.cjs:233:73
    at new Promise ()
(Use `node --trace-warnings ...` to show where the warning was created)
(node:795) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:795) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Seems like it is unable to get the timezone of the runtime environment… What did you set for Timezone in Volumio → System?

Also what Volumio version are you on? x86 or rPi?

Hello!
Yes, the time zone is set.
Here will be the system information.

System Information

OS info
Version of Volumio: 3.512
Hostname: restorns-recepcija
Kernel: 5.10.92-v7+
Governor: performance
Uptime: 0 days, 0 Hrs, 30 Minutes, 44 Seconds

Audio info
Hw audio configured: Headphones
Mixer type: Hardware
Number of channels: 8
Supported sample rate: 44100 48000 88200 96000 176400 192000

Board info
Manufacturer: Raspberry Pi Foundation
Model: Raspberry Pi 3 Model B Plus Rev 1.3
Version: a020d3
Firmware Version:

CPU info
Brand: BCM2837
Speed: 1.4Ghz
Number of cores: 4
Physical cores: 4
Average load: 11%
Temperature: 60°C

Memory info
Memory: 990016 Ko
Free: 429708 Ko
Used: 560308 Ko

Storage info
INTERNAL storage - Size: 57474Mo
Used: 242Mo
Available for storage: 54291Mo (94%)

So what’s the timezone?

I tried setting timezone to “Europe/Riga” as well and got no problems. Perhaps this is specific to your system?

Try setting your timezone to UTC and restart Volumio. If that doesn’t fix the issue, I would try a fresh install on another SD card.

If you know SSH, also see what this command outputs after SSH-ing into Volumio:

$ node -p "console.log(Intl.DateTimeFormat().resolvedOptions());"

// The following is what I got:
{
  locale: 'en-HK',
  calendar: 'gregory',
  numberingSystem: 'latn',
  timeZone: 'Europe/Riga',
  year: 'numeric',
  month: 'numeric',
  day: 'numeric',
  fractionalSecondDigits: 0
}

Good morning!
Thanks, if I changed the time zone to UTC, I restarted and reinstalled the plugin. Now everything was working.
Thank you very much!

Question btw:

Is it possible to share a title from YouTube with someone else who also runs Volumio so that he can import the link into his Volumio?

No. I don’t think Volumio has support for importing stuff. Closest thing would be to search the YT link. E.g.:

The first result should point to the item you are sharing.

Sharing a YouTube link is already quite a decent solution.
Didn’t know that one can use it in the search. Thx

Many thanks for your work @patrickkfkan - it’s great.
Just wanted to ask if there is any way to choose the playback quality? I assume it’s not, only saw that setting for the live streamings. Just to make sure I didn’t overlook it.
Thanks once more.

You are correct. Plugin always chooses the highest quality available.

1 Like

Hi @patrickkfkan ,

is so many times that i not write here.
Then i was using youtube2 for some times, than my hi-fi crashed and i didn’t use my raspi with volumio for soime months. Now today i reactivate all. Raspi works with volumio ver 2.8.7.3 - i think is the ltest ver of 2 release - also the spotift connect plugins and other. But Youtube 2 don’t work anymore.

I have the yotube2 0.1.1.a.
Now i forget all! Then i scroll my last command in ssh and something turned on my mind :slight_smile:

So which version of the plugin have i to install now? Have i to delete the folder og the plugin here: volumio@volumio:/data/plugins/music_service/youtube2$ then i have to git pull from master or from volumio 2.x version branch? if it is yet working on volumio2

Or can i install this youtube-music plugin? I don’t know what it is.

Thanks!
Bye
Gab

Ps: this is the erro when i launch journalctl -f

Sep 21 17:11:54 volumio volumio[783]: info: [youtube2-auth] Access token not obtained. Will try again in 6s