I need query depending on this condition..If "Title" contain word "Love" then I need to get related Movie Name
<mmReply command="getSongsByQuery" userData="hello" status="ok">
<contents>
<songList recordCount="3">
<song songId="83">
<field id="12" name="Run Time">03:42</field>
<field id="102" name="Artist">Ten Years After</field>
<field id="103" name="Title">I'd Love To Change The World</field>
<field id="104" name="Movie">Movie Name</field>
</song>
<song songId="81">
<field id="12" name="Run Time">03:08</field>
<field id="102" name="Artist">Stephen Stills</field>
<field id="103" name="Title">Love The One You're With</field>
<field id="104" name="Movie">Movie Name</field>
</song>
<song songId="54">
<field id="12" name="Run Time">05:30</field>
<field id="102" name="Artist">Led Zeppelin</field>
<field id="103" name="Title">Whole Lotta</field>
<field id="104" name="Movie">Movie Name</field>
</song>
</songList>
Below I don't know how to get Movie
(from c in data.Descendants("song")
from fld in c.Elements("field")
where fld.Value.ToLower().Contains("love") && getSeconds(c.Element("field").Value) > 120 //120 is song length
select new SongInfo()
{
songId = Convert.ToInt32(c.Attribute("songId").Value),
song = fld.Value, // keyword.song,
Movie = ?????
songDuration = getSeconds(c.Element("field").Value),
counts = keyword.counts,
tweetDateTime = keyword.tweetDateTime
}).FirstOrDefault();
No comments:
Post a Comment