Kodi Community Forum

Full Version: Editing myvideos31.db
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i want to have full control over my title/genre/actor views, and editing myvideos31.db seems to be the best way to customize these views. i don't know much about databases and if anyone's willing to help out i'll be grateful.

i've installed sqlite3explorer and the sqlitedll and i can open the database. if i navigate to the movieinfo section and delete all the records i don't want to show up in title view, will the associated records also disappear in genre and actor views? e.g. if i only have one movie with robert de niro in it, and i delete the record for that movie in movieinfo, will robert de niro's entry in the actors table also be deleted?

if not, how do you recommend i go about cleaning up information that i don't want displayed (because it's obsolete or because it's only in the database as a result of bad scans)?

also, how do you save changes to db's using sqliteexplorer? Blush

thanks for any help, clutter is making my actor/genre/title views useless and i think they're a good feature.
nevermind, i don't know what i'm talking about.
looking at the video database code, you'll have phantom entries for in actors view. samething with genres. you need to remove the accompanying entries in the actorlinkmovie table, and the genrelinkmovie table.
thanks for responding. so if i make all of those changes manually (that will take ages), how do i save my changes? i'm using sqlitexplorer (http://www.singular.gr/sqlite/).
i figured out how to make changes to the db. for anyone interested, you have to use sql commands like:

delete from movieinfo where idmovie=6;
delete from actorlinkmovie where idmovie=6;
delete from genrelinkmovie where idmovie=6;

it looks like ripping out old/incorrect scan results would take quite a bit of time because the actors and genre tables aren't linked to idmovie. strange that outdated information isn't automatically purged from the database. does no one use the year/genre/actor views?
the actors and genre tables are not supposed to be linked to movies. when you have a many-to-many relationship, you use a table that cross references two other tables.

you do realize that there is a builtin function to remove movies, right? in title view, highlight the movie you want to remove, and hit the black button on the gamepad, or the zero button on the remote. you'll get a dialog to confirm the deletion.

this will purge the cooresponding records from the other tables as necessary.

** edit ** i'll also fix those views so that the phantom entries get removed.



i thought i'd already fixed them a while back? (week or two?)

i changed it so that it only showed stuff that was referenced in the cross referencing tables?

seems to me that these are cleared correctly on deletion of movie, but i could well be missing something.
the cross-link tables get cleared correctly when deleting a movie. but those views showed duplicate entries, and had the potential to show phantom entries if someone did a "manual" cleanup. i just committed a fix for this.

something is a little off with the movie lookup though. if i do the lookup on a folder, only one file gets associated to that title. in files view, one of the files has the correct icon, the other doesnt. (and its not always the "first" file.) also, when in title view, if i play that movie, it doesnt prompt me with the cd selector.

if i go back to files view, and manually play the other files which were not associated when i did the lookup, they get associated. they immediately inherit the icon when i stop them playing. and then if i go back to title view, i get prompted with the cd selector.
correct. movie info lookup on a folder grabs the "first" file that it retrieves from a getdirectory() and associates it with this file. i think a better way would either be to grab all the files in the directory (seems most logical) or grab all the stacked files of the first file.
it should depend on what type of filelist item the user does the imdb lookup upon:

1) if its a folder, then all video files in that folder should be associated to the returned movie

2) if stacking is enabled, and its a file, then all the stacked files should be associated to the returned movie

3) if stacking is disabled, and its a file, then only that single file should be associated to the returned movie
2 and 3 are fine afaict.

1 is the problem, and i agree that all video files should get the info.
i took a stab at #3. i got it to work partially by simply turning on stacking if its a folder, and then restoring it when the lookup is finished.

it works great when the files in the directory are "stack friendly" but not so good when there are arbitrary files in the folder.