Kodi Community Forum
2 XBMC PCs and 1 Database on the shared NAS - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: 2 XBMC PCs and 1 Database on the shared NAS (/showthread.php?tid=70603)



- albaranov - 2010-09-03

Good evening Charrua,

http://pastebin.com/RxXtAqiA

For the sake of experiment I removed the advancedsettings.xml file and run XBMC. Everything returned to normal, the log file had one minor error. The moment the said file was restored, all problems came back. When I tried to open an artist folder - XBMC (Not responding) - game over! Alex


- charrua - 2010-09-03

albaranov Wrote:Good evening Charrua,

http://pastebin.com/RxXtAqiA

For the sake of experiment I removed the advancedsettings.xml file and run XBMC. Everything returned to normal, the log file had one minor error. The moment the said file was restored, all problems came back. When I tried to open an artist folder - XBMC (Not responding) - game over! Alex
Try changing the name to the xbmc MySQL database and then start XBMC, it will force it to create a new one.


- albaranov - 2010-09-03

Charrua,

I realize that you were the only one who replied...
XBMC is scanning, the log file has more than 43,000 lines, one error so far.
All Cyrillic names are represented by crap symbols. XBMC is set to Cyrillic (Windows). Is it necessary to change something in mySQL to show Cyrillic correctly? Thanks, Alex


- charrua - 2010-09-03

albaranov Wrote:Charrua,

I realize that you were the only one who replied...
XBMC is scanning, the log file has more than 43,000 lines, one error so far.
All Cyrillic names are represented by crap symbols. XBMC is set to Cyrillic (Windows). Is it necessary to change something in mySQL to show Cyrillic correctly? Thanks, Alex
As stated before in this thread you should set the collation of the DB to latin1_general_ci , and the charset to latin1 to avoid problems with indexes. I believe with those settings you'll also be able to see the correct Cyrillic file names in XBMC.


- albaranov - 2010-09-03

I remember posts about it. It did not occur to me that latin1 can fix Cyrillic. Will follow your advice when scan is done. Thank you very much for your help and support. Alex


- charrua - 2010-09-03

albaranov Wrote:I remember posts about it. It did not occur to me that latin1 can fix Cyrillic. Will follow your advice when scan is done. Thank you very much for your help and support. Alex
The problem is that if you change the collation and charset after scanning, you won't see the proper filenames because the names were already scanned and stored using utf8 as collation. You should drop your DB again, create a new empty DB in MySQL setting it to use latin1 as charset and latin1_general_ci as collation, then start XBMC and start the scanning process.


- albaranov - 2010-09-04

Good evening Charrua,

The language issue has been resolved. My son changed whatever need to be changed to UTF-8 in mySQL, I renamed the music database in advancedsettings.xml, scanned the folders with media and everything seems to be O.K. The Cyrillic names are shown correctly in XBMC, mySQL and in the debug log.
Now, all of a sudden, the video files refuse to be scanned.
I have changed the name of the library in advancedsettings.xml (after adjustments have been made to mySQL database), added successfully source and tried to scan. It did not work - ERROR: SQL: The table does not exist.
I renamed the database and tried again - no luck. It is funny but I do exactly what I did yesterday. Any word of wisdom? Do not want to send the debug log file before you agree to look into it.
Thanks in advance, Alex


- charrua - 2010-09-04

albaranov Wrote:Good evening Charrua,
The language issue has been resolved. My son changed whatever need to be changed to UTF-8 in mySQL, I renamed the music database in advancedsettings.xml, scanned the folders with media and everything seems to be O.K. The Cyrillic names are shown correctly in XBMC, mySQL and in the debug log.
Now, all of a sudden, the video files refuse to be scanned.
I have changed the name of the library in advancedsettings.xml (after adjustments have been made to mySQL database), added successfully source and tried to scan. It did not work - ERROR: SQL: The table does not exist.
I renamed the database and tried again - no luck. It is funny but I do exactly what I did yesterday. Any word of wisdom? Do not want to send the debug log file before you agree to look into it.
Thanks in advance, Alex

Yes, you need the DB collation to be latin1, not utf-8, or some indexes and tables won't be created (please read the full thread for my explanation about this in previous posts). Even with collation set to latin1 you should be able to see the cyrilic characters if you scan the files with that collation already selected for the DB.


- albaranov - 2010-09-05

Hi Charrua,
I followed your advice regarding latin1, and now everything works. Thank you very much indeed! Amazing!
My next step is to get my second PC connected to the centralized database.
Before I go for it, I would like to double check one more thing with you. When I'm in Music Library mode and try to open an artist folder (with albums inside it) it takes 2-3 minutes to open it. First, for I have a note in the left top corner "XMBC (Not Responding) and "Working..." label in the right bottom corner. Then in 2-3 minutes the artist folder becomes available. I can play songs, everything. I thought that a big number of images in the this folder might delay the access. So I checked another artist folder with no images in it. The same story. By the way, no delays are observed in video library. Any ideas? Thanks, Alex


- charrua - 2010-09-05

albaranov Wrote:Hi Charrua,
I followed your advice regarding latin1, and now everything works. Thank you very much indeed! Amazing!
Well done.

albaranov Wrote:My next step is to get my second PC connected to the centralized database.
Before I go for it, I would like to double check one more thing with you. When I'm in Music Library mode and try to open an artist folder (with albums inside it) it takes 2-3 minutes to open it. First, for I have a note in the left top corner "XBMC (Not Responding) and "Working..." label in the right bottom corner. Then in 2-3 minutes the artist folder becomes available. I can play songs, everything. I thought that a big number of images in the this folder might delay the access. So I checked another artist folder with no images in it. The same story. By the way, no delays are observed in video library. Any ideas? Thanks, Alex
I think that the music DB design is not optimized for performance yet, so at least in my experience it is indeed slow to access. I don't have suggestions regarding this one, maybe someone else has.


- albaranov - 2010-09-05

Charrua,
Thanks for the reply. I hope the music DB would be optimized sooner or later. For me the music part is the most important part of XBMC. Again really appreciate your prompt replies and support. Alex


- Mitch23 - 2010-09-05

I also noticed performance Issues with Music-Database.

Video-database runs fine, but not the music-database. Until now I only added half of my MP3s to the database (100.000 files), but no samplers. XBMC needs 2 days to integrate these files into the database.

When I want to see the list of artists, xbmc is hanging for a while. So I tried the same query with HeidiSQL:

Code:
select * from artist where (idArtist IN (select song.idArtist from song) or idArtist IN (select exartistsong.idArtist from exartistsong) or idArtist IN (select album.idArtist from album) or idArtist IN (select exartistalbum.idArtist from exartistalbum ))  and artist.strArtist != "" and artist.idArtist<>1

The result: 97 sec. + 371 sec. network = 468 seconds.
(MySQL 5.1 under Ubuntu 9.10, Intel Core2 Duo 6320 with 4 GB of RAM)

After this, I installed the 64bit-Edition of MySQL on my Workstation (Intel Quad 9550, 8 GB RAM, Intel Postville SSD 160GB, Windows 7 64bit Ultimate).

The result: 10 sec. + 41 sec. network = 51 seconds.

When I use SQlite as database-engine, the artists list apears after 17 sec. on my workstation.

I'm usung XBMC Dharma r33035.


Mitch23


- albaranov - 2010-09-05

Hi Charrua,

I've completed testing the music database with several amendments.
There were three issues:

1. Delay of 3 minutes when you click on an Artist in Library mode.
Fixed by adding index as per http://forum.xbmc.org/showthread.php?tid=78425

2. Delay of 20 seconds when you click on "Artists"
Fixed by: alter table song add index idArtist(idArtist);

3. Delay of 10 seconds when you click on "Genres"
Fixed by: alter table song add index idGenre(idGenre);

Now, in my case, everything opens momentarily on the main machine. Alex


- avus m3 - 2010-09-05

Damn, I was just finishing up my DiY WHS machine and was goign to install WHS on it and run MySQL for XBMC. This might be a show stopper for me if the music db is this bad.


- Mitch23 - 2010-09-05

@albaranov

Thanks. After the modifications the same query takes only 1 second.

Mitch23