Music Videos show up in Music Video Library under "Title" but not under each artist

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
kiboy6 Offline
Fan
Posts: 607
Joined: Mar 2009
Reputation: 0
Post: #11
Just to update...Same problem still there in RC1....
find quote
jpennell Offline
Senior Member
Posts: 105
Joined: Jul 2005
Reputation: 0
Post: #12
Doesn't work in Camelot final either.

Select artists from "music videos" gives list of artists - selecting an artist gives empty list of videos. However, selecting "information" from music video, clicking artists then clicking on an artist shows a list of music videos correctly.
find quote
dbzer0 Offline
Junior Member
Posts: 2
Joined: Mar 2010
Reputation: 0
Post: #13
Sorry for the necromancy but I'm pretty certain I know why this is happening. Apparently it seems that xbmc is expecting to have album information for each music video. If the album information is missing, you will not see anything under the sort-by-artist. If for example you manage to scrape a video with mtv.com, then you will most likely find something under this sorting as this will scrape album information.

EDIT: Just found this: http://trac.xbmc.org/ticket/6972
(This post was last modified: 2010-04-25 17:39 by dbzer0.)
find quote
czfj5r Offline
Member
Posts: 58
Joined: Jul 2010
Reputation: 0
Location: Sweden
Post: #14
I read this thread and it is exactly what i experience with final Dharma (the current stable release). I get the video in under title but going from artist it is empty.

There seem to be a trac on this one but it states this:
Changed 19 months ago by sho ¶
■description modified (diff)
Changed 19 months ago by sho ¶
■description modified (diff)
Changed 15 months ago by sho ¶
Since we are cleaning up the libraires, may I suggest you guys look into this if it's not too much of a trouble?

Changed 15 months ago by vdrfan ¶
■status changed from new to closed
■resolution set to Fixed in SVN
r24521. Instead of removing the the node(s) I've added an additional condition to not add empty album strings.

It is closed but in my view the error is still there.
The nfo looks like this:
<musicvideo>
<title>World Wide Live</title>
<artist>Scorpions</artist>
</musicvideo>


Can someone suggest how the nfo SHOULD look like AND if there is a tool that can help create it based upon the file name and posibly add in a "dummy" like 'Other' for the album information if that is really required.

Any information that helps sort this out would be great as the scrapers do not do such a good job sadly...
find quote
czfj5r Offline
Member
Posts: 58
Joined: Jul 2010
Reputation: 0
Location: Sweden
Post: #15
All,

here is a VBS script fixing NFO's for each file in a single folder. Found it through google... File has to be "artist - title".

You can then adjust the info for album and similar for yourself...

The important part is to get the "album" information into the database of XBMC.

take the below. copy it into notepad and save the file with the extension .vbs and you should be able to double-click and run it.

In part 2 comes when you have subfolders. Fixing and trixing...
----


'* This script creates an XBMC Music Video Nfo file based on the artist & trackname. *
'* The videos must be in the format artist - trackname for this to work. *
'* Mpg, Avi, Wmv, Swf, M2v & Flv files will be picked up. If there is a format *
'* I've missed, line 34 can be edited to add the additional extension. Just add *
'* or lcase(exten) = ".xxx" before the word then. *
'* The script is currently unble to handle any 4 letter extensions such as .mpeg *
'* *
'* ©Craigey2007 - 19-12-2007. Use at your own risk. V1.6 *


i = 0
f = 0
g = 0
log_name = "music_video_nfo_creator.log"

Set sa = CreateObject("Shell.Application")
set oF = sa.BrowseForFolder(0, "Source Folder:", ssfWINDOWS)
if (not oF is nothing) then
set fi = oF.Items.Item
else
wscript.quit
end if

Set filesys = CreateObject("Scripting.fileSystemObject")
Set sourceFolder = filesys.GetFolder(fi.Path) ' The folder containing your Music Videos

set mvidslist = sourceFolder.files
startTime = Timer

For Each mvids in mvidslist
trackName = mvids.name
exten = right(mvids,4)
if lcase(exten) = ".avi" or lcase(exten) = ".wmv" or lcase(exten) = ".mpg" or lcase(exten) = ".swf" or lcase(exten) = ".m2v" or lcase(exten) = "flv" then
i=i+1
str1=trackname

fullfilename = WScript.ScriptFullName
currentFolder = Left(filename, InstrRev(filename, "\"))

Set FSOd = CreateObject("Scripting.FileSystemObject")
Set logFile = FSOd.OpenTextFile(currentfolder+log_name, 8, True)

on error resume next
seperator = InstrRev(str1,"-") 'count left to the first occurance of "-"
if (seperator >= 1) then 'if the seperator exists split into artist and song
artist = Left(str1,seperator-2) 'seperate artist
songLength= (Len(str1)- seperator) 'work out chr length of song
song = right(str1,songLength) 'seperate song
strArtist = artist
strSong = song
strSong = Replace(strSong,exten,"")
strArtist = trim(strArtist)
strSong = trim(strSong)
noArtist = Len(strArtist) 'if it can't find an artist name, replace with 'Unknown'

if noArtist = "0" then
strArtist = "Unknown"
end if
noSong = Len(strSong) 'if it can't find a song name, replace with 'Unknown'
if noSong = "0" then
strSong = "Unknown"
end if
else 'leave alone
strArtist = "Unknown"
end if

str1 = replace(str1,exten,"")
destfil = sourceFolder+"\"+str1+".nfo"



if filesys.FileExists(destFil) then
g=g+1
logFile.Writeline "INFO:**********************Duplicate Below*************************"
else
f=f+1
Set fsonfo = CreateObject("Scripting.FileSystemObject")
Set nfoFile = FSOnfo.OpenTextFile(destfil, 8, True)
nfoFile.Writeline "<musicvideo>"
nfoFile.Writeline "<title>"&strSong&"</title>"
nfoFile.Writeline "<artist>"&strArtist&"</artist>"
nfoFile.Writeline "<album>ADD what you want!!</album>"
nfoFile.Writeline "<genre></genre>"
nfoFile.Writeline "<runtime></runtime>"
nfoFile.Writeline "<plot></plot>"
nfoFile.Writeline "<year></year>"
nfoFile.Writeline "<director></director>"
nfoFile.Writeline "<studio></studio>"
nfoFile.Writeline "</musicvideo>"
nfoFile.Close
set fsonfo = nothing
set nfofile = nothing
end if

timesecs = Timer - startTime
logFile.Writeline trackname & " " & str1 & " " & destfil & " " & g & " " & f & " " & i & " " &timesecs
logFile.Close

end if
next



elapsedTimesecs = Timer - startTime
elapsedtimesecs = CInt(elapsedtimesecs)


if i = "0" then
ermsg="No Music Videos were Found."
erTitle="Files not Found"
MsgBox erMsg, vbOkOnly + vbExclamation, erTitle
wscript.quit
end if

days=0
hours=0
mins=0

do while elapsedtimesecs > 59
mins=mins+1
elapsedtimesecs = elapsedtimesecs - 60
loop

do while mins > 59
hours=hours+1
mins = mins - 60
loop

do while hours > 24
days=days+1
hours = hours - 24
loop

timetaken = f & " Music Videos Nfo files created in "
if days > 1 then
timetaken = timetaken & days & " Days & "
end if
if days = 1 then
timetaken = timetaken & days & " Day & "
end if
if hours > 1 then
timetaken = timetaken & hours & " Hours & "
end if
if days <> 1 and hours = 1 then
timetaken = timetaken & hours & " Hour & "
end if
if mins > 1 then
timetaken = timetaken & mins & " Minutes & "
end if
if hours <> 1 and mins = 1 then
timetaken = timetaken & mins & " Minute & "
end if
if elapsedtimesecs <> 1 then
timetaken = timetaken & elapsedTimesecs & " Seconds"
end if
if elapsedtimesecs = 1 then
timetaken = timetaken & elapsedTimesecs & " Second"
end if

if g = 1 then
timetaken = timetaken & vbcrlf & g & " NFO File already existed & was ignored"
elseif g > 1 then
timetaken = timetaken & vbcrlf & g & " NFO Files already existed & were ignored"
end if

set FSOd = Nothing
set logFile = Nothing

msgbox(timetaken)
find quote
czfj5r Offline
Member
Posts: 58
Joined: Jul 2010
Reputation: 0
Location: Sweden
Post: #16
Here comes the same type of script but this time you should select a "main folder". The script then walks through your subfolders (1 level only!) and creates the .NFO file for all files found.

As stated - similar to the former one but goes for subfolders which is teh way I have it structured. Feel free to enhance further Smile
----

'* This script creates an XBMC Music Video Nfo file based on the artist & trackname. *
'* The videos must be in the format artist - trackname for this to work. *
'* Mpg, Avi, Wmv, Swf, M2v & Flv files will be picked up. If there is a format *
'* I've missed, line 34 can be edited to add the additional extension. Just add *
'* or lcase(exten) = ".xxx" before the word then. *
'* The script is currently unble to handle any 4 letter extensions such as .mpeg *
'* *
'* ©Craigey2007 - 19-12-2007. Use at your own risk. V1.6 *


i = 0
f = 0
g = 0
log_name = "music_video_nfo_creator.log"

Set sa = CreateObject("Shell.Application")
set oF = sa.BrowseForFolder(0, "Source Folder:", ssfWINDOWS)
if (not oF is nothing) then
set fi = oF.Items.Item
else
wscript.quit
end if

Set filesys = CreateObject("Scripting.fileSystemObject")
Set sourceFolder = filesys.GetFolder(fi.Path) ' The folder containing your Music Videos

'added
Set Path = filesys.GetFolder(fi.Path) ' The folder containing your Music Videos
Set FSO = CreateObject("Scripting.FileSystemObject")

For each folder in FSO.GetFolder(path).SubFolders
'end add


'set mvidslist = sourceFolder.files
set mvidslist = folder.files
startTime = Timer

For Each mvids in mvidslist
trackName = mvids.name
exten = right(mvids,4)
if lcase(exten) = ".avi" or lcase(exten) = ".wmv" or lcase(exten) = ".mpg" or lcase(exten) = ".swf" or lcase(exten) = ".m2v" or lcase(exten) = "flv" or lcase(exten) = ".mkv" or lcase(exten) = ".vob" then
i=i+1
str1=trackname

fullfilename = WScript.ScriptFullName
currentFolder = Left(filename, InstrRev(filename, "\"))

Set FSOd = CreateObject("Scripting.FileSystemObject")
Set logFile = FSOd.OpenTextFile(currentfolder+log_name, 8, True)

on error resume next
seperator = InstrRev(str1,"-") 'count left to the first occurance of "-"
if (seperator >= 1) then 'if the seperator exists split into artist and song
artist = Left(str1,seperator-2) 'seperate artist
songLength= (Len(str1)- seperator) 'work out chr length of song
song = right(str1,songLength) 'seperate song
strArtist = artist
strSong = song
strSong = Replace(strSong,exten,"")
strArtist = trim(strArtist)
strSong = trim(strSong)
noArtist = Len(strArtist) 'if it can't find an artist name, replace with 'Unknown'

if noArtist = "0" then
strArtist = "Unknown"
end if
noSong = Len(strSong) 'if it can't find a song name, replace with 'Unknown'
if noSong = "0" then
strSong = "Unknown"
end if
else 'leave alone
strArtist = "Unknown"
end if

str1 = replace(str1,exten,"")
destfil = folder+"\"+str1+".nfo"



if filesys.FileExists(destFil) then
g=g+1
logFile.Writeline "INFO:**********************Duplicate Below*************************"
else
f=f+1
Set fsonfo = CreateObject("Scripting.FileSystemObject")
Set nfoFile = FSOnfo.OpenTextFile(destfil, 8, True)
nfoFile.Writeline "<musicvideo>"
nfoFile.Writeline "<title>"&strSong&"</title>"
nfoFile.Writeline "<artist>"&strArtist&"</artist>"
nfoFile.Writeline "<album>Other</album>"
nfoFile.Writeline "<genre>Pop</genre>"
nfoFile.Writeline "<runtime></runtime>"
nfoFile.Writeline "<plot>Who cares...?</plot>"
nfoFile.Writeline "<year></year>"
nfoFile.Writeline "<director></director>"
nfoFile.Writeline "<studio></studio>"
nfoFile.Writeline "</musicvideo>"
nfoFile.Close
set fsonfo = nothing
set nfofile = nothing
end if

timesecs = Timer - startTime
logFile.Writeline trackname & " " & str1 & " " & destfil & " " & g & " " & f & " " & i & " " &timesecs
logFile.Close

end if
next
next


elapsedTimesecs = Timer - startTime
elapsedtimesecs = CInt(elapsedtimesecs)


if i = "0" then
ermsg="No Music Videos were Found."
erTitle="Files not Found"
MsgBox erMsg, vbOkOnly + vbExclamation, erTitle
wscript.quit
end if

days=0
hours=0
mins=0

do while elapsedtimesecs > 59
mins=mins+1
elapsedtimesecs = elapsedtimesecs - 60
loop

do while mins > 59
hours=hours+1
mins = mins - 60
loop

do while hours > 24
days=days+1
hours = hours - 24
loop

timetaken = f & " Music Videos Nfo files created in "
if days > 1 then
timetaken = timetaken & days & " Days & "
end if
if days = 1 then
timetaken = timetaken & days & " Day & "
end if
if hours > 1 then
timetaken = timetaken & hours & " Hours & "
end if
if days <> 1 and hours = 1 then
timetaken = timetaken & hours & " Hour & "
end if
if mins > 1 then
timetaken = timetaken & mins & " Minutes & "
end if
if hours <> 1 and mins = 1 then
timetaken = timetaken & mins & " Minute & "
end if
if elapsedtimesecs <> 1 then
timetaken = timetaken & elapsedTimesecs & " Seconds"
end if
if elapsedtimesecs = 1 then
timetaken = timetaken & elapsedTimesecs & " Second"
end if

if g = 1 then
timetaken = timetaken & vbcrlf & g & " NFO File already existed & was ignored"
elseif g > 1 then
timetaken = timetaken & vbcrlf & g & " NFO Files already existed & were ignored"
end if

set FSOd = Nothing
set logFile = Nothing

msgbox(timetaken)
find quote
Post Reply