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: WSH Panel Mod script discussion/help (Read 1394730 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

WSH Panel Mod script discussion/help

Reply #3625
@fuffi, discogs only ever showed releases which is why i suggested musicbrainz as an alternative. it looks like you've got them confused with last.fm similar artists which does contain all the other feeds you listed. make sure you have the common8.js linked directly above as i've had to set a new api key.


I'm sorry to bother u all again, I guess, I confuse things, but can somebody tell me, what script (or component?) is responsible for showing this:
 
This is what i see, after right-clicking inside the WSH-Panel, which is configured in ColumnsUI.

WSH Panel Mod script discussion/help

Reply #3626
I don't understand white page with the new common8.js !!!!!
Even after delete all data in WSH-data ....


which script/setting/artist? can you right click the panel>open containing folder and check the contents of the file it's pointing to.

depending on what you're trying to look at, there is no guarantee that you'll get results on everything. if it's last.fm charts, the one month track option does not work. this is a problem at last.fm's end.



It's oK now, all delete and reinstall.
Thanks

WSH Panel Mod script discussion/help

Reply #3627
@fuffi, try reading the bit you quoted again. if that fails, i suggest getting your eyes tested.

WSH Panel Mod script discussion/help

Reply #3628
@fuffi, try reading the bit you quoted again. if that fails, i suggest getting your eyes tested.

its rather understanding than eyes, but it workes again.  8-)

after deleting all files in the "wsh_data" and recognizing that "last.fm similar artists" is actually a file called "last.fm similar artists.txt", i understand now, that only the "discogs.txt" will not work, because of your writing. "last.fm similar artists.txt" will offer my mentioned features and it works without the "discogs.txt", which i thought was important for me.

so sorry for the whimsical me :-) and thank you for taking time and giving help outside the digital world.

WSH Panel Mod script discussion/help

Reply #3629
Started getting this error recently:

Code: [Select]
Last.fm Playcount Sync: Contacting Last.fm.... 
Last.fm Playcount Sync: {"error":26,"message":"Suspended API key - Access for your account has been suspended, please contact Last.fm","links":[]}

WSH Panel Mod script discussion/help

Reply #3630
right click>Update script.

(files on dropbox have now been updated with the fix)

WSH Panel Mod script discussion/help

Reply #3631
Is there any way for a WSH to detect gaps in the track numbers within an Artist & Album?    This would be useful to detect incorrectly numbered tracks that could reveal an error in the whole file's tagging that occurred for whatever reason.  I'm picturing a process that for example would sort the library by Artist+Album+Tracknumber, then look for any numbering gaps and if found, display the 2 files with the gap in-between into a playlist for the user to evaluate for problems.  Or perhaps this is not possible?

WSH Panel Mod script discussion/help

Reply #3632
it's certainly possible. i might have a go at this sometime as it shouldn't be much more than a 10-20 lines of code.

WSH Panel Mod script discussion/help

Reply #3633
you can try this...

Code: [Select]
var album_tf = "%album artist%|%album%|%date%|%discnumber%";

//hack to create empty handle list
fb.CreatePlaylist(plman.PlaylistCount, "WSH SPAM");
var EMPTY = plman.GetPlaylistItems(plman.PlaylistCount - 1);
plman.RemovePlaylist(plman.PlaylistCount -1);

function on_mouse_lbtn_dblclk() {
    var items = plman.GetPlaylistItems(plman.ActivePlaylist);
    if (items.Count == 0) return;
    var new_items = EMPTY.Clone();
    var current_album = "", temp_album;
    var album_track = 1, track = 1;
    for (var i = 0; i < items.Count; i++) {
        temp_album = fb.TitleFormat(album_tf).EvalWithMetadb(items.item(i));
        if (temp_album != current_album) {
            current_album = temp_album;
            album_track = 1;
        }
        track = fb.TitleFormat("$num(%tracknumber%,0)").EvalWithMetadb(items.item(i));
        if (track != album_track) {
            if (i > 0) new_items.Add(items.item(i - 1));
            new_items.Add(items.item(i));
            album_track++;
        }
        album_track++;
    }
    if (new_items.Count > 0) {
        plman.CreatePlaylist(plman.PlaylistCount, "WSH suspicious items");
        plman.ActivePlaylist = plman.PlaylistCount - 1;
        plman.InsertPlaylistItems(plman.ActivePlaylist, 0, new_items);
    } else {
        fb.ShowPopupMessage("Everything seems ok!");
    }
}

it's just a blank white panel that you double click to run. it uses the active playlist so make sure it contains all your music and is sorted.

WSH Panel Mod script discussion/help

Reply #3634
@marc2003

Code: [Select]
//hack to create empty handle list
fb.CreatePlaylist(plman.PlaylistCount, "WSH SPAM");
var EMPTY = plman.GetPlaylistItems(plman.PlaylistCount - 1);
plman.RemovePlaylist(plman.PlaylistCount -1);

Here is an easiest way to create an empty handle list object:

Code: [Select]
var EMPTY = plman.GetPlaylistSelectedItems(-1);



WSH Panel Mod script discussion/help

Reply #3635
ah, that's nicer. it means there is nothing left cluttering the playlist restore menu. thanks.

WSH Panel Mod script discussion/help

Reply #3636
Kinda works, although the results in the "WSH Suspicious Items" playlist shows the entry before the gap, and then every entry after the gap, but repeated, except the last one isn't repeated, weird.    So when the original playlist shows tracks numbered
1
2
3
4
5
7
7
8
9
10

with a gap between 5 and 7 (7 being accidentally repeated),  the resulting playlist shows

5
7
7
7
7
8
8
9
9
10

Thanks for whipping this up so quick, BTW...

WSH Panel Mod script discussion/help

Reply #3637
i must admit, my testing consisted solely of removing odd tracks from albums and then it worked...

it might be easier for me to mark the whole album as bad rather than trying to sort the differences between incorrectly numbered tracks. i'll post back when i've had a play.

WSH Panel Mod script discussion/help

Reply #3638
@trelain, try this.

Code: [Select]
var album_tf = "%album artist%|%album%|%date%|%discnumber%";
var EMPTY = plman.GetPlaylistSelectedItems(-1);

function on_mouse_lbtn_dblclk() {
    var items = plman.GetPlaylistItems(plman.ActivePlaylist);
    if (items.Count == 0) return;
    var current_album = "", temp_album, album_track , track, album_is_good = true;
    var album_tracks = bad_albums = EMPTY.clone();
    for (var i = 0; i < items.Count; i++) {
        temp_album = fb.TitleFormat(album_tf).EvalWithMetadb(items.item(i));
        if (temp_album != current_album) {
            if (!album_is_good && album_tracks.Count > 0) {
                bad_albums.AddRange(album_tracks);
                album_tracks.Dispose();
            }
            album_tracks = EMPTY.clone();
            album_is_good = true;
            current_album = temp_album;
            album_track = 1;
        }
        track = fb.TitleFormat("$num(%tracknumber%,0)").EvalWithMetadb(items.item(i));
        if (track != album_track) album_is_good = false;
        album_tracks.Add(items.item(i));
        album_track++;
    }
    if (bad_albums.Count > 0) {
        plman.CreatePlaylist(plman.PlaylistCount, "WSH suspicious items");
        plman.ActivePlaylist = plman.PlaylistCount - 1;
        plman.InsertPlaylistItems(plman.ActivePlaylist, 0, bad_albums);
    } else {
        fb.ShowPopupMessage("Everything seems ok!");
    }
    album_tracks.Dispose();
    bad_albums.Dispose();
}

if problems are detected with any track within an album, it sends the whole album to the playlist as it's much easier for me to do that.

WSH Panel Mod script discussion/help

Reply #3639
Here's my final script , with current selected language in title , available downloaded languages on a second row and a fix in the get() function not to download
when json returns {artists: null}.


Nice seeing more sources for various infos, thanks.

You guys ever thought of doing requests?

Would love to see alternative, non-music, sources for infos (imdb, goodreads, soundtrackcollector, etc.), but don't have a clue how to do it myself. Some tutorial would be amazing as well.

WSH Panel Mod script discussion/help

Reply #3640
Mmm, now it appears to not be recognizing either the repeated track number '7' scenario I described above, or a gap caused by a missing file (removing #6, no dups), it's returning "Everything seems ok" for both conditions...

WSH Panel Mod script discussion/help

Reply #3641
it's working fine for me with both of those scenarios??? 

i've now edited to give a report at the end. this is what should happen:

example of duplicate track numbering (first number is generated by script, 2nd is actual value from tag)

Code: [Select]
-------------------------------------------------------------------
new album detected
HAIM|Days Are Gone|2013|1
1 => 1
2 => 2
3 => 3
4 => 4
5 => 5
6 => 6
7 => 6 (bad)
8 => 8
9 => 9
10 => 10
11 => 11
this album had mistmatched tracks. adding to playlist.

example of 1st track missing which throws off the matching for the entire album

Code: [Select]
-------------------------------------------------------------------
new album detected
Ivy|In The Clear|2005|?
1 => 2 (bad)
2 => 3 (bad)
3 => 4 (bad)
4 => 5 (bad)
5 => 6 (bad)
6 => 7 (bad)
7 => 8 (bad)
8 => 9 (bad)
9 => 10 (bad)
this album had mistmatched tracks. adding to playlist.

example of correctly tagged album

Code: [Select]
-------------------------------------------------------------------
new album detected
Abraham|On The Surface|2001|?
1 => 1
2 => 2
3 => 3
4 => 4
5 => 5
6 => 6
7 => 7
8 => 8
this album checked ok

updated code:

Code: [Select]
var album_tf = "%album artist%|%album%|%date%|%discnumber%";
var EMPTY = plman.GetPlaylistSelectedItems(-1);

function on_mouse_lbtn_dblclk() {
var items = plman.GetPlaylistItems(plman.ActivePlaylist);
if (items.Count == 0) return;
var current_album = "", text = "", temp_album, album_track , track, album_is_good = true;
var album_tracks = bad_albums = EMPTY.clone();
for (var i = 0; i < items.Count; i++) {
temp_album = fb.TitleFormat(album_tf).EvalWithMetadb(items.item(i));
if (temp_album != current_album) {
if (!album_is_good) {
text += "this album had mistmatched tracks. adding to playlist.\n";
bad_albums.AddRange(album_tracks);
album_tracks.Dispose();
} else if (i > 0) {
text += "this album checked ok" + "\n";
}
text += "-------------------------------------------------------------------\n";
text += "new album detected\n";
text += temp_album + "\n";
album_tracks = EMPTY.clone();
album_is_good = true;
current_album = temp_album;
album_track = 1;
}
track = fb.TitleFormat("$num(%tracknumber%,0)").EvalWithMetadb(items.item(i));
if (track != album_track) album_is_good = false;
text += album_track + " => " + track + (track != album_track ? " (bad)" : "") + "\n";
album_tracks.Add(items.item(i));
album_track++;
}
if (bad_albums.Count > 0) {
plman.CreatePlaylist(plman.PlaylistCount, "WSH suspicious items");
plman.ActivePlaylist = plman.PlaylistCount - 1;
plman.InsertPlaylistItems(plman.ActivePlaylist, 0, bad_albums);
} else {
text = "everything seems ok!\n\n" + text;
}
fb.ShowPopupMessage(text);
album_tracks.Dispose();
bad_albums.Dispose();
}

edited so report shows even with no problems.

WSH Panel Mod script discussion/help

Reply #3642
That is better... with the change to unconditionally show the report, it does show the bad entry with the "seems ok" msg:

everything seems ok!

-------------------------------------------------------------------
new album detected
Stevie Wonder|Talking Book|1972|?
1 => 1
2 => 2
3 => 3
4 => 4
5 => 5
6 => 7 (bad)
7 => 7
8 => 8
9 => 9
10 => 10


However when the playlist contains multiple artists or even multiple albums for the same artist it is not working for me, even when they display properly sorted.

WSH Panel Mod script discussion/help

Reply #3643
That is better... with the change to unconditionally show the report, it does show the bad entry with the "seems ok" msg:


i cannot reproduce/explain that so i'm out of ideas. i didn't make any changes to the code in the previous script - i only added the reporting.

Quote
However when the playlist contains multiple artists or even multiple albums for the same artist it is not working for me, even when they display properly sorted.


how different albums are detected are defined by the title formatting on the very first line of the script. you can edit it if you like. multiple/various artists per album shouldn't matter so long as you have a consistent album artist across all tracks. if you don't then each track will probably get detected as a new album - which you'd see in the report at the end.

WSH Panel Mod script discussion/help

Reply #3644
I just started getting API issue today...came here and saw that you said to click "update script" Unfortunately it's not working for me.

" The script reports that the update file has not been found. It could be a temporary problem with dropbox but if this error persists then it is most likely due to support stopping for this version. Check the hydrogenaudio thread or the full zip for updates."

All my components are up-to-date if that's a potential issue. I had a lot of trouble getting this to work properly to begin (not good with scripts >.>) with so reinstalling the whole thing is not what I want to do if it's avoidable.

WSH Panel Mod script discussion/help

Reply #3645
if you don't want to upgrade scripts, you'll have to download this theme from deviantart to get a fixed file....

http://www.deviantart.com/art/yuck-foo-upd...-2015-466739797

with foobar closed, browse inside the zip\marc2003 folder and copy the file named common7.js. put this file inside your own marc2003 folder.

WSH Panel Mod script discussion/help

Reply #3646
Hi,

Here is JSPlaylist, my new jscript, available on my DA page here

It's a playlist viewer and a little bit more ... i hope you'll enjoy it


WSH Panel Mod script discussion/help

Reply #3647
nice!!!!!!!!!! i left a few thoughts on your DA page. 

WSH Panel Mod script discussion/help

Reply #3648
Quote
However when the playlist contains multiple artists or even multiple albums for the same artist it is not working for me, even when they display properly sorted.


how different albums are detected are defined by the title formatting on the very first line of the script. you can edit it if you like. multiple/various artists per album shouldn't matter so long as you have a consistent album artist across all tracks. if you don't then each track will probably get detected as a new album - which you'd see in the report at the end.


Ok sorry, my problem was various %date% entries across a greatest hits album, when they should have just been just in the original release date and the one common release date of the greatest hits in all the %date% entries.    After that correction it works much better.    thank you.

WSH Panel Mod script discussion/help

Reply #3649
if you don't want to upgrade scripts, you'll have to download this theme from deviantart to get a fixed file....

http://www.deviantart.com/art/yuck-foo-upd...-2015-466739797

with foobar closed, browse inside the zip\marc2003 folder and copy the file named common7.js. put this file inside your own marc2003 folder.


It's not that I didn't WANT to upgrade the scripts, the "update scripts" button just isn't working. I'll try this solution though, thanks. I still love you. This project has been my hero since I found it a few years back.

edit: Still getting API suspended error. Maybe it's the real deal rather than just an error? How would I go about fixing this. THis is the only thing I use it for so I don't know why they would suspend it. Maybe I could delete it and make a new one?

edit:2.  Error gave me a link to dropbox but the link gave me a 403. dropbox's homepage is giving me 403 errors on 2 different computers and my phone (4g, not on router). Works sometimes though...guess they're having issues.