Page 1 of 1

Sorting the CNN list by latest

Posted: Sat Jan 08, 2011 6:59 pm
by samsungfan
Currently I see the CNN podcast items sorted alphabetically. Is there a way to show the latest news items at the top of the list instead of the alphabetical order?

Re: Sorting the CNN list by latest

Posted: Sat Jan 08, 2011 9:32 pm
by Eugene

Re: Sorting the CNN list by latest

Posted: Sun Jan 09, 2011 5:32 pm
by samsungfan
I dont see the Create date populated in the table view. Is it expected to be populated. I still see the items sorted by title. I tried changing FolderItem.Sort('mpTitle/-mpCreateDate') in create podcast feed script but it didnt help.

Re: Sorting the CNN list by latest

Posted: Sun Jan 09, 2011 8:09 pm
by Eugene
samsungfan wrote:I dont see the Create date populated in the table view. Is it expected to be populated. I still see the items sorted by title. I tried changing FolderItem.Sort('mpTitle/-mpCreateDate') in create podcast feed script but it didnt help.
Perhaps you are using an older version CNN

Re: Sorting the CNN list by latest

Posted: Mon Jan 10, 2011 1:37 am
by samsungfan
I double checked the script and it does contain your changes regarding adding the createDate but it doesnt seem to reflect in the table grid view.

Re: Sorting the CNN list by latest

Posted: Tue Jan 11, 2011 1:34 pm
by Eugene
samsungfan wrote:I double checked the script and it does contain your changes regarding adding the createDate but it doesnt seem to reflect in the table grid view.
What folder of CNN?

Re: Sorting the CNN list by latest

Posted: Tue Jan 11, 2011 2:36 pm
by samsungfan
All folders of CNN. I am able to see the create date only in Comedy Central items. I am not able to see the create date in other scripts like Fox, etc either.

Re: Sorting the CNN list by latest

Posted: Tue Jan 11, 2011 2:39 pm
by samsungfan
I think it is expecting a string type instead of date type

Re: Sorting the CNN list by latest

Posted: Wed Jan 12, 2011 5:28 pm
by samsungfan
I added the date as a prefix to the title to fix it for now.

Re: Sorting the CNN list by latest

Posted: Tue Apr 05, 2011 12:10 am
by davrust
I also ran into this issue with the date on CNN posts, so I changed my copy of the cnnvideo.wdf script to display the date in front of the podcast (with a leading "x" to indicate old news from previous days). Now it always displays today's news first:

old code
VideoItem := WmsCreateMediaItem(sVideoLink, FolderItem.ItemID);
if (VideoItem <> nil) and SameText(VideoItem.Properties[mpiTitle], sVideoLink) then begin
VideoItem.Properties[mpiTitle] := VideoInfo.ChildValues[&apos;tease_txt&apos;];

new code
VideoItem := WmsCreateMediaItem(sVideoLink, FolderItem.ItemID);
if (VideoItem <> nil) and SameText(VideoItem.Properties[mpiTitle], sVideoLink) then begin
if WmsRegExMatch(&apos;(\d\d\d\d\/\d\d\/\d\d)&apos;, sVideoID, sCreateDate) then
if (DateToStr(GetCreateDate(sCreateDate)) = DateToStr(Now)) then
VideoItem.Properties[mpiTitle] := sCreateDate + " " + VideoInfo.ChildValues[&apos;tease_txt&apos;]
else
VideoItem.Properties[mpiTitle] := "x" + sCreateDate + " " + VideoInfo.ChildValues[&apos;tease_txt&apos;]
else
VideoItem.Properties[mpiTitle] := VideoInfo.ChildValues[&apos;tease_txt&apos;];