LinuxMCE Forums
May 20, 2013, 09:22:27 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
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
 
   Home   Help Search Chat Login Register  
Pages: [1] 2
  Print  
Author Topic: Re-initialising/clearing the media database...  (Read 4694 times)
colinjones
Alumni
LinuxMCE God
*
Posts: 3003


View Profile
« on: October 15, 2008, 05:23:37 am »

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...
Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #1 on: October 15, 2008, 05:32:21 am »

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

then from a console:

Code:

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
Logged
colinjones
Alumni
LinuxMCE God
*
Posts: 3003


View Profile
« Reply #2 on: October 15, 2008, 08:28:21 am »

Cool! And that's perfectly safe?

Also, playlists are in a separate db aren't they?
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #3 on: October 15, 2008, 08:46:06 am »

Playlists are in pluto_media as well  Cry
Logged

colinjones
Alumni
LinuxMCE God
*
Posts: 3003


View Profile
« Reply #4 on: October 15, 2008, 02:37:31 pm »

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...
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #5 on: October 15, 2008, 08:13:42 pm »

The playlist it self stores the keys only.
Logged

colinjones
Alumni
LinuxMCE God
*
Posts: 3003


View Profile
« Reply #6 on: October 15, 2008, 10:26:33 pm »

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...)
Logged
bundie
Veteran
***
Posts: 55


View Profile
« Reply #7 on: November 21, 2008, 01:37:53 am »

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

then from a console:

Code:

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:

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

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

Reint.

Logged
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #8 on: November 21, 2008, 01:45:04 am »

oo sorry, yeah.. um... apologies... Smiley

-Thom
Logged
bundie
Veteran
***
Posts: 55


View Profile
« Reply #9 on: November 21, 2008, 01:54:29 am »

No probs,

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

Greets,
Reint.
Logged
alx9r
Guru
****
Posts: 187


View Profile
« Reply #10 on: November 21, 2008, 05:13:40 pm »

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
Logged

tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #11 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.

-Thom
Logged
alx9r
Guru
****
Posts: 187


View Profile
« Reply #12 on: November 21, 2008, 05:19:42 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.
Logged

tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #13 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.

-Thom
Logged
alx9r
Guru
****
Posts: 187


View Profile
« Reply #14 on: November 21, 2008, 05:23:20 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?
Logged

Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!