Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: YouTube Track Manager Discussion (Read 36521 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

YouTube Track Manager Discussion

Awesome work, thanks!

The button text shows up fuzzy and annoying, could you please try to fix that on the next release?


Re: YouTube Track Manager Discussion

Reply #1
replace gb.SetTextRenderingHint(3) with gb.SetTextRenderingHint(0) - do this for the 2nd, 3rd and 4th instances in the script.

Already did that, because I tried to snoop around in the code before I posted. But it still looks soft. Weird. Anyway, thanks! Awesome script!

Re: YouTube Track Manager Discussion

Reply #2
^ Done

New version

Optional media library - can now choose on the "Manage" menu item which media library tracks to prefer: "Highest Bitrate" (default), "Lowest Bitrate", "Longest", "Shortest", "Latest", "Oldest" or "No Preference" (original behaviour). foo_playcount is supported and if installed there are also "Most Played", "Highest Rated" and "Highest Plays Per Day" options. This works whenever media library tracks are loaded instead of YouTube tracks. THESE MENU OPTIONS ARE ONLY AVAILABLE IF "*USER.USE MEDIA LIBRARY" IS ENABLED IN PROPERTIES.

Thanks for this WilB  and foo_playcount options are much better for getting the right track

Re: YouTube Track Manager Discussion

Reply #3
Hello and thanks for the plugin!

I got 4 questions:

1. Why is my interface different than yours? I have installed wsh_panel_mod 1.5.6+ and foo_youtube from here: http://fy.3dyd.com/download/. Got f2k v1.3.8.

[attachment=8347:_______010.png]
[attachment=8345:_______009.png]

2. How do I get that theme?

[attachment=8346:G4Uhymt.jpg]

3. I get a playback error sometimes at 1/2, or 3/4 of the currently playing track. Playback stops and it goes to the next song. If I manage to reproduce it, I'll post a screenshot...

4. How to stop f2k from popping annoying notifications on taskbar everytime songs are changing?

Thanks!



Re: YouTube Track Manager Discussion

Reply #5
Anyway you could save the results form like "Artist top/similer tracks" as a json file (like marc2003's scripts does) so we can access the songs offline??

Re: YouTube Track Manager Discussion

Reply #6
    New version 1.8 (see the readme for  full information & installation instructions) CHANGELOG:


Thnak you for great scripts.

I have two issues.

(1)  There is some problem with searching the 'Korean artist" in 'Korean Character."
      When I make a radio from one of "Korean artists", the resulting songs are not usually what I expected.

(2) Whenever foobar plays the next song from youtube radio, the window changes from the other application to the foobar.

Re: YouTube Track Manager Discussion

Reply #7
    New  Version 1.9   

Fixed  minor issues with library radio and m-TAGS.   

@widerock   

(1)  Thanks for the report. Fixed 'Korean Character' and other character support  with Echonest radio. Last.fm radio was already OK. Nonetheless, some Korean  artists have very few or zero tracks in the Echonest database. Last.fm seemed  fine and so I would recommend using Last.fm radio for Korean artists.   

(2)  I suspect that is due to a foobar2000 setting. Uncheck "Bring to front  when adding new files" in foobar2000\preferences\shell integration to  ensure that foobar2000 does not grab focus away from other applications (see  set up instructions in the readme).


Thank you for the update. Now, I'm enjoying the youtube radio.

Re: YouTube Track Manager Discussion

Reply #8
$if($strstr(%path%,youtube.com/watch?),YouTube  Video,Library Track).

That will do it


And new improvements are excellent!!!
finding new songs has never been this easier

Re: YouTube Track Manager Discussion

Reply #9
Can you please consider adding Artist and Tack Title formatting to your properties dialog
Some tracks with 'feat." artist not properly getting searched

Re: YouTube Track Manager Discussion

Reply #10
Thank you for this WilB

 

Re: YouTube Track Manager Discussion

Reply #11
Could you support the streaming from radio swiss?
I'm listening the radio swiss jazz station from "http://stream.srg-ssr.ch/m/rsj/aacp_96".
But, the 'youtube track manager' panel doesn't update according to the songs played.

Thank you for the useful script.

Re: YouTube Track Manager Discussion

Reply #12
Could you support the streaming from radio swiss?
I'm listening the radio swiss jazz station from "http://stream.srg-ssr.ch/m/rsj/aacp_96".
But, the 'youtube track manager' panel doesn't update according to the songs played.

Thank you for the useful script.


@WilB

Streams return fb.PlaybackLength -1 or 0.

Changing line 146 in script to 

if (fb.IsPlaying && fb.PlaybackLength <= 0) return fb.TitleFormat(n).Eval();

in the this.eval function seems to fix the problem.

Re: YouTube Track Manager Discussion

Reply #13
I just noticed this is the upload forum and I can't edit my previous post. :-[
You should create a separate discussion thread for YouTube Track Manager according to the Forum usage guidelines.

Re: YouTube Track Manager Discussion

Reply #14
YouTube Track Manager

YouTube Track Manager in conjunction with the foo_youtube plug-in enables streaming content within foobar2000.

Tracks can be chosen based on what’s popular or albums selected using last.fm and MusicBrainz discographies. If preferred you can prioritise playing your own music over adding YouTube links. Click tracks or albums to load. YouTube links can be played as audio only or as video.

YouTube Track Manager also offers auto-pick radio modes for artist, genre, similar artists and similar songs playback. These use track popularity data from external sources (last.fm + echonest) or your own data (media library radio).

A nowplaying panel (toggle display with yT button) shows artist, cover & YouTube pictures and provides track & radio mode info. Mouse left click toggles display type. The nowplaying panel can be set to image only (mouse middle click) so it acts like an albumart viewer for any music, if no longer wish to look at lists etc. It can also cycle through multiple artist images.

See the readme for full info.

Requirements

foo_youtube
JScript Panel

Optional components

m-TAGS (foo_tags).

m-TAGS enables automatic generation of m-TAGS files using album track lists from MusicBrainz and last.fm. If the foobar2000\yttm\albums folder is added as a monitored music folder in preferences\media library the albums will show in the media library. This process can be enabled/disabled at any time.

Playback statistics (foo_playcount). This is recommended for optimal performance of the media library radio. The media library radio also works best where you have a reasonable number of tracks to pick from (nowplaying panel shows pool size).

The versions of these components required, and any requirement changes, will be kept up to date in the download link location.

Set-up

Installation:  Add a JScript Panel to the layout in the usual way. Click the JScript panel (or right click and choose configure) to open the editor. Use the tools button to import the YouTube Track Manager script. Finally, it is recommended to optimise settings under foobar2000\preferences\shell integration : (1) Uncheck "Bring to front when adding new files" to ensure that foobar2000 does not grab focus away from other applications. (2) If the default %path_sort% is present in "Sort incoming files by:" change it to something better like %album artist% - %album% - %tracknumber% - %title% to ensure album tracks are loaded in the correct order.

Many options are on the YouTube Track Manager right click menu. Other options are in panel properties (accessed from the right click menu)

Always check near to the end of this thread for the latest download link.



YouTube Track Manager 2.4

Re: YouTube Track Manager Discussion

Reply #15
New Version: YouTube Track Manager 2.5

Fixed a few minor draw issues

YouTube Track Manager 2.5

Re: YouTube Track Manager Discussion

Reply #16
I'd like to know how I can reduce the "Left" border width.
I noticed that the border parameter in panel properties is about "Top' border width.
I use this YouTube Track Manager in the panel of somewhat narrow width. So, I want to use the whole panel width as YouTube Manager width.

Re: YouTube Track Manager Discussion

Reply #17
The border does control the sides. However, if the scrollbar is shown the script applies a minimum to the left margin to balance the space on the right such that the text and horizontal lines etc are properly centred horizontally. I had previously tried doing it other ways, but these ended up not looking right with a discrete scrollbar... To have zero width at the sides, you can hide the scrollbar, set the border to 0 and use the mouse wheel for scrolling:



HTH

Re: YouTube Track Manager Discussion

Reply #18
I'd like to know how I can reduce the "Left" border width.
I noticed that the border parameter in panel properties is about "Top' border width.
I use this YouTube Track Manager in the panel of somewhat narrow width. So, I want to use the whole panel width as YouTube Manager width.

If you are using ColumnsUI , use Panel Stack Splitter with a Forced Layout.



Left: -25
Width : $add(%ps_width%,25)


Re: YouTube Track Manager Discussion

Reply #19
The border does control the sides. However, if the scrollbar is shown the script applies a minimum to the left margin to balance the space on the right such that the text and horizontal lines etc are properly centred horizontally. I had previously tried doing it other ways, but these ended up not looking right with a discrete scrollbar... To have zero width at the sides, you can hide the scrollbar, set the border to 0 and use the mouse wheel for scrolling:
Thank you for your help. That is enough for my usage.


Re: YouTube Track Manager Discussion

Reply #21
New Version: YouTube Track Manager 2.6

Fixed error regression

Various minor refinements

YouTube Track Manager 2.6

Re: YouTube Track Manager Discussion

Reply #22
can you add a option similar in soft playlists :- "Also include partial title matches" or give option to use the title formatting when matching local files
for example:
search string by last.fm:-    "Alesso - Heroes"
matched with:-    "Alesso feat. Tove Lo - Heroes (We Could Be)" in my library 

Removing parentheses may cause to include tracks like "(Acoustic)" but we can use "Track preference" option to negate that :)

I really appreciate continuous improvement on both of your scripts 
Great work!!! :)

Re: YouTube Track Manager Discussion

Reply #23
Add to the previous comment
This is regarding Top similar songs
I use this feature a lot when finding new songs and also find the songs in my library to be queued to  listen next, which is really cool 8)
In case of free song recommendations (spotify ,deezer)  this has been most promising method to find new music for me  :)

I realized that songs songs in last.fm database are linked to titles with "feat." artist and some are not
and some are  linked to feat.xxx "and" yyy rather than to feat.xxx "&" yyy
so it's sad to see this causes to  "Unrecognized song" just because of spelling difference

so if you could implement a set of title formatting (to check another if one fails)

to look for this slimier tracks so we can guarantee a result.
As per local file searching
I think a another set of title formatting can be to used in the local file matching too
Code: [Select]
user.lastFm TF artist 1: $iflonger($trim($substr(%artist%,1,$sub($strstr(%artist%,' feat.'),1))),2,$trim($substr(%artist%,1,$sub($strstr(%artist%,' feat.'),1))),)  //to remove feat. artists

user.lastFm TF artist 2:some title format  //to add feat. artists

likewise
user.local TF artist 1:
user.local TF artist 2:
user.local TF title 1:
user.local TF title 2:
I donno is this possible but it'll be really helpful to get correct similar track results

Re: YouTube Track Manager Discussion

Reply #24
Quote
matching local files...

Simplest solution for local file matching is to just split the artist and title name, so as to remove the unwanted extra info that's causing the match to fail. This is best done with regex since it's past titleformatting.

The code snippet adds two new properties:

Library Use Core Names X-0 Title-1 Artist&Title-2; default: 1
Library Name Split; default: \(|\[|feat

Explanation of Library Name Split regex:

| means OR

So default will split the string at first instance of:
( OR
[ OR
feat

Thus the core name will be the part of the name preceding the split, e.g.

"The Real Thing [Wendy and Lisa Flow Jam Mix]" becomes "The Real Thing"
"Rich Girl (feat. Eve)" becomes "Rich Girl"

You can edit it by adding more etc. Note that special regex characters have to be escaped, e.g.
\( is used not (
\[ is used not [
Its case insensitive and is subsequently trimmed of spaces.

Set Library Use Core Names as needed.

Note that the code snippet doesn't affect album track loading in its current form. Also the artist is checked once for either the original name or, if Library Use Core Names is set to 2, the split name. Running artist queries more than once adds too many permutations.

Title is checked 1st for the original library name and if there is no match it is then checked for the split name. Since mostly last.fm seems to manipulate the title probably setting Library Use Core Names to 1 is best.

Note that I haven't extensively tested it. To use replace the whole of "this.in_library = function ...", lines 282 -290 with the snippet below.

HTH

You can tweak it further so it best suits your needs.

Code: [Select]
    var spl = window.GetProperty(" Library Name Split", "\\(|\\[|feat");
    var simple = window.GetProperty(" Library Use Core Names X-0 Title-1 Artist&Title-2", 1);
    this.in_library = function(p_artist, p_title, i) {
        if (!p_artist || !p_title) return false;
        if (simple == 2) p_artist = p_artist.split(RegExp(spl, "gi"))[0].trim();
        if (p_artist != o_artist || !timer.lib) {if (db_art) db_art.Dispose(); try {db_art = fb.GetQueryItems(this.get_lib_items(), "artist IS " + p_artist + " AND NOT %path% HAS !!.tags")} catch(e) {db_art = p.items}; db_art.OrderByFormat(fb.TitleFormat("$rand()"), 1); db_art.OrderByFormat(ml.item_sort, ml.dir);}
        var n = false, p1 = ""; o_artist = p_artist; p_title = p_title.strip(); timer.lib_upd();
        for (var j = 0; j < db_art.Count; j++) if (tf_t.EvalWithMetadb(db_art.Item(j)).strip() == p_title) {if (db_art.Item(j).Path.slice(-5) != ".tags") {p1 = db_art.Item(j).Path; n = true; break;} else if (!p1) p1 = db_art.Item(j);}
        if (!n && p1) {p1 = tf_i.EvalWithMetadb(p1); if (p1.indexOf("file://") != -1) {p1 = p1.replace("file://", ""); if (p.file(p1)) n = true}}
        if (!n && simple == 1) {
            p_title = p_title.split(RegExp(spl, "gi"))[0].trim();
            for (var j = 0; j < db_art.Count; j++) if (tf_t.EvalWithMetadb(db_art.Item(j)).strip() == p_title) {if (db_art.Item(j).Path.slice(-5) != ".tags") {p1 = db_art.Item(j).Path; n = true; break;} else if (!p1) p1 = db_art.Item(j);}
            if (!n && p1) {p1 = tf_i.EvalWithMetadb(p1); if (p1.indexOf("file://") != -1) {p1 = p1.replace("file://", ""); if (p.file(p1)) n = true}}
        }
        if (n) p.add_loc.push({"path":p1,"id":i});
        return n;
    }

For the other point regarding "Unrecognized song", I thought that's why you requested the title-format options that I already added for you - since these determine what artist - title is actually used for the look up at last.fm. So its up to you how you use title-formatting to manipulate the look up. I am not keen on sending a second request to last.fm with an alternative spelling that may or may not be any better. Autocorrect is already used so simple differences are handled. Consider choosing tracks where you want similar songs carefully.