•   
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 24
  •   
[MYSQL] HOW-TO: 5 User XBMC
Can anybody help me with my question on Post 102?
Reply
@pcgiirl you dont need the windows scripts. Follow my guide
Reply
BingMong and Nogler, thank you so much! It was driving me mental having to share my watched status with others in the house.
Reply
OK, a couple of questions that I am not sure about. How do I rename my current mysql database? Where is the guide? All I see is the front page that says to run this script and that script.
Reply
@pcgirl
You should upgrade to Kodi because you have to redo this job if you want update from existing setup.

-Make a backup of your database xbmc->System->Video->Library->Export Library
-Read the wiki page to setup xbmc/kodi to use mysql http://kodi.wiki/view/MySQL Call the database "a" (whitout "")
-If you want use xbmc 13.2 execute the script from first post (3b) on your windows machine and follow N4TH4N tutorial
else execute the sql commands from my post in HeidiDb and follow my tutorial
Reply
Which N4TH4N tutorial do I follow? I executed the script on my windows pc and it created the advancedsettings.xml and also some directories. Do I have to copy all over to my android and openelec machines? Do I create the profiles first in XBMC? Do I have to create the same profiles on all of the xbmc's? Sorry for the questions, but I am just having a hard time grasping some of the procedures.
Reply
wrong info
Reply
(2015-01-15, 22:46)Blend Wrote: http://pastebin.com/WEU1y30x = SERVER SETUP batch 5 user kodi script
http://pastebin.com/guTkTsQt = CLIENT SETUP batch 5 user kodi script
http://pastebin.com/sqxr4QVz = User KODI - SQL Setup txt

Hello,
I uploaded three files. these are for kodi 14.0 with the database 90 for viedeos and 48 for music
I wish you much fun with it and hope that it runs without problems

in Deutsch:

Hallo,
habe die drei Dateien hochgeladen. diese sind für kodi 14.0 mit der Datenbank 90 für Videos und 48 für Musik
Ich wünsche euch viel Spaß damit und hoffe dass es ohne Probleme läuft

Hi Blend,

i have done the manual of nathan for my gotham setup and it is running good. Now i want to switch to Kodi but i'm afraid to do some big mistake.
Can you give me some tips hints to switch in the best way with your 3 changed files?

Hi Blend,

ich habe das Setup von nathan für Gotham durchgeführt und es läuft perfekt. Allerdings möchte ich nun doch gerne auf Kodi umstellen befürchte aber mein gut laufendes Setup zu zerstören.
Kannst du mir ein paar Tipps geben wie ich am besten bei der Umstellung vorgehe unter Verwendung deiner 3 geänderten Dateien?

Das wäre Super
Grüße
Dirk
Reply
Does anyone have this working under Kodi 14?

The links to the TV-Shows menu options seem dead (goes to files) with one of the 5 user databases. The main DB works fine.

Kodi log:

09:45:00 T:888 ERROR: CVideoDatabase::GetTvShowsByWhere failed
09:45:01 T:1128 ERROR: unmatched parentheses in Skin.HasSetting(overlay.resumable.disable
09:45:01 T:1128 ERROR: CVideoDatabase::GetTvShowsByWhere failed
09:45:01 T:1128 ERROR: XFILE::CDirectory::GetDirectory - Error getting videodb://tvshows/titles/
09:45:02 T:1128 ERROR: CGUIMediaWindow::GetDirectory(videodb://tvshows/titles/) failed
09:45:02 T:3648 NOTICE: Thread BackgroundLoader start, auto delete: false
09:45:06 T:888 ERROR: CVideoDatabase::GetTvShowsByWhere failed

Edit: Fixed with information from the previous page.
Reply
Are there any plans to simplify this?
Reply
(2015-04-12, 18:47)Deihmos Wrote: Are there any plans to simplify this?

I second that. Still running Gotham because I haven't dared to tackle this yet.
Reply
Smile 
(2015-01-24, 12:08)Nogler Wrote: @BigMong Thank you. It's working now Smile

@all

New Setup:

create a file called advancedsettings.xml in .kodi/userdata/ and insert following content:

Code:
<advancedsettings>
  <videodatabase>
    <type>mysql</type>
    <host>192.168.2.2</host>
    <port>3306</port>
    <user>xbmc</user>
    <pass>xbmc</pass>
    <name>a</name>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>192.168.2.2</host>
    <port>3306</port>
    <user>xbmc</user>
    <pass>xbmc</pass>
    <name>a</name>
  </musicdatabase>
</advancedsettings>

-Replace user, pass and host whit your mysql settings.
-Restart kodi
-Kodi creates a new database called a90
-Use your favorite mysql editor and insert the code from link http://pastebin.com/0VNB9DmV
-Execute for each database the code provided from BigMong (first fix not needed)
-Done

Existing setup:
-Make a database backup for each profile(single file) in System->Video->Library->Export Library (You may need to change settings level to expert)
-Rename the database a78 to something like aa78 (because kodi will attempt to upgrade the a78 to a90 and that will fail)
-Update to kodi
-Follow instructions new setup
-For each profile import the backup (System->Video->Library->Import Library)
-Done

To change from a profile to b profile change
<name>a</name> to <name>b</name> in advancedsettings.xml

Enjoy Smile

-I am going to attempt an upgrade from 13.2 to 14.2. So far I have backed up my libraries (I have 3 profiles: a b and c, originally set up using N4TH4N's 5 user script).
- I see that your script creates the 5 databases (Kodi compatible) as N4TH4N's 13.2 script did.

-I am unclear on which code exactly that I'm supposed to execute from BigMong. I assume just the one starting with CREATE VIEW `b90`.`tvshowview`?
You say to execute this code for each database, but it seems to be tailored for the b database. I assume I just change all instances of b90 to c90 and then execute it again in HeidiSQL? If that's the case I'd probably just carry on and do it with d90 and e90 as well.

Also, you say his two scripts following are not necessary? I'm wondering how many profiles you have being used and if you are getting any errors?

After the new SQL databases have been created and the fix applied to each, the importing of each library while logged on under each corresponding profile makes sense. I get that part.

The very last part of your post about changing profiles by changing a to b in advancedsettings.xml: is this because you aren't using a profiles.xml and separate advancedsettings.xml for each user?

I'd really appreciate if you'd clarify these few questions Smile
Reply
Hi,

Execute the script provided at the pastepin link. The script at the link you have to execute only one time.
The script will create new Databases. Open the a90 database and execute this code

Code:
CREATE VIEW `seasonview`
AS SELECT
  `seasons`.`idSeason` AS `idSeason`,
  `seasons`.`idShow` AS `idShow`,
  `seasons`.`season` AS `season`,
  `tvshowview`.`strPath` AS `strPath`,
  `tvshowview`.`c00` AS `showTitle`,
  `tvshowview`.`c01` AS `plot`,
  `tvshowview`.`c05` AS `premiered`,
  `tvshowview`.`c08` AS `genre`,
  `tvshowview`.`c14` AS `strStudio`,
  `tvshowview`.`c13` AS `mpaa`,
  count(distinct `episodeview`.`idEpisode`) AS `episodes`,count(`files`.`playCount`) AS `playCount` from (((`seasons` join `tvshowview` on((`tvshowview`.`idShow` = `seasons`.`idShow`))) join `episodeview` on(((`episodeview`.`idShow` = `seasons`.`idShow`) and (`episodeview`.`c12` = `seasons`.`season`)))) join `files` on((`files`.`idFile` = `episodeview`.`idFile`))) group by `seasons`.`idSeason`;

and this

Code:
CREATE VIEW `tvshowcounts`
AS SELECT
  `tvshow`.`idShow` AS `idShow`,
  max(`files`.`lastPlayed`) AS `lastPlayed`,
  nullif(count(`episode`.`c12`),0) AS `totalCount`,
  count(`files`.`playCount`) AS `watchedcount`,
  nullif(count(distinct `episode`.`c12`),0) AS `totalSeasons`,
  max(`files`.`dateAdded`) AS `dateAdded` from ((`tvshow` left join `episode` on((`episode`.`idShow` = `tvshow`.`idShow`))) left join `files` on((`files`.`idFile` = `episode`.`idFile`))) group by `tvshow`.`idShow`;

If you have done this open b90(...c90...d90) do the same job again.

I don't need different profiles on the same box. If you want to change profiles on one box use the profile.xml and the userdata folder.
Reply
To "rename" the database I had to export it:
$ mysqldump -u root -p -v a78 > ~/a78.sql
then create the aa78 database:
$ mysqladmin -u root -p create aa78
then import the exported a78 to the new aa78 database:
$ mysql -u root -p aa78 < ~/a78.sql

THEN I open HeidiSQL and "drop" the original a78 database.
Then I run Kodi and it creates the a90 and a48 databases.
To get the pastebin script to run without errors, I had to remove all b c d and e databases first.
Result: /* Affected rows: 8 Found rows: 0 Warnings: 0 Duration for 284 queries: 3.897 sec. */

When I run the two queries in post #118 I get:
/* SQL Error (1050): Table 'seasonview' already exists */
/* Affected rows: 0 Found rows: 0 Warnings: 0 Duration for 0 of 1 query: 0.000 sec. */
and...
/* SQL Error (1050): Table 'tvshowcounts' already exists */
/* Affected rows: 0 Found rows: 0 Warnings: 0 Duration for 0 of 1 query: 0.000 sec. */
...respectively.

Until I get clarification I am going to attempt importing my library backups anyways. Also, I'm really not understanding in HeidiSQL how you can run the query on a specific database. It seems to just run the query globally. i.e. you can't run the query just for a90 or run the query just for b90. At least, I don't understand how to do it?? you say:
(2015-05-23, 08:33)Nogler Wrote: If you have done this open b90(...c90...d90) do the same job again.

EDIT: I figured it out! After waiting for my library to import and seeing that my 2nd and third profile TV shows weren't accessible, it became more clear. You don't have to (or they don't appear to do anything) run the post 118 scripts on a90, just b90, c90, d90 and e90.
If anyone else is having any trouble, I feel stupid that I didn't figure this out sooner, but you just click on the b90 database icon so it's highlighted in the HeidiSQL tree in the left. then run the first query and then the second query. Highlight c90 and run both queries and so on...
Reply
Just had some quick questions as I read the whole thread (scanned some parts) and am still a bit unclear.

Do I need to run this script on every box I want to use? Meaning PCs only? Or once I set it up, can I have an AFTV, Shield TV, laptop, desktop, mix and match type thing (all same version of course)? If I *can* run different boxes, how would I go about that? Just run the Windows script and then access it (? however that works) from my various sources or...? Do I need to do anything special as far as router config?

Help is appreciated.

Background: I've used XBMC for a while now. I've had it on my iPhone since iP4 with great success and have used it from time to time on my laptop and now have it on the desktop I built. But now that we're deciding to cut the cord on cable TV as a couple, I wanted to get things setup properly so it'll be a smooth transition for us. As for usage, we mostly stream. Like 99% of the time and just make note of stuff we really enjoy. For the time being, we don't have the money or space to keep up with massive amounts of storage so... we don't. We have both Hulu and Netflix. Willing to pay for good content, just not cable prices at this time.

Again, any help or insight appreciated. Thanks in advance!
Reply
  •   
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 24
  •   



Logout Mark Read Team Forum Stats Members Help
[MYSQL] HOW-TO: 5 User XBMC5
This forum uses Lukasz Tkacz MyBB addons.