Author Topic: Re-initialising/clearing the media database...  (Read 5824 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5499
  • DOES work for LinuxMCE.
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #15 on: November 21, 2008, 05:26:10 pm »
Yes. I will post some details on it later. Point being, it's persisted.

-Thom

davegravy

  • Addicted
  • *
  • Posts: 518
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #16 on: September 03, 2009, 10:31:47 pm »
be sure to go to launch manager, and shut down core and media station.

then from a console:

Code: [Select]

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


Does this work in 810? How do you stop the Core and MD in 810?

speeder13

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #17 on: September 12, 2009, 07:23:59 am »
I accidentally sync the whole "home" into my media database..Now it has bunch of weird videos (including those wizard video) in my media under "title". How can i remove them without messing up my system?  :(

I saw some solutions in this thread.. Will it be safe if i use the ways? Because it included everything in the "home" i am afraid i might break the whole system if i do any deletion.

Thx in advance....

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5499
  • DOES work for LinuxMCE.
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #18 on: September 12, 2009, 07:33:12 am »
lesson learned, don't fuck with things manually. this is what you get.

you'll need to drop the database and recreate it.

Seriously guys, all of you cause so many ^(@#^(@# problems because you tweak with stuff, you don't let the automatic stuff do its thing...

hmm.

-Thom

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #19 on: October 01, 2009, 10:58:59 pm »
With respect;-
I  realize this question must have been raised more than a couple of times, but I can't seem to find a 'clean' answer.
Over time my media database has grown, and at several occasions I found to have double or triple items in it.
I come to realize now that this is most probably due to e.g. having
Code: [Select]
/moviedir
/moviedir/moviesubdir
/moviedir/moviesubdir/movie.iso
or whatnot as being present 3 time in this example in the media database.

I also realize there's a button "delete file" in Pluto Admin > Files & Media > Edit Media file but this will remove the file BOTH from database AND disk.
I'm looking for a way to remove ONLY from database?

Thanks for any pointer,

Erwin

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #20 on: October 02, 2009, 01:16:21 pm »
I'm not sure what you mean.... a folder or subfolder will not appear as a media file unless you do something to make it happen manually.

I have many hundreds of folders, none of which appear as media files except in Filename sort mode in which case they are appearing as folders with files underneath them, exactly as they are supposed to do (if they didn't it would render Filename sort mode pointless)

When sorted by an attribute such as album, if you manually assign an Album attribute to a folder (rather than a file) then yes, they will appear... but that is OK too, because that is exactly what you just told it to do! If you don't want these folders to appear in those sort modes, don't assign attributes to them... there is no other reason to do so.

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #21 on: October 02, 2009, 02:27:12 pm »
Hi Colin, thanks for replying;

I guess it's well possible that in the course of time, and certainly with a lack of knowledge and comprehension (this greatly improved viewing Thom's screencast on using media) that I erroneously created this situation.
I'm not stating this is an error of LMCE whatsoever.
Only problem is say I have 'a' particular movie, let's call it "Desperate Housewives", that appears say 3 times, and only plays when choosing the correct one (normally bottommost in filestructure order).

I have this situation more than once, and I would like to resolve this situation.
In a best case scenario, any media displayed should either be playable or invisible.

In my case, see screenshot, Disc 3 appears two times, when choosing item 2 on the search list (search on title), the video won't play..

So how can I remedy this situation (manually) if need be?

Thanks for helping out!

Erwin

davegravy

  • Addicted
  • *
  • Posts: 518
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #22 on: October 02, 2009, 04:48:26 pm »
Look to see if disc three has 2 title attributes, and if it does, delete the one you don't want.

Lexje

  • Guru
  • ****
  • Posts: 230
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #23 on: October 02, 2009, 07:24:57 pm »
Hi Dave,

Thanks for jumping in;
There are no 2 'Title' attributes... I do remember to have edited the title to reflect the disc number (as it is a 5 disc collection) otherwise there's no way to distinguish between disc 1 / disc 5...

When I do Pluto Admin > Files & Media > Media Browser
check title checkbox and enter desperate housewives I get the same 3 "titles", clicking on detail shows one empty...

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #24 on: October 03, 2009, 12:32:24 am »
Oh you are talking about when you use the search function. Not when you are using the normal media browser.

Yes, that does happen, your experience is normal... if a little irritating! The search finds all entries in the database that match the search criteria which naturally includes the parent folders not just the file. Indeed, try doing the analogous search on a Windows machine.... you will find it does exactly the same thing.... it will find the media file Desparate Housewives as well as its parent folder Desparate Housewives because both match the search criteria.

The confusing and annoying thing in LMCE is that 1) it isn't obvious which is a file and which a folder, and 2) if you select a folder, LMCE will attempt to "play" it rather than enter it and display its contents

Viking

  • Addicted
  • *
  • Posts: 521
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #25 on: December 16, 2009, 11:13:23 am »
be sure to go to launch manager, and shut down core and media station.

then from a console:

Code: [Select]

mysql -uroot

drop database pluto_media;
quit

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

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

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

-Thom


Does this work in 810? How do you stop the Core and MD in 810?

This question for 0810 was never answered ...

Do I start the core in single user mode and then do it ?
How can one do it in 0810 ?

Greetings
Viking

the anxious

  • Regular Poster
  • **
  • Posts: 31
    • View Profile
    • My portfolio
Re: Re-initialising/clearing the media database...
« Reply #26 on: June 12, 2010, 04:18:37 pm »
thanks to tschak909

Code: [Select]
/usr/pluto/bin/UpdateMediaDaemonControl.sh –disable

mysql -uroot

drop database pluto_media;
quit

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

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

/usr/pluto/bin/UpdateMediaDaemonControl.sh –enable
Asus M2N-E-SLI, 2GB Kingston, HD 500GB Seagate, Hauppage PVR-500, Geforce 7300GS, Fiire Chief, Nokia N800, Samsung LN32A330J1 32", HA22, Intermatic Switches, USB UIRT, Xantech 286 double emitter,

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 890
  • Living with LMCE
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #27 on: September 29, 2011, 08:25:59 am »
be sure to go to launch manager, and shut down core and media station.

then from a console:

...

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

-Thom


How can I go to Launch Manager ? I only see launch manager when something is wrong or crashes...

Thanks,

Regards,

Bulek.
Thanks in advance,

regards,

Bulek.

twodogs

  • Guru
  • ****
  • Posts: 224
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #28 on: September 29, 2011, 06:03:20 pm »
I just performed the procedure in post 26 and it worked great. No need to go to the launch manager, the first line of code stops the media daemon. I just went to KDE desktop and brought up a terminal. The only minor problem is that the "-disable" and "-enable" commands need to have short dashes, not long dashes. The following should work if you want to copy/paste into the terminal.

Code: [Select]
/usr/pluto/bin/UpdateMediaDaemonControl.sh -disable

mysql -uroot

drop database pluto_media;
quit

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

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

/usr/pluto/bin/UpdateMediaDaemonControl.sh -enable
http://greenrenovation.wordpress.com/home-automation/
system:
ASUS P5N7A-VM
integrated GeForce 9300
E5200 processor
Fusion 5 lite HDTV card
2G RAM
SYBA SY-PCI15001 6-port serial card
Denon AVR 3805
LG 42" Plasma
Gyration GYR3101
Cisco SPA3102 analog telephone adapter
Cisco 7971G IP phone/orbiter

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 890
  • Living with LMCE
    • View Profile
Re: Re-initialising/clearing the media database...
« Reply #29 on: October 02, 2011, 11:27:18 pm »
Hi,

I have followed procedure on 7.10 and got only partial success. I've managed to shutdown core services, dropped database, imported fresh one. Enabled daemon, but the problem is that after 3 days, if I press Filename option in Video or Audio menus I get empty screen - seems like no media file is present...

Through web-admin I can find files that have Location filled - for instance "/home/public/data/videos/Media [41]/Funny/name_movie.mp4" but they don't appear on Orbiters...

What is wrong - maybe I'm missing something obvious ?

Thanks in advance,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.