Database Export\Import\Sync(DEISync) v2.3.5 (09-10-08) [MM3]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

Why I wrote 1181 but was looking at 1081 I don't know :(

Anyway without the extra info I would be at a loss, Thanks
The norm is -1 not 0 for empty dates :(

I have re-released 1.8 with a fix to cover both -1 and 0

Download and install over the top.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

Ok, I'm back in business. Thanks again. :P 8)

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
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

New Version

' 15-06-08 Version 1.9
' Localise CDbl (Thanks ZvezdanD)
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

MoDementia wrote: ' Localise CDbl
What does this mean exactly??

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
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

In some languages full stops become commas
so the dates don't work in select statements.

Alas I'm not sure the fix worked :(

[EDIT] If someone that has solved this problem before could look at my code I would appreciate it muchly.

Basically I replaced all my CDbl with the following function.
It looks logical, but I'm not sure I understand it 100%

Code: Select all


LastExportDate = CDblLocale(Now)

Function CDblLocale(sExpr)
    Dim lLocale

    lLocale = GetLocale
    SetLocale "en-us"
    CDblLocale = CDbl(sExpr)
    SetLocale lLocale
End Function
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

Reverted back to version 1.8

I don't know how to fix the language problem with commas instead of full stops in internal date format.

Without having a PC with the same language settings I am just guessing if any fix will work or not :(

2 Issues.
1. SQL statements using 39615,3904050926
2. Cdate function using 39615.3904050926

If I fix one the other one is broken.

I don't know what MM might be doing on another PC so it may work for me but fail on the other PC.
e.g. are the dates stored in the DB with commas?

Is there a scripter that uses german (or some other similar language (uses commas)) that can help me fix the isssue?

[EDIT] Is it just a case of single quoting the 39615,3904050926 in select statements and letting MM do all the other conversion?
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden
Contact:

Post by Bex »

I might be wrong but my impression is that you only need to cater for comma vs dot problem when creating SQL queries. Meaning that whatever the locale is using isn't important as far as the VBScript code is concerned.

I just add this when I use vbs-code to write an SQL:

Code: Select all

Replace(ValueThatCouldContainComma,",",".")
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
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Post by MoDementia »

Yeah thanks Bex I sort of came to that conclusion too.

I have had one user test it and say it is now working but I'm not 100% convinced it does/did as the communication might have been a little sketchy given the language difference.

I'm not going to release it until I get at least 1 more confirmation that it works.
Here is the 1.9 link if someone else wants to try it.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Database Export\Import\Sync (DEISync) v1.8 (12-06-08) [MM3]

Post by nynaevelan »

I have to tell you I am LOVING this script. :D I just completed my first database export to a network drive in order to setup my laptop and of course it went very smoothly. It would have normally taken me hours to rescan the files via the network. Prior to using this script I was willing to sacrifice the playcounts from my work computer because I did not want to overwrite my home computer in order to keep them. But with the Import/Export sync options, I am able to save any playcounts or playlist changes which I do on my work computer. And of course let's not forget the importance of all the track editing which I complete on my home computer. Thank you again for this one, this is definately on my list of Top 10 scripts. 8)

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
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Re: Database Export\Import\Sync (DEISync) v1.8 (12-06-08) [MM3]

Post by MoDementia »

Thanks for the praise Nyn,

It sounds like you are making full use of its functionality.
I'm actually a little jealous that I'm not in a situation to use it atm :P
But given that you're the only one to post in the thread, if and when I get to use it, that will make at least 2 happy campers :)

Actually any feedback (good or bad) is welcome by scripters, it's the only way to get a feel for whether a script is helpful to the community or not.
Not to mention that a little ego stroking goes a long way towards motivating us to write/improve some more scripts :lol:
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Database Export\Import\Sync (DEISync) v1.8 (12-06-08) [MM3]

Post by nynaevelan »

Hey:

I know this is probably impossible since the Now Playing list is not saved until MM is closed, but would it be possible to export the Now Playing List as well??

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
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Re: Database Export\Import\Sync (DEISync) v1.8 (12-06-08) [MM3]

Post by MoDementia »

Actually it is possible as long as you don't mind it clearing and rebuilding the Now Playing list when you import.
i.e. optional export but not optional import (well it could also be optional on import :) )
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Database Export\Import\Sync (DEISync) v1.8 (12-06-08) [MM3]

Post by nynaevelan »

The optional import would be great for those situations when I want the import to overwrite the NPL, otherwise I could always create a playlist of the current NPL before running the import. I've just found there are times when I want to continue listening to the current NPL, but I lose that when I go back to listening from the other computer. As far as the export although it can be setup to optionally export the NPL, I would most likely always have it selected. Thanks for your time AGAIN. :P

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
martialartsguy
Posts: 281
Joined: Mon Apr 03, 2006 9:11 am
Location: Denver, CO
Contact:

Re: Database Export\Import\Sync (DEISync) v1.8 (12-06-08) [MM3]

Post by martialartsguy »

Just double-checking before I attempt to use this script:

If I have ALL my tracks on an external HD, I'm still going to have to drag it back and forth between home and work, correct?

My work doesn't like it too much when I clog their database with mp3s.
MM 4.1.28.1905
MMA 1.3.7.0906

MM Gold since 2006
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia
Contact:

Re: Database Export\Import\Sync (DEISync) v1.8 (12-06-08) [MM3]

Post by MoDementia »

If all your tracks are also on you home PC then you can leave your external HD at work and just put the export database on a usb stick (or email it) from home to work or vice versa

If you add a sigificant amount of new tracks at home or work its probably worth bringing the external HD home to copy those across and do a complete export.

I'm pretty sure this is exatly what nynaevelan is doing, I'm sure she would help with any specific questions via private messages.
Post Reply