Kodi Community Forum

Full Version: Forcing a file to be Music Video
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I did search the forum and the WIKI but could not find an answer to my question. Sorry if it is there

Here is my problem, when I ripped my DVD/BluRay, I kept all the files pertaining to one disc into the same directory.
This makes some of my Music Videos and Movies to be in the same directories. Some of my music videos are in
music video only directories.

After I scraped my movie collection I decided to clean up and have the music video appear in the Music Videos section
of xbmc and I proceeded as follow:

1 - Remove the video from the Movie Collection
2- Change "Content" of my movie collection to "Music Video"
3- Answer No to the question about updating all the files
4- Go into the "Files" and navigate to those music video
5- Add them individually
6- Revert the content type of my movie collection

Indeed, the music video now appear in the "Music Video" section and I can play the ..Yeah!

But

If I look at the context menu, it says "Movie Information" whereas other videos (in different path) will say "Music Video Information"
and when I try to look at the info, xbmc try to find movie information for that file and tries to add it back to the movie collection

How can I make those files stuck to the "Music Video" mode?

I looked into the DB, but could not find anything to force the file to be considered a music video regardless of the "Path"

Can I add the full file path to the "path" table and mark it as "Music Video"?

Here is my setup

Ubuntu 12.12
XBMC Frodo (xbmc team repository)
Database in MySQL on a separate host (can access with phpmyadmin)

Thanks,
François


Image
Have separate source folders and content set for each properly. Two spearate media types in same DIr is never going to work right, unless these sources are in diffrent directories inside this main, so you set main as Movies for movies and navigate into VIDEO>FILES find the music video part and set subcontent on that.

uNi
(2013-02-23, 11:36)uNiversal Wrote: [ -> ]Have separate source folders and content set for each properly. Two spearate media types in same DIr is never going to work right, unless these sources are in diffrent directories inside this main, so you set main as Movies for movies and navigate into VIDEO>FILES find the music video part and set subcontent on that.

uNi

Thank for your reply uNi,

But I am not satisfied with it Wink

I access my media via a menu that says "Music Video" why should the system double guess me and decided that some files are "Movies"

Moving the music video out of my "ripped" directory would make me loose information (i.e. that the two files are related because they were on the same DVD)

I thought I could hack this thing by copying the path, having the new path marked as "musicvideos" and link the music videos to that path...It had absolutely no effect.
I even tried to have a "different" path by doubling the starting '/' and updating the musicvideos records to match. but again no effect

So I guess the question is: How does the system decided that an entry somewhere is a Movie or a Music Video ?

Cheers,
françois
The system decides what is what when you add a source and set content to movies or tv shows or music videos so everything in that path has to be either one or the other, it cant be both unless you separate it and tell it for A set this content for B set that.

Your telling xbmc all you have on this source is movies but its not, so your expecting the computer to be smarter than what information your imputing. If your not satisfied with this, perhaps you need to rethink your logic somehow.

See http://wiki.xbmc.org/index.php?title=Vid...d_scanning

uNi
Hi uNi,

Thanks again for your answer

(2013-02-23, 23:21)uNiversal Wrote: [ -> ]The system decides what is what when you add a source and set content to movies or tv shows or music videos so everything in that path has to be either one or the other, it cant be both unless you separate it and tell it for A set this content for B set that.

Your telling xbmc all you have on this source is movies but its not, so your expecting the computer to be smarter than what information your imputing. If your not satisfied with this, perhaps you need to rethink your logic somehow.

Yes I do realise that, that is why I tried to duplicate the path. But clearly I wasn't clear enough.

I did try to hack the system by manipulating the database directly. So I analysed the 3 tables
that seemed relevant: path, musicvideo and movie. I found out that the only constrain on path was to have
a unique id, so it meant I could duplicate the path. I also found that some path had the content
(strContent) and scrapper (strScrapper) set and some did not. So I guessed (I did not look at the code)
that to figure out the content. the system would look at the path id (c14 in musicvideo, c23 in movie),
and work its way up the path until it found out one where strContent was set...and Bob's your uncle that would be the type.

When duplicating the path I would have one set to nothing (hence would go up the path to figure out the content)
and referenced in c23 in the movie table, whilst the second copy for the very same path would have strContent set to "musicvideos"
with entries in the musicvideo table (c14) referencing that path.

So I do think my logic is right, but things are not exactly working that way Wink

Now that I think about it, I may have to try with different skins, I am not sure how involve the individual skins are in querying the database.

EDIT:
Actually, my hack does have a positive effect, I probably needed to reboot XBMC to see it. Now, those music video relating to the "copied" path
will show neither "Movie Information" nor "Music Video Information" and by default will play (My default is to show info)

So not yet perfect, but a move in the right direction.

Cheers,
François
Alright...

So it is possible, but it is tricky... and you need to access the Database directly.

If you have different types of files in one directory (say, music video and movies) and you want them to appear
in different sections of XBMC (Say Music Video and Movies) it is possible, but not simple.

One way you can do this is as follow:

- Using XMBC remove the file form the Movie Collection
- Change the "Content" for the Movie video path to "Music Video" (choose the appropriate scrapper and answer "No" to the foloow-up question)
- Got through the files and "import" them. (They should be imported as Music Video)
- Change back the Movies video path content to "Movie"
- Access the Database ( use what ever tool you like)
1 Look into the table "musicvideo" for those files you just imported
Look at the fields idFile, c13 and c14
2 For each recored in "musicvideo" do
- Find the path associated with it
SELECT * FROM path WHERE idPath=<c14 above>
3 Copy the path and update the copy with:
strContent = musicvideo
strScraper= metadata.musicvideos.last.fm (or whatever scrapper you want)

4 Update the "path" copy with a zero sum change.. For instance
if your path is /Media/Movie/D/Disney/...
make the copy to be /Media/Movie/D/../D/Disney

5 Update records as follow
table musicvideo.. set c13 to match the "path copy" strPath
set c14 to match the "path copy" idPath
table files (idFile from step 1) set idPath to match "path copy" idPath



That's the way to do it... if enough people request it, I can write a Python script to do it...

Cheers,
françois

EDIT: Removed duplicate message