SQL-Viewer 2.4 [Script] 2009-10-25

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Owyn
Posts: 2018
Joined: Fri Mar 21, 2008 10:55 am
Location: Canada

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by Owyn »

Bex:
Conflict between installing your script and the 1201+ upgrade process adding the new Export to OPML script.

Test case:
Clean install 1190 (new AppData MediaMonkey folder)
Install SQL Viewer
Install / upgrade to 1204.

The Export to OPML section does not get added to scripts.ini.

Works fine if I don't install SQL Viewer.

I think it might be caused by no blank line preceding the SQL Viewer section in scripts.ini.

See Mantis 3252
Cogito cogito ergo cogito sum. (Ambrose Bierce)
I drink therefore I am. (Monty Python)
Vista 32bit Home Premium SP2 / MM3.2.1.1297 Gold / Last.Fm 1.0.2.22 / IE8
Dell Inspiron 530 (1.8 Core2 / 2GB)
Skin: Vitreous Blue
Scripts: Add/Remove Playstat|Advanced Duplicate Find & Fix|Album Art Tagger|Backup|Batch Art Finder|Calculate Cover Size|Case&Leading Zero Fixer|DB_Audit|DB_Clean|DB_Schema|Event Logger|Genre Finder|Lyricator|Magic Nodes|MM2VLC|Monkey Rok|MusicIP Tagger|PUID Generator|RegExp Find & Replace|Right Click for Scripts|Scriptreloader|SQL Viewer|Stats(Filtered)|Tagging Inconsistencies
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by Bex »

Hmm, I don't have any Export to OPML script either. :-? Well, I have the script file but no Scripts.ini entry for it.
I don't think it's due to SQL-Viewer though. It seems that the OPML script fails to install properly (i.e. add the scripts.ini part) if your scripts.ini contains custom scripts. Sounds very strange though.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by nynaevelan »

I have two 3.1 installations, the one with scripts installed I do not have the script.ini entry for opml, the installation without any scripts has both the vbs file and the scripts.ini entry so something must be preventing it from being installed...

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by Bex »

The "Export to OPML"-script issue is fixed by Ludek in build 1205.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by Teknojnky »

Anyone know off hand what the sql update would be to clear all album volume level, only for db? Basically I want to clear it and let MM recalc and update in the background without having to clear it from 150k tracks too.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by nynaevelan »

Here's what I use:

Code: Select all

UPDATE Songs SET NormalizeTrack ='-999999.0' WHERE NormalizeTrack > '-999999.0'
Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
gege
Posts: 866
Joined: Tue Sep 05, 2006 2:10 pm
Location: Brazil

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by gege »

Teknojnky wrote:Anyone know off hand what the sql update would be to clear all album volume level, only for db? Basically I want to clear it and let MM recalc and update in the background without having to clear it from 150k tracks too.
What about Undo Volume Analyzing script?
It is a bit old, but I think it will work, with some tweaks...
You'll probably need to replace these lines...

Code: Select all

Sng.Leveling=-999999
Sng.UpdateDB
Sng.WriteTags
... by these...

Code: Select all

Sng.LevelingAlbum=-999999
Sng.UpdateDB
'Sng.WriteTags
... in order to have Album Leveling cleared (instead of Song Leveling) and only DB updated, not tags.

Of course, it will take you more time to complete the task than an SQL update... :(

Edit: Ok, nyn, you've beaten me :lol:
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by nynaevelan »

Since we're on the subject of sql statements is there a way to create an autoplaylist or an sql statement that would identify albums that have some tracks with an original date??

Gege:

I thought of that but it is not as quick as SQL Viewer...

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by Bex »

Teknojnky wrote:Anyone know off hand what the sql update would be to clear all album volume level, only for db? Basically I want to clear it and let MM recalc and update in the background without having to clear it from 150k tracks too.
This will do it. No WHERE clause is needed since you want to update all tracks:
Album level:

Code: Select all

UPDATE Songs SET NormalizeAlbum =-999999.0
Track level:

Code: Select all

UPDATE Songs SET NormalizeTrack=-999999.0
(You know Tekno, but to others:)
Note that the tag of the tracks is not affected only the database.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by Bex »

nynaevelan wrote:Here's what I use:

Code: Select all

UPDATE Songs SET NormalizeTrack ='-999999.0' WHERE NormalizeTrack > '-999999.0'
Nyn
Even though this one works there is no need to use ' around Number fields. But SQLite is very forgiving and understands it anyway! :)
NormalizeTrack is for tracks I guess you meant NormalizeAlbum.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by Bex »

nynaevelan wrote:Since we're on the subject of sql statements is there a way to create an autoplaylist or an sql statement that would identify albums that have some tracks with an original date??

Gege:

I thought of that but it is not as quick as SQL Viewer...

Nyn
Here you go:

Code: Select all

SELECT ID, Artist, SongTitle, Album, OrigYear FROM Songs WHERE IDAlbum IN
(SELECT IDAlbum FROM Songs 
GROUP BY IDAlbum
HAVING COUNT(CASE WHEN OrigYear<=0 THEN 1 ELSE NULL END)<COUNT(*))
If you want I can add it to TI?
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by nynaevelan »

Yes I would LOVE it if you added it to TI, but can you make one minor adjustment to the SQL, can you add the feature to have the results sent to a playlist? The playlist id is 7447.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by Bex »

Sure!

Code: Select all

INSERT INTO PlaylistSongs (IDPlaylist, IDSong) SELECT ThePlaylistIdHere, Songs.ID FROM songs WHERE bla bla bla
ThePlaylistIdHere=7447
bla bla bla=

Code: Select all

IDAlbum IN
(SELECT IDAlbum FROM Songs 
GROUP BY IDAlbum
HAVING COUNT(CASE WHEN OrigYear<=0 THEN 1 ELSE NULL END)<COUNT(*))
Give this:

Code: Select all

INSERT INTO PlaylistSongs (IDPlaylist, IDSong) SELECT 7447, Songs.ID FROM songs WHERE IDAlbum IN
(SELECT IDAlbum FROM Songs 
GROUP BY IDAlbum
HAVING COUNT(CASE WHEN OrigYear<=0 THEN 1 ELSE NULL END)<COUNT(*))
A new node will added to TI in the next version! :)
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: SQL-Viewer 2.3 [Script] 2008-05-15 [MM3]

Post by nynaevelan »

Thanks for the SQL and the future update to TI.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Post Reply