News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Re-initialising/clearing the media database...

Started by colinjones, October 15, 2008, 06:23:37 AM

Previous topic - Next topic

colinjones

Can anyone suggest a simple and safe way to completely clear the media database (pluto_media) that won't screw up the keys/indices/etc so that I can rescan in my entire media share without having to rebuild? There are a number of messed up attributes and coverart, so I want to start from scratch and check what it scans in from the id3s...

tschak909

be sure to go to launch manager, and shut down core and media station.

then from a console:



mysql -uroot

drop database pluto_media;
quit

cp /usr/pluto/database/media.sqlcvs .

/usr/pluto/bin/sqlCVS -r media import



That will re-flash your media database with a fresh copy from the release.

-Thom

colinjones

Cool! And that's perfectly safe?

Also, playlists are in a separate db aren't they?

Marie.O

If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

colinjones

Shit - gonna have to look at jon's backup utility afterall.... I wonder if that expects the keys to remain the same or just records the full path/filename? I would assume the latter as there is no guarantee of the keys...

Marie.O

If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

colinjones

Doesn't that mean that if you clear the database that all the keys could potentially be different when it is refilled? Perhaps I should contact Jon on this as he would have had to think this through anyway (maybe he converts to paths on the export...)

bundie

Quote from: tschak909 on October 15, 2008, 06:32:21 AM
be sure to go to launch manager, and shut down core and media station.

then from a console:



mysql -uroot

drop database pluto_media;
quit

cp /usr/pluto/database/media.sqlcvs .

/usr/pluto/bin/sqlCVS -r media import



That will re-flash your media database with a fresh copy from the release.

-Thom


Hi guys,

Tried this last night, but borked my pluto_media database. After some hours of dispair found out i had to add "-D pluto_media" to the sqlCVS command, so in my case the last line should read:


/usr/pluto/bin/sqlCVS -D pluto_media -r media import


And system is back to normal now, with a clean pluto_media database...

Reint.


tschak909


bundie

No probs,

It reminded me again of the importance of backups... and not fooling around with a perfect working system too much!  ;)

Greets,
Reint.

alx9r

I too am contemplating doing this.  I have a question about video files that use the .id3 sidecar files:

Does anyone know if _all_ attributes for video files are indeed stored in the .id3 files? 

I was poking around one of my .id3 files with taglib and found title, an image, and some other attributes, but couldn't find the "Media Sub-type" and "File Format" fields. 

Alex
I keep my updated system design here:
[url="http://wiki.linuxmce.org/index.php/Alx9r%27s_Sample_Setup"]http://wiki.linuxmce.org/index.php/Alx9r%27s_Sample_Setup[/url]

tschak909

Those two fields you speak of are stored outside the attributes database, and are therefore currently not handled by UpdateMedia. We need to extend this.

-Thom

alx9r

Quote from: tschak909 on November 21, 2008, 05:14:58 PM
Those two fields you speak of are stored outside the attributes database, and are therefore currently not handled by UpdateMedia. We need to extend this.

Thanks.  Good to know.
I keep my updated system design here:
[url="http://wiki.linuxmce.org/index.php/Alx9r%27s_Sample_Setup"]http://wiki.linuxmce.org/index.php/Alx9r%27s_Sample_Setup[/url]

tschak909

Actually, verifying this.. sorry.. I went back through UpdateMedia again, and it is indeed stored, but as a miscellaneous attribute.

-Thom

alx9r

Quote from: tschak909 on November 21, 2008, 05:21:10 PM
Actually, verifying this.. sorry.. I went back through UpdateMedia again, and it is indeed stored, but as a miscellaneous attribute.

Do you mean as a miscellaneous attribute in the .id3 file?
I keep my updated system design here:
[url="http://wiki.linuxmce.org/index.php/Alx9r%27s_Sample_Setup"]http://wiki.linuxmce.org/index.php/Alx9r%27s_Sample_Setup[/url]