4.0 trigger addon no longer firing?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 4.0 trigger addon no longer firing?

Re: 4.0 trigger addon no longer firing?

by Lowlander » Wed Jan 29, 2014 1:59 pm

Illegal characters should be replaced on sync, if this isn't the case report which characters are causing issues.

You may want to use <Auto Number> or <Random> in your folder/filenames to create unique filenames: http://www.mediamonkey.com/wiki/index.p ... ormats/4.0

Re: 4.0 trigger addon no longer firing?

by wtanksleyjr » Wed Jan 29, 2014 1:50 pm

Changing the name of the trigger doesn't help.

Nobody? Crickets? Help...

OK, if that's no good, then _how can I fix Mediamonkey_????? Right now there's no way to reliably sync podcasts, because all of Mediamonkey's supported fields can be blank, contain characters that are illegal in filenames, or are duplicates of other filenames. No matter what naming I choose, it's ALWAYS possible that MM will happily and without _any_ notice will overwrite a file or put them into a path that can't be accessed.

4.0 trigger addon no longer firing?

by wtanksleyjr » Thu Jan 23, 2014 8:41 pm

I created a plugin for 4.0 that adds a database trigger (it copies the Song.ID field to Song.Custom1 so I can have a guaranteed unique filename for tracks). It's been working since the beta phase.

In 4.1.0.1683 Portable, however, it only works until I exit MediaMonkey. Next time I restart, any newly added tracks have blank fields until I re-install my plugin.

Has something changed in database triggers?

Here's my Install.vbs (Install.ini simply runs this, I don't expect to need to copy the file in):

Code: Select all

' Modify mediamonkey.ini to support the <DB ID> tag.
Dim ini: Set ini = SDB.IniFile
' I should technically look for an unused custom field, rather than just
' taking the first one. Oh well.
ini.StringValue("CustomFields","Fld1Name") = "DB ID"
ini.Flush
ini.Apply

' Preload all known song IDs into the custom field.
SDB.database.execSQL("UPDATE Songs SET Custom1 = ID where Custom1 <> ID")
' Tell the database to automatically place all DB IDs into the Custom1 field
' when new entries are made.
SDB.database.execSQL("drop trigger if exists dbid_maintenance")
SDB.database.execSQL("create trigger dbid_maintenance after insert on Songs" _
                    & " begin UPDATE Songs SET Custom1 = ID" _
                    & "  where rowid=new.rowid" _
                    & "; end")

Top