Request: Import from txt/xml for individual file

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Lowlander
Posts: 44750
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Request: Import from txt/xml for individual file

Post by Lowlander » Fri Feb 09, 2007 9:55 pm

I know there are various import scripts, but they don't seem to cover my needs.

My need in this case is to import comments from an external file. As the media files in question are video I will need to import from an external file.

My preference would be to be able to import from a txt/xml file per video, but it could also be done per album. The txt/xml file would have the same name as the video if it's a per video solution and could have any name (album) in case it's a per album solution.
A solution that is capable of importing more fields than comment would be nice.

These are the constraints of my needs. I don't have any text files yet so I'm flexible in the solution as long as it's portable (ie other DB's can accomplish the same import).

As my coding experience is related to web development and I lack any import from file skills I'm asking for a solution from the MediaMonkey community.

PS. Any non-script solutions are welcome too.
Lowlander (MediaMonkey user since 2003)

Lowlander
Posts: 44750
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander » Mon Feb 19, 2007 11:24 pm

Anyone with tips or ideas? :oops:
Lowlander (MediaMonkey user since 2003)

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK
Contact:

Post by trixmoto » Tue Feb 20, 2007 4:54 am

Do you have a set of files you are hoping to import?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

Lowlander
Posts: 44750
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander » Tue Feb 20, 2007 11:10 pm

Not yet, which gives more freedom to the solution. I would like to create a data file per video, which than can be read in through MediaMonkey. This makes things portable allowing me to move folders around without the risk of loosing my data. The data file would have the same name as the video file.

As for the data I can do with a one field file (comments only) but prefer the support various fields.
Lowlander (MediaMonkey user since 2003)

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK
Contact:

Post by trixmoto » Wed Feb 21, 2007 4:48 am

The (.txt) file should look something like this...

Code: Select all

Comment=This is my comment
Title=This is the title
...with each attribute on a new line, starting with the field name.

A single file for multiple videos would certainly be more complicated as you'd need to specify the filepath in the textfile to link the file to the videos, and then these would need to be amended if you moved or renamed the videos.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK
Contact:

Post by trixmoto » Wed Feb 21, 2007 5:50 am

I'm gonna realease it properly later, but here's the code...

EDIT: Code here. :)
Last edited by trixmoto on Mon Oct 29, 2007 4:17 am, edited 1 time in total.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

Lowlander
Posts: 44750
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander » Wed Feb 21, 2007 10:44 pm

Thanks Trixmoto, this works well. The only problem that I can foresee is that sometimes comments are multi-line, is that something that can be solved?
Lowlander (MediaMonkey user since 2003)

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK
Contact:

Post by trixmoto » Thu Feb 22, 2007 4:50 am

I'll take a look and see what I can come up with.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

Lowlander
Posts: 44750
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander » Thu Feb 22, 2007 11:20 pm

Thanks, much appreciated.

Do you by chance know where the comment field is stored in MediaMonkey 3.0?
Lowlander (MediaMonkey user since 2003)

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK
Contact:

Post by trixmoto » Fri Feb 23, 2007 4:43 am

I've got no idea about the new structure yet, I haven't investigated myself and there's no documentation that I know of. It's also still subject to change!
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

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

Post by Bex » Fri Feb 23, 2007 9:56 am

Currently it's a field named Comment in the Songs table which is much easier to find compared to MM 2.5
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

Lowlander
Posts: 44750
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander » Sat Feb 24, 2007 12:37 am

Oh, that is fabulous. That will make things easier for the search in WebMonkey. I was hoping this when I read that a lot of fields moved to the songs table.
Lowlander (MediaMonkey user since 2003)

judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

Post by judas » Fri Oct 26, 2007 10:56 am

New versions and development/discussion of these script is being held here:

http://www.mediamonkey.com/forum/viewtopic.php?t=15569

@trixmoto...maybe you should edit your post here and link to that thread, in order to have only 1 thread with code!
Cheers, judas

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK
Contact:

Post by trixmoto » Mon Oct 29, 2007 4:17 am

Ok, cheers. I must have forgotten to do that when I posted the new thread! :oops:
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE

Post Reply