Re: Making streaming DVD Setup easier...
Posted: Sun Jun 05, 2011 6:37 pm
Hi,
I think, features can be added in next version
I think, features can be added in next version
Forum of program "Wild media server (UPnP, DLNA, HTTP)
https://www.wildmediaserver.com/forum/
1. Settings - Processing - Add -JST200 wrote: I think this method could be coded, as all the data required to do this is available and the logic I mention above still works.
Code: Select all
var
CellItem: TWmsScriptMediaItem;
sDVDTitle, sFilePath: string;
begin
CellItem := WmsCurrentMediaListItem;
if (CellItem <> nil) and SameText(CellItem.Properties[mpiFilePath], 'DVDVIDEO.VOB') then begin
sFilePath := CellItem.ItemParent.ItemParent.ItemParent.Properties[mpiFilePath]; //ifo-file
sDVDTitle := ExtractFileName(ExtractFileDir(ExtractFileDir(sFilePath)));
WmsDatabaseAddLink(mfVideoCollectionsItemID, 'DVD\' + sDVDTitle, CellItem);
if FileExists(ExtractFilePath(sFilePath) + 'folder.jpg') then
WmsFindMediaFolder(mfVideoCollectionsItemID, 'DVD\' + sDVDTitle).Properties[mpiThumbnail] := ExtractFilePath(sFilePath) + 'folder.jpg';
WmsDatabaseAutoSave
end
end.
JST200 wrote: I think I am going to have to learn Pascal (?).
Maybe it will be a solution for you, but not for othersJST200 wrote: So, how difficult would it be to amend the script so that rather than getting sFilePath (?) from manually selecting the required Cell, it automatically finds it itself from the manually selected DVD Title. Something along the lines of (note: please forgive my meta-coding - its a long time since I wrote any real code!! And as I nmention above, I don't know Pascal!)
http://www.wildmediaserver.com/forum/vi ... p?p=86#p86JST200 wrote:That's "Basicscript" as in Visual Basic? Perhaps I might have chance after all - though Object Oriented code was something else I didn't get into! I'm going to need some examples!![]()
Yes, TV programs, serials, karaoke, ...JST200 wrote: In your DVD example, are you saying that there is no one Cell that is identifed as the full movie?
Code: Select all
procedure ProcessItem(aItem: TWmsScriptMediaItem);
var
dtTimeLength, dtMaxTimeLength: TDateTime;
i, j: Integer;
CellItem, ChapterItem, MainCellItem, PartItem: TWmsScriptMediaItem;
sDVDPath, sDVDTitle: string;
begin
if aItem.IsFolder and SameText(ExtractFileExt(aItem.Properties[mpiFilePath]), '.ifo') then begin
MainCellItem := nil; dtMaxTimeLength := 0;
for i := 0 to aItem.ChildCount - 1 do begin
PartItem := aItem.ChildItems[i];
if PartItem.IsFolder then
for j := 0 to PartItem.ChildCount - 1 do begin
ChapterItem := PartItem.ChildItems[j];
if ChapterItem.HasChildItems then begin
CellItem := ChapterItem.ChildItems[0];
if SameText(CellItem.Properties[mpiFilePath], 'DVDVIDEO.VOB') then try
dtTimeLength := StrToTime(CellItem.Properties[mpiTimeLength]);
if dtTimeLength > dtMaxTimeLength then begin
dtMaxTimeLength := dtTimeLength;
MainCellItem := CellItem
end
except end;
end
end
end;
if MainCellItem <> nil then begin
sDVDPath := ExtractFileDir(ExtractFileDir(aItem.Properties[mpiFilePath]));
sDVDTitle := ExtractFileName(sDVDPath);
WmsDatabaseAddLink(mfVideoCollectionsItemID, 'DVD\' + sDVDTitle, MainCellItem);
if FileExists(sDVDPath + '\folder.jpg') then
WmsFindMediaFolder(mfVideoCollectionsItemID, 'DVD\' + sDVDTitle).Properties[mpiThumbnail] := sDVDPath + '\folder.jpg';
end
end
end;
var
AllMoviesFolder: TWmsScriptMediaItem;
i: Integer;
begin
AllMoviesFolder := WmsFindMediaFolder(mfVideoAllMoviesItemID);
if (AllMoviesFolder <> nil) and AllMoviesFolder.HasChildItems then begin
WmsShowInformation('Creating DVD-links...');
try
for i := 0 to AllMoviesFolder.ChildCount - 1 do
ProcessItem(AllMoviesFolder.ChildItems[i]);
WmsDatabaseAutoSave
finally
WmsHideInformation
end
end
end.
Maybe limitation TV. Information about the thumbnails transferred and displayed on other DLNA-players.JST200 wrote: I have one further question (though it seems churlish of me to even ask!), although all the Collection DVD Titles now have an associated Icon, they don't show on the TV. Is this a limitation of DLNA?
Select the folder "All movies" - right click - "Edit title" - click "Select thumbnail"JST200 wrote:Maybe/probably. Is there a way to check?
Edit info - "Create thumbnail" (requests from a device, the mode Cards - automatic)JST200 wrote: Cells show an "Icon" on the TV - although one doesn't appear for the cell in WMS when you select "Edit Info" for it.