Skip to main content

Topic: foo_youtube (Read 155276 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
Re: foo_youtube
Reply #850
Hi, I've just reinstalled the OS and I'm setting everything up again, iirc my Youtube Search items were added to the Default playlist overwriting the old ones, but at the moment I cannot reproduce that behavior and my other playlists, those i'm in when i start the search, keep getting overwritten.
I know there is in Preferences/Tools/YT Source/Search/Destination: Specific playlist, but i tried to edit '['Youtube']' %artist% with no success. Can you help me pls?

  • spode
  • [*]
Re: foo_youtube
Reply #851
Just found out about this plugin and it seems really awesome! Been using foobar for a long time but never thought of googling foobar+youtube and here we are. I already have a few use case ideas for me. Thanks a ton for making it!

Hi,

could you add the feature, that you can refresh a youtube playlist added by "add location" ? If no, you added a "get more 50 for ''" element in the playlist after using "add location", could you just add that also for "get the first 50" as it doenst matter if things are double in the list as ill delete the list anyway before refreshing. it would be highly aweseome.

thx
This "refresh a youtube playlist added by "add location"" is something I am really interested in as well. I saw that you suggested that sebastien looked into the 3dydfy-search functionality (which I think is fy+search according to 2.0 changelog but the website still has 3dydfy-search in some places?). I am personally not having much success with it (nothing seems to happen when I click the fy+search playlist items).

One of my use cases for this plugin is to listen to a changing collaborative youtube playlist, so I would want a permanent 'Get more...' item that appends new tracks to the foobar playlist (that have been added to the youtube playlist). From what I am reading the functionality is kind of possible right now even though it is perhaps not super elegant? Any tips on how to do this?

  • mire777
  • [*][*][*][*][*]
Re: foo_youtube
Reply #852
I see. No, there are no plans to upload videos to Youtube within this component.

I was think to made this possible trough script.

I can go trough playlist.

This works: https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=PL889BDECC517358C9&key=AIzaSyA17v8PuNBsIwgbxg6D78iHV-w7_dYyXPw

But how to create and add videos to user playlist?
Can someone help?

Here is the script:

Code: [Select]
function YTPlaylist(){
    this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    this.xmlhttp.open("GET", "https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=PL889BDECC517358C9&key=AIzaSyA17v8PuNBsIwgbxg6D78iHV-w7_dYyXPw", true);
    //this.xmlhttp.setRequestHeader("Authorization", "Bearer");
    this.xmlhttp.send();
   
   this.xmlhttp.onreadystatechange = function() {
if (this.xmlhttp.readyState == 4) {
if (this.xmlhttp.status == 200) {
var text = this.xmlhttp.responsetext;
                    fb.trace(text)
                }}}
  
  

}

YTPlaylist();



I need to use ''POST'' instead ''GET'' , something like this:

Code: [Select]
function YTPlaylist(){
    var xmlhttp = new XMLHttpRequest();
    var url = "https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&part=snippet&key=AIzaSyA17v8PuNBsIwgbxg6D78iHV-w7_dYyXPw";

    var config = {
     "snippet": {
      "playlistId": {PLAYLIST_ID},
      "resourceId": {
       "videoId": {VIDEO_ID},
       "kind": "youtube#video"
      }
     }
    }

   xmlhttp.onreadystatechange = function() {
       if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
           var response = JSON.parse(xmlhttp.responseText);
           console.log(response);
       }
   };

   console.log(url);
   xmlhttp.open("POST", url, true);
   xmlhttp.setRequestHeader("Authorization", "Bearer {ACCESS_TOKEN});
   xmlhttp.send(config);
}
YTPlaylist();
 

  • Last Edit: 09 October, 2017, 06:25:18 AM by mire777

  • 3dyd
  • [*][*][*][*]
  • Developer
Re: foo_youtube
Reply #853
hmm music play good but video dont show 'Stopped'
Live video is not supported yet. Some playback can be established if select 'LAV Splitter' in Video tab -> Media downloading, but it is far from perfect due to a lot of lags.

Hi, I've just reinstalled the OS and I'm setting everything up again, iirc my Youtube Search items were added to the Default playlist overwriting the old ones, but at the moment I cannot reproduce that behavior and my other playlists, those i'm in when i start the search, keep getting overwritten.
I know there is in Preferences/Tools/YT Source/Search/Destination: Specific playlist, but i tried to edit '['Youtube']' %artist% with no success. Can you help me pls?
Use search panel config (where 'Order by relevance' etc. are placed). Column 'Playlist' there controls destination playlist for search results.

This "refresh a youtube playlist added by "add location"" is something I am really interested in as well. I saw that you suggested that sebastien looked into the 3dydfy-search functionality (which I think is fy+search according to 2.0 changelog but the website still has 3dydfy-search in some places?). I am personally not having much success with it (nothing seems to happen when I click the fy+search playlist items).
In case of playlists in 2.0 you would need fy+playlist scheme. Example, can be added as is via 'Add location':
Code: [Select]
fy+playlist://youtube.com?id=UU16niRr50-MSBwiO3YDb3RA&limit=50
'limit' is the number of results to get (1-50). Other than that playlist scheme does not have any useful params (it retrieves items ordered by upload date and without any filtering).

  • zeremy
  • [*][*][*][*]
Re: foo_youtube
Reply #854
Can subtitles for a clip be fixed in some way as to display those ugly entities with their corresponding characters?


  • 3dyd
  • [*][*][*][*]
  • Developer
Re: foo_youtube
Reply #855
Yes, will be fixed.

  • TheQwertiest
  • [*][*]
Re: foo_youtube
Reply #856
@3dyd :
https://fy.3dyd.com/changelog/ : "2.0.3 (28-Nov-2017)"
It's still October though? :P

  • 3dyd
  • [*][*][*][*]
  • Developer
Re: foo_youtube
Reply #857
Oops. Thanks.

  • TheQwertiest
  • [*][*]
Re: foo_youtube
Reply #858
@3dyd :
I'm encountering the following bug, though I'm not sure if the source of the problem is actually foo_youtube:

Repro steps (a bit vague):
1. JScript panel, which calls utils.GetAlbumArtAsync(... metadb = fb.GetNowPlaying() ...) from on_playback_new_track callback.
2. Load a playlist with youtube tracks and start playing random track from it.
3. Wait for player to switch to the next track, or do it manually.

Expected result:
on_get_album_art_done callback receives a loaded art, i.e. image and image_path arguments of callback are not null.

Actual result:
Sometimes on_get_album_art_done callback does not receive any art, i.e. image and image_path arguments of callback are null.

Calling utils.GetAlbumArtAsync again after track started playing loads art correctly.
There are also no problems with loading art when playing local tracks (e.g. mp3).

This problem might lie in my code, JScript or foobar itself, but may be it's a known problem with a possible workaround?
  • Last Edit: 30 October, 2017, 11:40:12 AM by TheQwertiest

  • marc2003
  • [*][*][*][*][*]
  • Developer
Re: foo_youtube
Reply #859
Since it seems to work if you try again, why not add a delay using window.SetTimeout?

Code: [Select]
window.SetTimeout(function () {
    utils.GetAlbumArtAsync(...);
}, 500); //time here is milliseconds

edited for idiocy - I originally said SetInterval   ::)
  • Last Edit: 30 October, 2017, 11:57:30 AM by marc2003

  • 3dyd
  • [*][*][*][*]
  • Developer
Re: foo_youtube
Reply #860
but may be it's a known problem with a possible workaround?
If it is in this component, it is unknown problem.

You could try to reproduce it while recording component's log (hold Shift key -> menu View -> Youtube Source Log -> Right click -> Record). Then inspect recorded file for anomalies or send it to me.

  • zeremy
  • [*][*][*][*]
Re: foo_youtube
Reply #861
Yes, will be fixed.
Thanks for the fix. :)

  • zeremy
  • [*][*][*][*]
Re: foo_youtube
Reply #862
Two observations , feature requests - if possible - regarding the video options.

1. The option to show subtitles initially also for LRC files. 
Would be great to always load lyrics someone has made for a clip without having to always manually select it from the popup menu. 

2. When playing local video files split with chapters the video always restarts to the beginning of the file when the next subsong index is played instead of displaying the video at the correct time.

Thanks .
 

  • 3dyd
  • [*][*][*][*]
  • Developer
Re: foo_youtube
Reply #863
Sounds feasible. Both will probably be in next version.

  • mire777
  • [*][*][*][*][*]
Re: foo_youtube
Reply #864
3dyd I have one question..

Would all "3dydfy" will be changed to "fy+" and "fy_" and when?
It is important to know what should i change.

Example, "&3dydfy_alt_length=" still works, but if i change that to "&fy_alt_length=" then it doesnt.

Thanks.

  • 3dyd
  • [*][*][*][*]
  • Developer
Re: foo_youtube
Reply #865
Ah, yes, that was not mentioned. Length and any supported property (title, thumbnail_url, view_count etc) can be passed using fb2kx_ prefix (fb2kx_length, fb2kx_thumbnail_url). When adding a clip, they are stripped from URL and corresponding properties are stored to the cache (without overwriting existing ones).