Request: Import from txt/xml for individual file

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

Moderators: Peke, Gurus

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

Request: Import from txt/xml for individual file

Post by Lowlander »

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
Posts: 56584
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

Anyone with tips or ideas? :oops:
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

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.
Lowlander
Posts: 56584
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

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.
Lowlander
Posts: 56584
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

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?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

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.
Lowlander
Posts: 56584
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

Thanks, much appreciated.

Do you by chance know where the comment field is stored in MediaMonkey 3.0?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

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.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

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: 56584
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Post by Lowlander »

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.
judas
Posts: 572
Joined: Thu Jun 02, 2005 11:26 pm
Location: Bogotá, Colombia

Post by judas »

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: Hull, UK
Contact:

Post by trixmoto »

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.
Post Reply