Hydrogenaudio Forums

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: WilB on 2016-01-21 18:22:12

Title: YouTube Track Manager Discussion
Post by: WilB on 2016-01-21 18:22:12
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.

(http://i.imgur.com/06JNNjQ.png)

YouTube Track Manager 2.4 (https://hydrogenaud.io/index.php/topic,105522.msg914834.html#msg914834)
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-01-28 12:56:25
New Version: YouTube Track Manager 2.5

Fixed a few minor draw issues

YouTube Track Manager 2.5 (https://hydrogenaud.io/index.php/topic,105522.msg915160.html#new)
Title: Re: YouTube Track Manager Discussion
Post by: widerock on 2016-01-29 00:49:54
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.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-01-29 12:40:45
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:

(http://i.imgur.com/EpSj6WM.png)

HTH
Title: Re: YouTube Track Manager Discussion
Post by: zeremy on 2016-01-29 13:29:45
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 (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components_0.9/Panel_Stack_Splitter_(foo_uie_panel_splitter)) with a Forced Layout.

(http://i.imgur.com/WhCYZ30.png)

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

(http://i.imgur.com/A6xbluP.png)
Title: Re: YouTube Track Manager Discussion
Post by: widerock on 2016-01-29 13:56:52
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.
Title: Re: YouTube Track Manager Discussion
Post by: widerock on 2016-01-29 13:59:26
If you are using ColumnsUI , use Panel Stack Splitter (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components_0.9/Panel_Stack_Splitter_(foo_uie_panel_splitter)) with a Forced Layout.

Left: -25
Width : $add(%ps_width%,25)
I'm using DUI. When I use CUI, I'll try your suggestion. Thank you.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-01-30 18:36:17
New Version: YouTube Track Manager 2.6

Fixed error regression

Various minor refinements

YouTube Track Manager 2.6 (https://hydrogenaud.io/index.php/topic,105522.msg915282.html#new)
Title: Re: YouTube Track Manager Discussion
Post by: samithaj on 2016-02-07 09:57:15
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!!! :)
Title: Re: YouTube Track Manager Discussion
Post by: samithaj on 2016-02-07 14:46:59
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
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-02-07 17:54:26
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.
Title: Re: YouTube Track Manager Discussion
Post by: samithaj on 2016-02-08 13:34:42
Thanks for this WilB !!
had to change line 10
if (!n && simple == 1) {
to
if (!n && simple == 2) {
to Artist&Title to work
it works for some instances
artist - title feat.xxx matches to artist - title

but it doesn't match
artist - title feat.xxx  to artist feat.xxx - title
which is the type my most files are tagged (by picard)
can i do this by RegEx??

as for the Top similar songs lookup
I'm already using title-formatting to manipulate the lookup, but the thing is
some songs are linked to titles with "feat." artist and some are not (donno why last.fm fixes this)
i understand if you don't want to send a second request
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-02-10 17:14:10
@samithaj. I made some improvements + implemented

New Version: YouTube Track Manager 2.7

Media Library Track Matching

Added option to properties: "Library: Include Partial Matches 0 or 1" with separate settings for artist and title (set to 1 to enable).

The partial match criteria can be configured in properties with "ADVANCED.Partial Match Config" - see read me for details (search for reg). Fuzzy matching and/or RegExp clean-up are available.

Similar Song Look Ups

The song name is now directly editable, so extraneous info that could be in the auto-search name, e.g. (feat. artist), and that might result in "Song Unrecognised", can be removed. Use | to separate artist and title.

YouTube Track Manager 2.7 (https://hydrogenaud.io/index.php/topic,105522.msg916048.html#new)
Title: Re: YouTube Track Manager Discussion
Post by: samithaj on 2016-02-10 21:14:05
Media Library Track Matching
I had to change  the order of matching
2) Fuzzy  3)RegExp to 2) RegExp 3)Fuzzy in order to title truncating to work
before value "n" has been "true" before RegExp step happens so RegExp step will not happen anyway
dunno what really happened though :/

And for case of matching,
artist - title feat.xxx  to artist feat.xxx - title
I changed line 287 (artist searching IS to HAS)
Code: [Select]
if (!p_artist || !p_title) return false; var q = "IS "; if (trunc_art) {p_artist = p_artist.cut().trim(); q = "HAS ";}

to
Code: [Select]
if (!p_artist || !p_title) return false; var q = "HAS "; if (trunc_art) {p_artist = p_artist.cut().trim(); q = "HAS ";}

this will mess up the result in some rare cases(non for so far) but right now i'm really satisfied with this :)
Couldn't thank you enough for you for helping me to get this result  :D

Quote
Similar Song Look Ups
This is really nice when there is no match
and spend some time reading "YouTube Track Manager Readme.txt" and found some interesting stuff that i did't know before O:) , you've done a great job documenting this also 8)
Title: Re: YouTube Track Manager Discussion
Post by: samithaj on 2016-03-04 16:29:39
I found this API (https://github.com/guoguo12/billboard-charts) that can get charts from Billboard.com (aparently it  scrapes data from thier site-  but it's frequantly updated)
so no direct API. I tried to host this in Google app engine and get output as JSON or some format so WSH panel can read this but i'm having some trouble in getting it to work :/
Is there some way python script and foobar2000 can communicate ??
It'll be great if we can play billboard charts from foobar :)
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-04-15 16:24:10
^ Sorry but I can't help on this occasion.

New Version: YouTube Track Manager 2.8

Minor optimisations

YouTube Track Manager 2.8 (https://hydrogenaud.io/index.php/topic,105522.msg920388.html#new)
Title: Re: YouTube Track Manager Discussion
Post by: FooChick on 2016-04-15 23:50:48
Thanx for 2.8. - and the very informative Read Me file!
You're doing a great job. Can't live without Y.T.M.  :-)
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-05-31 13:29:22
New Version: YouTube Track Manager 2.9

CHANGELOG

AUTO-PICK RADIO MODES

Last.fm

Music recommendation is now powered exclusively by last.fm, following the demise of the Echonest api. The listening habits of millions of music lovers are analysed to help you find your new favourites. Loads YouTube links (audio only & video) or available library tracks.

Offers single artist, genre/top tags, similar artists or similar songs styles of discovery

Library radio

This avoids YouTube links and uses your own track popularity data in conjunction with in-built algorithms to auto-pick tracks. Offers single artist, genre/top tags and similar artists styles of playback.

Both last.fm and library radio modes are great for listening to music of a chosen style

ALBUM MODES and m-TAGS AUTO-GENERATION

Minor refinements

TOP 40 CHART

Added item to right-click menu to get the UK top 40 singles chart. Loads YouTube links etc into a playlist. The on-line chart source employed updates weekly on Fridays after ~1900 UK time.

If YouTube links loaded are not to your liking, then the main foobar2000 context menu\Youtube Source has options for replacing them with other links. Alternatively, YouTube Track Manager can black list them to permanently stop particular links from being reloaded by the script.

YouTube Track Manager 2.9 (https://hydrogenaud.io/index.php/topic,105522.msg923192.html#new)
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-06-01 18:49:54
New Version: YouTube Track Manager 3.0

Fixed regression in album mode.

YouTube Track Manager 3.0 (https://hydrogenaud.io/index.php/topic,105522.msg923261.html#new)
Title: Re: YouTube Track Manager Discussion
Post by: Elevory on 2016-06-06 20:15:01
This is really fantastic, thank you.
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2016-06-12 05:46:39
I agree - it is a fantastic plugin!!

Two ideas came to my mind when using the radio mode

1. add an optional additional filter for the selected youtube titles. I found that the chosen youtube tracks vary strongly with their sound quality (from cd versions to live versions with 'improvable' sound quality). This reduces fun when I just use it as a radio. Of course the question is which available parameter would correlate to sound quality... I think two ways could improve the selection: one would be to set a minimum number of youtube views (e.g. 100k) - as I found that poor sound quality often has less views- , another would be to exclude tracks with specific key words in the youtube description (e.g. 'live').

2. as I do not rate my library tracks - is there the possibility to have a Last.FM-selection for tracks purely from the library (which of course would mean to jump to next Last.FM proposed track until available in the library)?

But again: I really love it already as it is!
Title: Re: YouTube Track Manager Discussion
Post by: YOGAM on 2016-06-25 10:11:04
That's such an amazing script ! Thank you very much WilB.

However, I have a question, I'd like to create "similar artists Radios" using only my own music library, exept for bootlegs (because of the usualy poor quality).
In order to pick only local tracks, I used properties to change SYSTEM.Library Radio to "true". It seems to work fine (guess I was lucky). However, so far, I could exlude bootlegs tack.
Is there a way to do this ? All the bootleg tracks have a specific tag (%BOOT% tagged with 'Bootleg") so I guess I have to find a way to exclude all the tracks from my library including the %BOOT% tag.
Any help would be greatly appreciated. Thanks !
 
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-09-04 17:20:21
New Version: YouTube Track Manager 3.1

SUMMARY: Added new library radio mode & the ability to create Soft Playlists

CHANGELOG

IMPROVED AUTO-PICK RADIO MODES

Three modes are now offered. The mode is set using the right-click menu: "New Radio...\> Radio..."

Last.fm (similar to before)

Offers music recommendation powered by last.fm. The listening habits of millions of music lovers are analysed to help you find your new favourites. Loads YouTube links (audio only & video) or available library tracks

Offers single artist, genre/tag, similar artists or similar songs styles of discovery

Library Radio

Avoids YouTube links & now has two modes. Both offer single artist, genre/tag & similar artists styles of playback with the iSelect mode also offering the similar songs style of playback

iSelect

Offers internet based selection of tracks from the media library. The library is filtered for tracks in last.fm top tracks lists. Last.fm playcounts & in-built algorithms are employed to bias towards playing the better tracks. This mode avoids the need to have foo_playcount installed to auto-pick library tracks based on track popularity data

Artist variety, which sets the target number of artists, and/or track popularity settings control the pool size of available tracks

Last.fm lists are cached so search speed should improve as local copies are used. To see the search progress, use the nowplaying panel (toggle with yT button). iSelect radio loads, and can be played, as soon as there are enough tracks with any outstanding searches added in the background

MySelect

Uses all your library tracks that match the radio type. "MySelect" employs your own playcounts or ratings & in-built algorithms to bias towards playing favourites or you can pick tracks randomly or by other parameters. Artist variety settings apply. This is the same as the previous library radio apart from a few minor refinements

SOFT PLAYLISTS

iSelect library radio can create Soft Playlists of last.fm top tracks found in the media library, from the lists it uses. These are last.fm related playlists, sorted by last.fm playcount, like those created by foo_softplaylists. You can then play them in any order you like. Soft Playlists can be created for top tracks of an artist, top tracks of a genre or certain tag, top tracks of similar artists & top tracks similar to a song

Offers flexible options + favourites menu + improved speed & robustness as cached last.fm top tracks lists become used

To create Soft Playlists use the right-click menu to:
(1) Set "New Radio...\> Radio..." to "iSelect / Save Soft Playlists"
(2) Choose the music...
(3) By default Soft Playlists activate on create; this behaviour can be changed in panel properties

To see the search progress, use the nowplaying panel (toggle with yT button). iSelect radio still creates & is available

A configurable timeout is available (panel properties: "ADV.Radio iSelect Search Timeout...)

ALBUM MANAGER and m-TAGS AUTO-GENERATION

Minor optimisations

TECHNICAL CHANGES

Nowplaying panel

ADD: Display of track pool sizes for all radio stations. Some refine as more loaded

ADD: New panel properties of "Nowplaying Font" and "Nowplaying Font Max Size". These together with "Image Size.." & "Border" settings make adjustment easier.

ADD: Customisable "Image [Artist] Folder Location" [save &/or load] to panel properties. Supports cycling of artist images, as before. Clicking an image or text toggles display modes

Radio

CHANGE: Improved radio playlist handling

ADD: Configurable radio names for "Last.fm Radio", "iSelect Radio" & "MySelect Radio"... personalise as required in panel properties: "Radio Names..."

ADD: Customisable "Genre/Tag" menu (panel properties: "ADV.Radio Genre/Tag Menu"). Tags can also be searched by typing in the "Open Tag Search..." on the same menu

ADD: Individual settings for 'Best Tracks' bias for all 3 radio modes (panel properties). Range: 10-fold (high) to 1 (no bias - random). High bias favours highly ranked tracks & low bias diversity; e.g. try turning down to 2-fold for more variety. 'Best Tracks' are those with highest last.fm playcount (last.fm & iSelect) or highest playcount, rating or other parameter (MySelect). Bias level affects how tracks are picked from a pool but doesn't change the pool size

ADD: Display of all last.fm feed sizes in panel properties. "Artist" values apply to each artist of "Similar Artists" etc styles. "Genre/Tag" Top Tracks & "Similar Song" defaults are higher as these are single lists. Cap limits apply (see documentation). Last.fm radio may lower the auto-pick range below the feed size for artists lacking sufficient popular tracks commensurate with the preset. For iSelect radio & Soft Playlists creation, the library is always analysed against the full set feed size, to give the best chance of finding a reasonable number of tracks

General

CHANGE: Simplified menus

ADD: YouTube 'Live' Filter. Use to reduce YouTube 'live' versions etc. This is a keyword etc filter applied to the YouTube title & description. Enable/disable in panel properties (default is enabled). It auto-disables if YouTube searches requires a keyword & so should work fine whenever YouTube links are requested. Also consider black listing unwanted YouTube versions for full control & enabling YouTube Track Manager to use the media library if you're only listening to audio ("Manage\Library" menu), so less YouTube links are required

ADD: Configurable YouTube link choice. Either favour those with the most views or most relevance (panel properties: "ADV.YouTube Prefer Most: Relevant-0 Views-1"). Default is relevance & unchanged from before, since in my tests so far it performed better

ADD: "ADV.Library Filter..." to panel properties. Normally this should be left blank to ensure YouTube Track Manager uses the whole media library. However, it enables certain categories of tracks to be excluded from the library copy used by YouTube Track Manager. Enter a query using foobar2000 query syntax. Ensure queries are valid and doing what you want, e.g. test with album list filter. Example usage: bootlegs, but not other tracks, have the field %boot%; bootlegs can then be excluded from the library copy used by YouTube Track Manager using "boot MISSING" (without quotes)

PANEL PROPERTIES, SETTINGS & FURTHER INFO

Always ensure comma "," separators are retained where used. If you break a panel property, it can be reset by delete -> apply. If more info is needed, search the documentation for keywords. The foobar2000 console should report website access issues

YouTube Track Manager 3.1 (https://hydrogenaud.io/index.php/topic,105522.msg927732.html#new)
Title: Re: YouTube Track Manager Discussion
Post by: YOGAM on 2016-09-05 13:06:22
With the "MEDIA LIBRARY FILTERING" feature, I could exclude tracks coming from bootlegs (e.g : demos, lives...) from the library copy used by YouTube Track Manager . It's just great !

I'm sure many users will find this feature very useful, even if they don't have bootlegs in their music collection ( for instance, you can  use "MEDIA LIBRARY FILTERING" in order to exclude official live recordings).

Thanks WilB ! I'm very grateful you include this in your script !!

(BTW sorry I posted my last message on the wrong thread).
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-10-18 00:06:43
New Version: YouTube Track Manager 3.2

CHANGELOG

Improved iSelect library radio and Soft Playlists. These now use last.fm feeds that are auto-refined, where required, to give better track pools (like last.fm radio)
This behaviour can be switched off, e.g. to always build Soft Playlists from full set feeds like foo_softplaylists ("ADV.Feed..." in panel properties). "Refine" is best left on with last.fm radio

As always, if tracks are not popular enough or too popular, or Soft Playlists are too short or long, it's easy to choose a different preset from the menu

YouTube Track Manager 3.2 (https://hydrogenaud.io/index.php/topic,105522.msg929669.html#new)
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-11-04 22:50:58
New Version: YouTube Track Manager 3.3

CHANGELOG

Fixed search paste issue with long search text

Fixed regression with artist image fetcher. This fetcher is the same as the one in JScript biography. If you use both YouTube Track Manager & JScript biography only enable the auto-fetcher in one as the folder location will still be "live" monitored by both (default is disabled in YouTube Track Manager & enabled in JScript biography)

YouTube Track Manager 3.3 (https://hydrogenaud.io/index.php/topic,105522.msg930481.html#new)
Title: Re: YouTube Track Manager Discussion
Post by: nikolai4ik on 2016-11-09 09:18:34
Hi I've had this script installed for a long time but never really bothered with its Youtube abilities as I used it to check MusicBrainz info.
I have a problem with it - sometimes it says unrecognized artist like here http://i.imgur.com/pUBmPrH.png

And also the YT button in the top right corner - is it possible so when I click it the youtube player opens instead of just artist picture and name?
Title: Re: YouTube Track Manager Discussion
Post by: widerock on 2016-11-11 07:52:51
After I update my foobar to ver 1.3.13, I've got the error message "internal error - can not access configuration folder" whenever I try to do something with youtube track manager.

My foobar is in the portable mode.
And I tried to execute foobar with administrator privilege. And, the result is the same error.

I'm not sure if this problem is related with foobar.exe or youtube track manager.

Any help or comment would be appreciated.
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2016-11-11 12:35:58
I am having the same problem for the Radio mode. Have as well portable installation.
What works is to close the foobar window, then click on a remaining foobar error pop-up with the same message (which appears at least in my case), and then foobar starts again automatically and works without any issues.
BTW, the YTTM is an absolutely great tool!!
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-11-11 17:17:53
@nikolai4ik: I have fixed the MusicBrainz issue & enabled the youtube player behaviour in my copy. They will be in the next release.

@widerock & Mojobass: I think I have isolated the issue. See here (https://hydrogenaud.io/index.php/topic,113061.msg930807/topicseen.html#new).
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-11-11 22:28:59
New Version: YouTube Track Manager 3.5

CHANGELOG

ADD: Ability of YouTube Track Manager nowplaying panel to show the foo_youtube video player; this requires foo_youtube_preconf version.

FIX: Occasional parsing bug in album manager.

FIX: Add locations issue when using recent foobar2000 versions in portable mode.

Download link: YouTube Track Manager 3.5 (https://hydrogenaud.io/index.php/topic,105522.msg930835.html#new)

Video player usage:

1) Navigate to now playing panel by left click of yT button. Toggle video vs image mode by mouse middle click of yT button whilst in nowplaying mode. Toggle nowplaying text show/hide by mouse middle click of text. Middle button actions are also on "Manage" menu.

2) Occasionally, the video player appearance may be out of synchronization with the toggles. Click the foobar2000 main menu item: click "View\Visualizations\Youtube Video" to re-synchronize (JScript panel can't determine the on/off state)

Video player set-up:

1) In "foobar2000\Preferences\Youtube source\Video", set show and hide video frame "Manually".

2) Overlay the video player on top of YouTube Track Manager. Position and size as required. Optionally optimise the set-up by configuring window settings and fallback text. It's recommended to enable "window: Lock relative to main window" & "Fix to current".

3) See the foo_youtube documentation for more info.

Limitations:

As the foo_youtube video player can't be embedded in JScript panel, the above works by overlaying the pop-up version. Since it's a pop-up panel it doesn't resize with foobar2000, but can be set to move with foobar2000, and will show if you change layout.

Also foo_youtube_pre_conf (I tried 1.17.2) may currently have a stability issue if both an integrated Youtube video element and a pop-up Youtube video are run together. The pop-up Youtube video window on its own should be fine. I believe 3dyd is in the process of fixing the issue when the two instances are running. But I decided to go ahead & release now because of the more critical portable mode issue that should now be fixed.

@nikolai4ik

The reason for "Nothing Found" with blink-182 was because Musicbrainz didn't use the standard hyphen, and the text match comparison failed - now fixed. There are other cases of non-standard use of characters by MusicBrainz that the script was handling.

Another reason for "Nothing Found" is as follows. Album manager requires musicbrainz_ids (mbids) to get the lists, so that different artists of the same name can be discriminated. If the mbid isn't set in the file tag, the script analyses the artist search list returned, and uses the mbid of the first matching artist. If the artist tag is incorrect it may not find a match. Even if the artist tag is OK, occasionally the artist won't be the correct one, and if they don't have any releases then "Nothing Found" will show. Examples where the the first match is an unpopular artist without any releases are: "Robyn" (returns a reggae artist as 1st match) & "Dido" (returns a DraMatiQue artist as 1st match). Usually the correct artist, as in these cases, can be picked from the related artists pane where disambiguation is displayed.

For taggable files its possible, to write the mbid into the file which the script will read, and so the correct artist will load. The script checks the %musicbrainz_artistid% & %musicbrainz artist id% fields. Easy ways of adding the mbid info is documented on HA if you search. Radio streams cannot be tagged and although its possible with YouTube tracks, the info will be lost if the item isn't retained in a playlist, so I doubt that's its worth it. None of my files have mbid tags - I use the related artists pane.
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2016-11-12 04:28:25
Add locations issue in portable mode fix confirmed for my config.
That was quick, thanks!
MojoBass
Title: Re: YouTube Track Manager Discussion
Post by: nikolai4ik on 2016-11-13 11:22:44
New Version: YouTube Track Manager 3.5
Wow fantastic, thanks a lot! Very quick update and awesome instructions. Can youtube source auto find and play youtube videos for songs I am listening to? Doesn't seem so unfortunately.

I have musicbrainz tags on some files and "nothing found" still happens by the way - http://i.imgur.com/sm1GNS6.png

Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-11-13 13:00:30
Maroon 5 with %musicbrainz_artistid% tag value the same as yours: 0ab49580-c84f-44d4-875f-d83760ea2cfe is working for me.

I suspect there is a server access issue. There have been a lot of problems accessing MusicBrainz servers for quite a long time now. If the album names look up fails then "Nothing Found" will also be the result. Because of this, the script tries the main MusicBrainz server 5 times and if that fails falls back to trying a mirror server. But sometimes the main server is too busy (global rate limit exceeded) & the mirror also fails. I believe MusicBrainz are in the process (I am not sure if they've finished yet) of migrating to a new server, and that might also have caused some issues. Hopefully, when the new server is fully working things will improve.

Youtube source has some options if right click a track in a playlist, but I don't think they do exactly what you are looking for.
Title: Re: YouTube Track Manager Discussion
Post by: widerock on 2016-11-15 23:32:25
New Version: YouTube Track Manager 3.5

CHANGELOG
FIX: Add locations issue when using recent foobar2000 versions in portable mode.

Thank you for the quick fix. No more error message after this update.
Title: Re: YouTube Track Manager Discussion
Post by: Lasternom on 2016-11-17 23:18:45
Wow, amazing !!! I've been looking for a plugin that does something like this. And it works like a charm !!!

I'm wondering what is your next step ?
I've been using an old marc2003 script for a Musicbrainz list of all the artist albums that also gives a musicbrainz link for example:
https://musicbrainz.org/release-group/c1163e02-afd5-4455-9179-5161c6d2b125

I'm wondering if you ever plan to add something like that ? An option in the panel properties so when you click on something instead of it being added to your playlist it opens a browser and goes to the correct page on the musicbrainz site. 

My apologies if it's a rude to ask.
You already have my gratitude for your awesome work  :) !!

Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-12-05 18:07:27
New Version: YouTube Track Manager 3.6

Download link: YouTube Track Manager 3.6 (https://hydrogenaud.io/index.php/topic,105522.msg931847.html#new)

CHANGELOG

Updated requirements

CHG: JScript panel 1.1.6.2+ - required
CHG: foo_youtube_preconf 1.17.3+ - recommended (more info here (https://hydrogenaud.io/index.php/topic,105522.msg931847.html#new))
Thanks to 3dyd & marc2003 for new features / enhancements to these plugins.

Nowplaying display

CHG: Better integration with foo_youtube video player:
- Auto fall back to artist photos / album art (+/- text info), if no video
- Auto show better synchronized

CHG: Status button now shows mode:
    yT - YouTube Track Manager Text mode
    yI - YouTube Track Manager Image mode
    yV - YouTube Track Manager Video mode

Set mode with mouse:
    Status button:
        Left click: toggles "nowplaying" vs "album manager" display
        Middle click (nowplaying panel): toggles "Video" vs "Image" mode
    Image / Info:
        Left click: toggles display of cover or YouTube images vs artist photos or info type
        Middle click: toggles show / hide info
    Middle button actions are also on "Manage" menu

For best video results:
- Set show and hide video frame "Manually" ("foobar2000\Preferences\Tools\Youtube source\Video")
- Overlay the video player on top of YouTube Track Manager. Position and size as required.
- In the video player right click menu it's recommended to enable:
    - window: Lock relative to main window
    - window: Show video only
    - Fix to current

Add locations

CHG: The newly enhanced plman.AddLocations method for adding locations is now the default method. The foobar2000 add locations method is still available (set in panel properties: "ADV.Add Locations..."), at least while the new method is fully evaluated.

Musicbrainz release group

ADD: Alt + left click of an album name in MusicBrainz mode now opens the release group at the MusicBrainz site. The standard left button click action is unchanged.

Panel properties

CHG: A few panel properties will be reset & redundant removed; this effects the nowplaying font name & size + whether or not custom colours are enabled.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-12-08 19:56:56
New Version:  YouTube Track Manager 3.7 (https://hydrogenaud.io/index.php/topic,105522.msg932108.html#new)

FIX: Path parsing issue that might affect a few users.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2016-12-17 13:17:10
@MojoBass

If the search_title contains a keyword in the YouTube Track Manager Live filter, the filter will auto-disable, e.g. if you're searching for "XXX (live)", you want a live version and so the results will not be filtered for "(live)". With regex [a-zA-Z] you're essentially saying if the search_title contains a-z or A-Z, switch off the filter - so it will pretty much always switch off. So yes it's the "auto-disable if searching YouTube requires a keyword".

Checking keywords in album list filter is one possible way of quickly checking their specificity. If it finds lots of tracks its a bad keyword, e.g. "live" on its own has too many false matches. Although the YouTube Track Manager filter would auto-disable say if "live" is a keyword in the YouTube Track Manager filter & searched for "I live here", "I live here (live)" would then be accepted. But if the keyword was "(live)", i.e. with the parentheses, then "I live here" would be accepted and "I live here (live)" would be  rejected.

Regarding copying a list of 125 radio songs. If they're in a playlist then you can use normal playlist handling methods. But if what you mean is you want to do 125 searches in one go, then no. It just results in too many calls in one go to remote servers.
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2016-12-28 05:39:03
Hello WilB,
thanks for your answer! But probably I am too dumb but I think I still did not really get it...

I try to make an example to explain what I try to do:
When I do radio search (e.g. via New Radio/Search for Similar Songs/Chaka Khan | Ain't Nobody), I would like to restrict the youtube results to youtube titles, that contain a specific keyword (like 'vevo') either in the title or the description (on top of your LastFM-based selection algorithm - which is great!)
My understanding of the fields "ADV.YouTube 'Live' Filter Title" and "ADV.YouTube 'Live' Filter Description" is that all matches with YT title or YT description are excluded.
Therefore, the phrase
Code: [Select]
^((?!vevo).)*$
should give only YT tracks who have 'vevo' in the title or descripton (and - of course - match the LastFM-based selection process from your code).
So yes it's the "auto-disable if searching YouTube requires a keyword".
Is there a way to switch off the auto-disable to ensure the above behaviour?

Regarding copying a list of 125 radio songs. If they're in a playlist then you can use normal playlist handling methods.
Again I refer to the above example:
If I do a Radio search (e.g. via New Radio/Search for Similar Songs/Chaka Khan | Ain't Nobody) with the selection 'Tracks: popular', the display of the YTTM window shows me, that there are 125 matches (which is good :-)). In the playlist 'Radio', I see a max of 25 titles from the overall title pool of 125 tracks (which is good for me as well, as the Radio playlist is automatically filled up when playing). Of course it is easy to copy the 25 tracks from the playlist 'Radio' to any other playlist with standard foobar handling.
However, I would like to copy all 125 tracks e.g. to 'my_playlist' in one instance. As I could not find any YTTM-playlist containing all 125 tracks, I still do not know how this could be done...
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2017-02-11 17:13:02
New Version: YouTube Track Manager 3.8 (https://hydrogenaud.io/index.php/topic,105522.msg935523.html#new)

Thanks for the feedback.

CHANGELOG

CHG: Improved default handling of m-TAGS albums. Dead YouTube links are now auto-replaced where possible (must have the script default !!.tags suffix). Auto-synchronisation is particularly useful if m-TAGs files are loaded into the media library. As this is a new feature, consider backing up any m-TAGS created by YouTube Track Manager. m-TAGs can be auto created, as before, by album manager from MusicBrainz & last.fm album track lists.

m-TAGS are checked daily on playing a new m-TAGS file. Dead library track references in m-TAGS can also be auto-replaced where possible (default off). Enable/disable auto-replace in panel properties: ADV.m-TAGS...".

ADD: Customisable scrollbars (panel properties).

CHG: Zoom. Ctrl + Alt + mouse wheel are now required to zoom the font and button sizes on mouse over rather than just Ctrl + mouse wheel.

ADD: Options to favour certain YouTube video types (panel properties), e.g. "vevo" videos: Enable with "ADV.YouTube 'Preference' Filter". Set keywords with "ADV.YouTube 'Preference' Keywords" (regex format). Selection requires matching a keyword, in title or description, & satisfying the normal criteria. If no match, defaults to normal method.

ADD: Ability to get links for Top 10 - 40 etc artist tracks / similar songs in addition to Top50s: set range in panel properties ("Load Menu TopTracks Size 1-50").

ADD: Ability to use your own api keys (panel properties): "ADV.API Key YouTube" + "ADV.API Key Last.fm". If both are used, script limits don't apply, e.g. "Radio Playlist..." size becomes unlimited and "Load Menu TopTracks Size..." can be > Top50, e.g. Top100 etc.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2017-02-15 21:37:27
New Version: YouTube Track Manager 3.8.1 (https://hydrogenaud.io/index.php/topic,105522.msg935691.html#new)

CHANGELOG

Fix for change at last.fm
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2017-03-11 05:06:23
Hello WilB,
I am a heavy user of this script - it is really great work!
I still try to work on narrowing the Radio selections of youtube links further down for a 'improved quailty' radio. Maybe this is sure to fail - however I am still trying...
It took me quite some time to understand that even if the 'Youtube Preference  Filter' is switched on, the Radio playlist entries are not purly entries which match the keyword (eg 'vevo') - it is more a preference to select the best fitting youtube link for a specific selected track.
I tried to change this in your code to a behaviour that only tracks are listed in the Radio playlist, where the keyword is actually found. I tried several option such as
Code: [Select]
if (index.pref_yt(video_name, video_descr) && mv != -1) return p_i; 
if (p_i == p_done) return -1;
instead of
Code: [Select]
if (index.pref_yt(video_name, video_descr) && mv != -1) return p_i; 
if (p_i == p_done) return mv;
in the this.IsGoodMatch function - however it did not work (I have to admit I am not a js programmer and your code is very sophisticated). Any hint what to change?

The other thing which would be helpful would be an (optional?) inclusion of the uploader name in the search for keywords via the 'Youtube Preference  Filter'. I would have tried to code this on my own by extending
Code: [Select]
this.pref_yt = function(title, descr) {if (title && title.match(RegExp(youtube_pref_filter, "i"))) return true; if (descr && descr.match(RegExp(youtube_pref_filter, "i"))) return true; return false;} 
  to e.g.
Code: [Select]
this.pref_yt = function(title, descr) {if (title && title.match(RegExp(youtube_pref_filter, "i"))) return true; if (descr && descr.match(RegExp(youtube_pref_filter, "i"))) return true; if (uploader && uploader.match(RegExp(youtube_pref_filter, "i"))) return true; return false;} 
- which of course does not work as the uploader data is not existing in your code. I tried as well adopt the code to make the uploader available in the code - but failed again. Any chance that you could include that in the code?
Best regards, MojoBass
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2017-03-19 17:42:53
New Version: YouTube Track Manager 3.9 (https://hydrogenaud.io/index.php/topic,105522.msg936952.html#new)

CHANGELOG

ADD: YouTube 'Preference' filter now analyses the uploader name in addition to the title and description. Use to favour certain video types, if required. Enable & set keywords with ADV.YouTube 'Preference'... in panel properties. The first priority is always to analyse YouTube search results for those that match the key search criteria, i.e. artist - title, and that aren't blocked by the "Live" filter or black list etc. The preference filter is then applied to the resulting "match list".

Keywords are in regex format (case insensitive), with // as an optional RegEx.Split. Splitters direct searching of the whole "match list" before trying the next keyword. There is no limit to the number of splitters. The foobar2000 console will report syntax errors in custom regular expressions. Examples:

vevo > prefer vevo > return first item in "match list" containing vevo
vevo|warner > prefer vevo or warner > return first item in "match list" containing either vevo OR warner
vevo//official > prefer vevo then official > return first item in "match list" containing vevo; if nothing found re-check "match list" and return first item in "match list" containing official
audio|lyric > prefer audio or lyric > return first item in "match list" containing either audio or lyric > favours videos that don't have introductions before the music starts (useful if you just listen to the audio; use just lyric for more lyric versions)
^(?=.*vevo)(?=.*lyric).*$//vevo|warner//lyric > a more complex example > runs 3 checks on the "match list", one after another, since it contains splitters:
^(?=.*vevo)(?=.*lyric).*$ > return first item in "match list" containing both vevo AND lyric
vevo|warner > if nothing found, return first item in "match list" containing either vevo OR warner
lyric > if nothing found, return first item in "match list" containing lyric

If no preference is found, the first item in "match list" is returned. Applying the preference filter to the "match list" rather than the whole YouTube search results is necessary to avoid returning wrong tracks that match a preference keyword.

If the preference filter is off, the first item in "match list" is returned.

If there are no items in the match list the first YouTube hit not blocked by the "Live" filter or black list is returned, or failing that the top YouTube hit. The track is named accordingly. Usually it will be the correct track; it's just that it's not been possible to match the artist - title name. That can arise because of inconsistencies in YouTube naming, e.g. some don't contain the artist name, or the way certain tracks are named by last.fm.

For anyone interested in refining preference keywords, "ADV.YouTube 'Preference' Verbose Log..." can be enabled. This will output the basics of what's going on to the foobar2000 console.

@MojoBass
I've added your request as described above. The possibility of restricting to "vevo only" is more problematical because lots of tracks don't have vevo videos + many artists don't seem to have any "vevo" at all. So for such tracks / artists nothing would load, when there may well be perfectly good "non-vevo" videos. In my tests on average 1 in 3 or 4 tracks had a "vevo" video, varying between ~ 2 in 3 for newer popular tracks, and ~ 1 in 10 for older music. So I think a preference filter, now improved, that retains fallback to other videos is the best option. Multiple uploaders etc can be specified. Also consider black listing any unwanted videos (simple right click) so they don't load again (provided there's an alternative). It's the most specific method.
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2017-03-26 05:22:13
Hello WilB,
I think the added functions on filtering are great. As well the console is a great help.
The only thing: I am not too sure if the new filter machanism is working as intended. From the console it seems that I get quite some false matches. See for example this console log where I used your proposed filter ^(?=.*vevo)(?=.*lyric).*$//vevo|warner//lyric:
Code: [Select]
YouTube Track Manager: Match List. Search Artist: Björk; Search Title: It's Oh So Quiet
[
   {
      "ix": 1,
      "uploader": "Björk",
      "title": "björk - it's oh so quiet",
      "descr": "It's Oh So Quiet Directed by Spike Jonze. Written by Hans Iang/Bert Reisfeld. Published by Peer Music (UK) Ltd. ® 1995 BjörkOverseas Ltd/One Little Indian ..."
   },
   {
      "ix": 4,
      "uploader": "BjorkTv",
      "title": "Björk  - It's Oh So Quiet (Official Music Video)",
      "descr": "Directed by Spike Jonze. Written by Hans Iang/Bert Reisfeld. Published by Peer Music (UK) Ltd. ® 1995 BjörkOverseas Ltd/One Little Indian Records Ltd."
   },
   {
      "ix": 8,
      "uploader": "Ernesto Aguilera",
      "title": "Björk - It's Oh So Quiet",
      "descr": "Soon, in true high definition Directed by Spike Jonze. Written by Hans Iang/Bert Reisfeld. Published by Peer Music (UK) Ltd. ® 1995 BjörkOverseas Ltd/One ..."
   },
   {
      "ix": 19,
      "uploader": "Taratata",
      "title": "My Taratata - Nagui - Björk \"It's oh so quiet\" (Live 2005)",
      "descr": "Dans son Taratata à lui, Nagui a choisi de revoir la venue de Björk dans Taratata, reprenant le célèbre \"It's oh so quiet\". It's oh so quiet H. Lang - B. Reisfeld ..."
   },
   {
      "ix": 20,
      "uploader": "Music",
      "title": "Björk - It's Oh So Quiet - Post",
      "descr": "Björk - It's Oh So Quiet (Track 4) - Post (1995)"
   },
   {
      "ix": 21,
      "uploader": "Lip Sync Battle on Spike",
      "title": "Joel McHale performs Björk's \"It's Oh So Quiet\" | Lip Sync Battle",
      "descr": "Joel McHale (Jeff Winger, \"Community\") pulls out all the stops against former co-star Jim Rash (Dean Craig Pelton, \"Community\") during his sync of Björk's 1995 ..."
   }
]
YouTube Track Manager: Match Found. Search Artist: Björk; Search Title: It's Oh So Quiet; Video Loaded: ix: 1; Video Title: björk - it's oh so quiet
In ix:1 there is non of the keywords contained.
I checked as well keywords like '12345nevermatchthis54321', which gave a match in basically all cases. On the other hand, just using 'q' gave quite some tracks, where no match was found at all.
Could it be that the filter is matching not by word, but by letter?
Best regards, MojoBass
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2017-03-28 18:28:07
New Version: YouTube Track Manager 3.9.1 (https://hydrogenaud.io/index.php/topic,105522.msg937386.html#new)

CHANGELOG

Minor changes to YouTube 'Preference' filter. Can now choose which fields it should check. Choice of Uploader, Title & Description. Recommendation is Uploader and Title; Description may lack specificity with certain keywords like "lyric". "ADV.YouTube 'Preference' Verbose Log..." is now more informative.

@MojoBass
It seems to be working as intended. I think the console output was a bit ambiguous before & you interpreted it incorrectly. The console in the new version should be better. It can show which preference keyword is matched.
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2017-04-01 04:55:22
Hello WilB,
thanks very much, now I got it and the plugin works great!!
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2017-07-26 18:56:19
New Version: YouTube Track Manager 3.9.2 (https://hydrogenaud.io/index.php/topic,105522.msg942683.html#new)

CHANGELOG

FIX: Compatibility with foo_youtube 2.0
Title: Re: YouTube Track Manager Discussion
Post by: TheQwertiest on 2017-07-27 11:32:14
New Version: YouTube Track Manager 3.9.2 (https://hydrogenaud.io/index.php/topic,105522.msg942683.html#new)

CHANGELOG

FIX: Compatibility with foo_youtube 2.0
Thanks! Plays nicely with 2.0 now =)
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2017-07-28 05:16:43
New Version: YouTube Track Manager 3.9.2 (https://hydrogenaud.io/index.php/topic,105522.msg942683.html#new)

CHANGELOG

FIX: Compatibility with foo_youtube 2.0
Great!! (I was about to ask...)
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2017-08-24 15:45:12
New Version: YouTube Track Manager 3.9.3 (https://hydrogenaud.io/index.php/topic,105522.msg944077.html#new)

CHANGELOG: Various optimisations
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2017-08-24 19:15:20
New Version: YouTube Track Manager 3.9.3.1 (https://hydrogenaud.io/index.php/topic,105522.msg944088.html#new): Minor fix
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2017-08-27 16:38:31
New Version: YouTube Track Manager 3.9.3.2 (https://hydrogenaud.io/index.php/topic,105522.msg944214.html#new)

CHANGELOG: Fix minor regression.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-01-24 18:24:29
New Version: YouTube Track Manager 3.9.4 (https://hydrogenaud.io/index.php/topic,105522.msg951755.html#new)

CHANGELOG:

ADD: Themes: dark, blend & light (right click > menu > manage > theme). Option to always use cover for blur image (Image Blur Background... [panel properties]).
ADD: Image reflection (right click > menu > manage > image). Settings: panel properties + strength can also be adjusted by shift + mouse wheel over image.
ADD: Image smooth transition effect on image change (right click > menu > manage > image).
ADD: Button Colour: Last.fm/MusicBrainz: can now be set to use neutral theme colours instead of site colours (panel properties).
ADD: MusicBrainz discography: related artists pane now has auto-associations: remembers last chosen for a particular search artist name.
FIX: Radio: optimisations.
FIX: Compatibility with JScript Panel v2.0.1.
Title: Re: YouTube Track Manager Discussion
Post by: TheQwertiest on 2018-03-01 12:56:34
I'm not sure if this is a bug on the side of the YT Track Manager, but some artists are not recognized even if there is a corresponding page on Last.FM. May be it has something to do with unicode symbols in their names.

Example:
Artist: '2814' (note that this is unicode and not just '2814')
Example track with the said artist: https://www.youtube.com/watch?v=8OJdVsDAveE&list=PLIF1NhpQPux8pMJZogX3I40IPu8V-dH5i
Last.FM page: https://www.last.fm/ru/music/2814/
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-03-01 17:37:49
I've made a few changes for the next release so that those scenarios should be better handled.

More info:

MusicBrainz discography look-ups require an mbid. If that isn't in a music file tag, as is commonly the case, or its a YT video etc,  the script has to search MusicBrainz for the mbid by artist name.

In your example, MusicBrainz uses "2814" as the artist name, and  "2814" wasn't matched due to the Unicode symbols. The result was no mbid & no auto-lookup of the MusicBrainz discography.

However, the related artist pane (click "≡") does list other close matches & "2814" was there & could have been clicked to load all. Such selections are remembered. Incidentally, last.fm also uses "2814" apparently as the main name of this artist and has a "2814" page (Quote from last.fm. "2814 (formerly known as 2814) is a collaborative project...". ).

Anyway, I've added a second MusicBrainz match test for the next release which re-checks after doing an $ascii conversion of the search artist. In your example, the auto-match then succeeds. So mbid is found & MusicBrainz discography loads. Last.fm discography then also loads. This should increase the robustness of the auto-look-ups. This method might change if a better method emerges. There may still be occasional cases where its necessary to use the related artists pane - it works with both MusicBrainz and last.fm discographies.

Last.fm discography look-ups use the mbid, and if there are no results, fall back to trying the artist name. I've fixed an issue for the next release where the fall back wasn't working under certain scenarios.

Thanks for reporting.
Title: Re: YouTube Track Manager Discussion
Post by: TheQwertiest on 2018-03-02 09:51:03
Thanks! Hope you release it soon :P
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-03-02 12:38:02
It looks like there are some efficiency improvements in the next JScript panel version (2.0.5?) that may benefit both YouTube Track Manager & Library Tree. So I was planning to wait for that before releasing new versions.
Title: Re: YouTube Track Manager Discussion
Post by: TheQwertiest on 2018-03-02 15:17:00
It looks like there are some efficiency improvements in the next JScript panel version (2.0.5?) that may benefit both YouTube Track Manager & Library Tree. So I was planning to wait for that before releasing new versions.
Well, same here actually :P
Though I need both updated JScript and your scripts for that...
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-03-26 12:59:04
New Version: YouTube Track Manager 3.9.5 (https://hydrogenaud.io/index.php/topic,105522.msg954813.html#new)

CHANGELOG

CHG: Improved MySelect mode

MySelect is a media library only mode. It provides automatic selection of media library tracks based on a chosen style and play history:

1) Choose pool of tracks. Now supports foobar2000 query syntax + offers similar artists styles (default 50), etc.
e.g. Genre IS Rock AND %Date% AFTER 1979 AND %Date% BEFORE 1981. Gives a pool of rock tracks from the 80s

2) Choose how to play tracks from the pool, e.g. favour highest rated or most played etc. Bias configurable. Optional library filter for a further boost, e.g. exclude tracks rated < 2:

SEE GRAPH BELOW

Played tracks are normally removed from the playlist & new added. Upcoming tracks can be seen & directly played. The aim is that a track shouldn't repeat within 100 (or pool size if lower) and multi-artist styles shouldn't repeat an artist within 5 tracks, if possible. Resets on opening new. Now playing panel can show pool size. Most display items are interactive on click. Favourites menu automatically saves recent choices.

Settings for MySelect:
Enable: right click -> new radio -> radio -> MySelect. Common choices then show on the new radio menu.
Filter menu: right click -> manage -> library -> filter (filters are customisable (panel properties ["ADV.Library Filters MySelect..."]).
Bias: change if required: panel properties ["ADV Radio Best Tracks Bias..."]. The recommended bias for MySelect mode is 10 (default) or 5.

MySelect mode is likely to work best with good play count or rating data. If you don't have that, the iSelect mode instead uses last.fm top tracks data to select pools of media library tracks. MySelect & iSelect modes don't use YouTube.

ADD: Titleformat definitions for play count and rating (panel properties ["Titleformat..."]). These fields are mainly used by MySelect mode. Rating can now be set to use DADA Auto-Rating or other autorating methods as well as standard rating methods. Autorating methods work immediately provided you have playback statistics data, and don't normally modify music files.

CHG: Nowplaying text: shadow effect now optional (panel properties).
FIX: MusicBrainz & last.fm discographies: search optimisations.
FIX: For YouTube.
CHG: Efficiency improvements due to implementation of new changes to JScript panel (thanks to marc2k3).
FIX: Some improvement in artist matching during video search.
FIX: Compatibility with updated plman.AddLocations in JScript panel 2.1.0+
Title: Re: YouTube Track Manager Discussion
Post by: TheQwertiest on 2018-04-09 13:53:04
Hm... Encountered a bug: MusicBrainz>All returns "Nothing Found" for "Muse" artist. Wonder what's causing it?
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-04-09 15:35:45
MusicBrainz release look-ups require a musicbrainz_artistid. If that's not in a file tag (%musicbrainz_artistid%), MusicBrainz is searched with the artist name to look it up. The problem then comes when there is the more than one artist of the same name, and it's not clear which is the correct one, and the script defaults to using the first hit. In the case of "Muse", MusicBrainz returns 6 different artists of that name. Consequently, the first match in the list gets used by default & that's not the popular one - in fact it's so unpopular it doesn't have any releases!

Try choosing the related artists pane ("≡") which shows available disambiguation & pick the one required: likely: UK rock band. The choice should be remembered so the next time "Muse" is used it should pick the correct one. An automated way is to consider tagging files with %musicbrainz_artistid% which is checked first, but that's not possible with all music sources.

As far as I can tell, last.fm is essentially name based, and so the issue is much less likely to arise.
Title: Re: YouTube Track Manager Discussion
Post by: TheQwertiest on 2018-04-09 17:27:12
... that's not the popular one - in fact it's so unpopular it doesn't have any releases!
Talk about pitiful... -_-

Try choosing the related artists pane ("≡") which shows available disambiguation & pick the one required: likely: UK rock band. The choice should be remembered so the next time "Muse" is used it should pick the correct one.
Darn, forgot about that feature, even though you've told me about it just a few posts back! >_<
Thanks! =)

An automated way is to consider tagging files with %musicbrainz_artistid% which is checked first, but that's not possible with all music sources.
I've considered doing that in the past, but failed to conquer my laziness....
Title: Re: YouTube Track Manager Discussion
Post by: dreadroach on 2018-04-10 14:01:14
I have a problem lately: last.fm artist's top tracks by playcount are not accurate when i compare it to last.fm site.
Instead of most popular songs i get random obscure ones, often demos or live tracks in the list.
I tried to revert to older version of the script, i even tried to use clean installation of foobar with only this script installed (and required components) but it didn't help, so i don't know what could be the problem? I'm using foo 1.4 beta 11, latest jscript panel and youtube components.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-04-10 16:23:56
Yes, I noticed it this morning.

It seems to be a last.fm bug/caching issue that surfaced a few days ago. The api isn't returning what's requested & the list is commonly starting at track 101, not track 1.

I've seen it before in some other scenarios & believe I know how to workaround it. A fix is in progress...
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-04-10 17:50:48
New Version: YouTube Track Manager 3.9.5.1 (https://hydrogenaud.io/index.php/topic,105522.100.html#msg955693)

CHANGELOG

CHG: Draw optimisations.
CHG: Extended field remapping options in panel properties. Separated into "Titleformat (Web Search)...", which require a single look up value, and "Library Search..." that can utilise multivalue tags (panel properties).
ADD: Last.fm Artist Top Tracks workaround to mitigate buggy last.fm api returns.
Title: Re: YouTube Track Manager Discussion
Post by: dreadroach on 2018-04-10 19:24:42
Works great, thank you for the quick fix
Title: Re: YouTube Track Manager Discussion
Post by: nikolai4ik on 2018-04-10 19:51:37
3.9.5.1 crashes for me while 3.9.5 works fine
JScript Panel v2.1.0.2 (YouTube Track Manager v3.9.5 by WilB): initialised in 23 ms
Error: JScript Panel v2.1.0.2 (YouTube Track Manager v3.9.5.1 by WilB)
Microsoft JScript runtime error:
Object doesn't support this property or method
File: <main>
Line: 95, Col: 5
<source text only available at compile time>
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-04-11 11:39:56
^ It looks like you were running under the JScript engine & found an incompatibility.

New Version: YouTube Track Manager 3.9.5.2 (https://hydrogenaud.io/index.php/topic,105522.msg955737.html#new)

FIX: Compatibility with JScript engine.

I would recommend using the 'Chakra' script engine if possible (requires IE9 or later). Set in the JScript panel configuration window (shift + right click).
Title: Re: YouTube Track Manager Discussion
Post by: nikolai4ik on 2018-04-22 08:21:24
I never use the radio features, is it possible to stop this panel creating empty playlists?
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-04-27 17:04:43
@nikolai4ik
I've changed the behaviour for the next version.
Title: Re: YouTube Track Manager Discussion
Post by: Sergey77 on 2018-06-15 19:58:21
Hi!
Dear @WilB,
during use YouTube Track Manager 3.9.5.2
I noticed the following:
if mouse click on the empty area (see attached pic., the click area shown by arrow), the error message appears (see attached pic. JSError)
Please check it.

Thanks.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-06-17 12:11:55
I was able to reproduce the issue and it should be fixed in the next version.

Thanks for the report.
Title: Re: YouTube Track Manager Discussion
Post by: mjm716 on 2018-09-16 12:03:29
YYTM seems to always focus on the now playing track and I would like it to focus on the active selection.

Is there a way to control focus?
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-09-17 10:26:38
It wasn't originally added because of incompatibility with video display, which has to follow the nowplaying track. Anyway I've added "Selection Mode" for the next version; it will be available in modes that don't display the video.
Title: Re: YouTube Track Manager Discussion
Post by: mjm716 on 2018-09-17 12:04:33
your support always goes above and beyond - thanks for adding so much to my FB experience!

(https://i.imgur.com/tPO02W7.jpg)
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2018-11-28 05:40:06
Still very much like+use this plugin!
One question: when loading a youtube track via yttm, the youtube playcount is not shown anymore (which I used for an additional filter via the Skip Track plugin).
When loading the same youtube track directly via foo_youtube, the playcount is available, as shown in the comparison of the properties of the identical youtube track below.
Any hint on how to get the playcount as well with the YTTM plugin?
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2018-12-02 06:21:40
Still very much like+use this plugin!
One question: when loading a youtube track via yttm, the youtube playcount is not shown anymore (which I used for an additional filter via the Skip Track plugin).
When loading the same youtube track directly via foo_youtube, the playcount is available, as shown in the comparison of the properties of the identical youtube track below.
Any hint on how to get the playcount as well with the YTTM plugin?
Forgot my configuration: foobar2000 v1.4.1, JScript Panel v2.1.8, YTTM v3.9.5
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2018-12-07 11:41:42
I presume you mean the view count, rather than playcount as the only playcount in the pics is 0 in both cases.

View count, and population of the Youtube source fields, is handled by the foo_youtube plugin and so a fix likely requires a bug fix in the foo_youtube plugin itself. For info, there is some difference in handling between loading by YTTM and standard direct loading, i.e. script uses the metadata overriding feature, so artist & title etc are correct, and so the bug likely relates to that. In my tests, the current behaviour is erratic: sometimes view count is present with those sent by YTTM, other times it's missing.

If you really mean view count, then consider pointing 3dyd at this thread to see if it can be fixed.
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2018-12-09 04:52:14
I presume you mean the view count, rather than playcount as the only playcount in the pics is 0 in both cases.
You are right, I was looking for the view count, not the playcount

View count, and population of the Youtube source fields, is handled by the foo_youtube plugin and so a fix likely requires a bug fix in the foo_youtube plugin itself. For info, there is some difference in handling between loading by YTTM and standard direct loading, i.e. script uses the metadata overriding feature, so artist & title etc are correct, and so the bug likely relates to that. In my tests, the current behaviour is erratic: sometimes view count is present with those sent by YTTM, other times it's missing.

If you really mean view count, then consider pointing 3dyd at this thread to see if it can be fixed.
I will do that
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2019-01-20 17:50:49
New Version: YouTube Track Manager 4.0.0 (https://hydrogenaud.io/index.php/topic,105522.100.html#msg967373)

NEW: Improved menu options.

NEW: Touch Control (enable: menu > options > mode)***.

NEW: Selection Mode (set: menu > options). N/A in prefer video mode: videos can't follow selected track.

CHG: Playlists: now only created if required.

CHG: Requires Spider Monkey Panel (https://hydrogenaud.io/index.php/topic,116669.0.html) - if you're unfamiliar with it, then it's based on JScript Panel but has a modern Javascript engine. Spider Monkey Panel can be run alongside JScript Panel, & so other panels can continue to run in JScript Panel if you don't have Spider Monkey Panel versions.

*** for an extra scroll experience, if you don't have a touch screen, enable touch control and drag with left mouse button down.

Updating
Panel properties will be reset as its a new panel. Export JScript panel properties or back-up layouts before updating if you want a record. Importing JScript panel properties isn't supported: panel properties have been overhauled & more key options are now on the menu.
Title: Re: YouTube Track Manager Discussion
Post by: TheQwertiest on 2019-01-21 10:11:11
Congratulations on releases!

Here is a congratulatory bug report =)
When right-clicking anywhere the following script error occurs:
Code: [Select]
Error: Spider Monkey Panel v1.1.5-beta+63bde4e (YouTube Track Manager v4.0.0 by WilB)
list.blacklist is undefined

File: Panel_YT.js
Line: 3549, Column: 54

Stack trace:
  blacklistMenu@Panel_YT.js:3549:54
  MenuItems/this.rbtn_up@Panel_YT.js:3585:17
  on_mouse_rbtn_up@Panel_YT.js:3752:49

PS: Panel_YT.js is your script.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2019-01-21 13:07:48
Thanks for the report.

I couldn't reproduce the issue under normal usage.

However, it looks to me as though the blacklist file has become corrupted and isn't in a valid json format for some reason or another, although I've not seen the script write it incorrectly. I could reproduce the effect by manually editing the blacklist file so it wasn't valid. Can you try deleting fb.ProfilePath\yttm\blacklist.json (or rename if you want to keep it) and see if the issue disappears? If that's what it is, I can add some extra validity checking to stop the script error etc.
Title: Re: YouTube Track Manager Discussion
Post by: TheQwertiest on 2019-01-21 13:36:35
Hm... I think that it might be a bug in SMP...
Nvm, see below...
Title: Re: YouTube Track Manager Discussion
Post by: TheQwertiest on 2019-01-21 13:44:24
The problem was caused by an extra new line ('\r\n') in the old `blacklist.json` (generated by foo_jscript_panel). JSON parser does not approve of such symbols :D
[EDIT]: Nvm, investigating further...
[EDIT_2]: Yup, it's a bug in SMP, will be fixed in v1.1.5.
[EDIT_3]: v1.1.5 posted. The bug was caused by incorrect parsing of files encoded in UCS-2 LE (i.e. wide char).
Title: Re: YouTube Track Manager Discussion
Post by: Sergey77 on 2019-01-22 14:30:42
Hi there!
@WilB, thanks for your cool script!
I noticed some differences in design between the JSP and SMP versions:
1. font color (see cursor.jpg)
2. align the highlighted text vertically (see word "Affection" at cursor.jpg)
3. horizontal line color (see line.jpg)
please check it, is this how it should be? or need to lead to uniformity.

Thanks!
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2019-01-22 16:59:37
Thanks for the feedback

1) Font colour: highlighted text. This seems to effect CUI not DUI. The next version should behave the same way as JSP.
2) Text vertical alignment. I noticed this a long time ago and queried it here (https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/20). Essentially there are some minor differences at the pixel level between SMP & JSP. I prefer the SMP way on my machine. Changing the vertical size of the layout by 1, 2 or a few pixels might alter the rounding.
3) Line colour. It was a design choice to tone the line intensity down a little, as I thought they were a bit bright before.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2019-01-25 11:46:44
New Version: YouTube Track Manager 4.0.1 (https://hydrogenaud.io/index.php/topic,105522.100.html#msg967655)

FIX: Nowplaying view: Artist images should now cycle correctly.
FIX: Corrected font colour of selected text (CUI).
FIX: Corrected slight inaccuracies in text vertical alignment with certain fonts. Behaviour should now be similar to the JScript panel version.
CHG: Added "Lines Embolden" to panel properties. If enabled, lines should render the same as in the JSP version, for users preferring that style.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2019-06-10 12:36:20
New Version: YouTube Track Manager 4.1.0 (https://hydrogenaud.io/index.php/topic,105522.100.html#msg972267)

NEW: Black list for images (right click > menu > image). Designed to filter out occasional unwanted LFM artist images. Black list is also used by Biography.
CHG: Updated scrollbar handling. New default button icons + auto-minimises & auto-hides by default. Behaviour & look can be set as previous on settings > display > scrollbar menu.
CHG: Various optimisations.
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2019-07-10 17:38:12
New Version: YouTube Track Manager 4.1.1 (https://hydrogenaud.io/index.php/topic,105522.100.html#msg973091)

FIX: Updated due to changes at lfm.
NEW: SeekBar for image scrolling in nowplaying image view. Enable menu > options > image > seekbar. Displays if > 1 image.
FIX: Draw regressions.
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2019-07-14 08:16:45
Hi WilB,
thanks for the update! Unfortunately, it crashes in my config: Foobar 1.5 beta 2, Spider Monkey Panel 1.2.1, see attachment. Version 4.1.0 works fine.
Any hint from your side?
MojoBass
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2019-07-14 12:04:26
New Version: YouTube Track Manager 4.1.2 (https://hydrogenaud.io/index.php/topic,105522.msg973199.html#new)
FIX: Issue with new image seekbar handler.

@MojoBass Thanks for the feedback. I think the issue should be fixed.
Title: Re: YouTube Track Manager Discussion
Post by: MojoBass on 2019-07-14 16:46:00
Works perfect, thanks, WilB!
Title: Re: YouTube Track Manager Discussion
Post by: WilB on 2019-11-08 18:05:34
New Version: YouTube Track Manager 4.1.3 (https://hydrogenaud.io/index.php?topic=105522.msg977220#msg977220)

NEW: Circular artist & cover images in nowplaying view (menu > options > image > circular).

NEW: Image seeker & counter options:
    - Seeker now supports clickable dots for image selection, as well as bar style. Both can be dragged.
    - Counter now optional + can be displayed on its own.
    - Settings: menu > image > seeker & counter.

CHG: Various optimisations.

FIX: Top 40 Singles Chart. Updated to work with site change.
SimplePortal 1.0.0 RC1 © 2008-2019