Sorting the CNN list by latest
-
- Posts: 62
- Joined: Thu Dec 30, 2010 5:55 am
Sorting the CNN list by latest
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
New version with "Create Date": http://www.wildmediaserver.com/forum/vi ... 1640#p1640
-
- Posts: 62
- Joined: Thu Dec 30, 2010 5:55 am
Re: Sorting the CNN list by latest
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
Perhaps you are using an older version CNNsamsungfan 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.
-
- Posts: 62
- Joined: Thu Dec 30, 2010 5:55 am
Re: Sorting the CNN list by latest
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
What folder of CNN?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.
-
- Posts: 62
- Joined: Thu Dec 30, 2010 5:55 am
Re: Sorting the CNN list by latest
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.
-
- Posts: 62
- Joined: Thu Dec 30, 2010 5:55 am
Re: Sorting the CNN list by latest
I think it is expecting a string type instead of date type
-
- Posts: 62
- Joined: Thu Dec 30, 2010 5:55 am
Re: Sorting the CNN list by latest
I added the date as a prefix to the title to fix it for now.
Re: Sorting the CNN list by latest
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['tease_txt'];
new code
VideoItem := WmsCreateMediaItem(sVideoLink, FolderItem.ItemID);
if (VideoItem <> nil) and SameText(VideoItem.Properties[mpiTitle], sVideoLink) then begin
if WmsRegExMatch('(\d\d\d\d\/\d\d\/\d\d)', sVideoID, sCreateDate) then
if (DateToStr(GetCreateDate(sCreateDate)) = DateToStr(Now)) then
VideoItem.Properties[mpiTitle] := sCreateDate + " " + VideoInfo.ChildValues['tease_txt']
else
VideoItem.Properties[mpiTitle] := "x" + sCreateDate + " " + VideoInfo.ChildValues['tease_txt']
else
VideoItem.Properties[mpiTitle] := VideoInfo.ChildValues['tease_txt'];
old code
VideoItem := WmsCreateMediaItem(sVideoLink, FolderItem.ItemID);
if (VideoItem <> nil) and SameText(VideoItem.Properties[mpiTitle], sVideoLink) then begin
VideoItem.Properties[mpiTitle] := VideoInfo.ChildValues['tease_txt'];
new code
VideoItem := WmsCreateMediaItem(sVideoLink, FolderItem.ItemID);
if (VideoItem <> nil) and SameText(VideoItem.Properties[mpiTitle], sVideoLink) then begin
if WmsRegExMatch('(\d\d\d\d\/\d\d\/\d\d)', sVideoID, sCreateDate) then
if (DateToStr(GetCreateDate(sCreateDate)) = DateToStr(Now)) then
VideoItem.Properties[mpiTitle] := sCreateDate + " " + VideoInfo.ChildValues['tease_txt']
else
VideoItem.Properties[mpiTitle] := "x" + sCreateDate + " " + VideoInfo.ChildValues['tease_txt']
else
VideoItem.Properties[mpiTitle] := VideoInfo.ChildValues['tease_txt'];