C# Class MediaPortal.Plugins.MovingPictures.LocalMediaManagement.Utility

Mostrar archivo Open project: damienhaynes/moving-pictures

Public Methods

Method Description
GetFileNameWithoutExtensionAndStackMarkers ( FileInfo fileInfo ) : string
GetFileNameWithoutExtensionAndStackMarkers ( string fileName ) : string

Remove extension and stackmarkers from a filename

GetMountedVideoDiscPath ( string imagePath ) : string
GetMovieBaseDirectory ( DirectoryInfo directory ) : DirectoryInfo

Returns the base directory for the movie files that are part of the input directory

GetMovieHashString ( string filename ) : string
GetWebGrabberInstance ( string url ) : WebGrabber

Get a WebGrabber instance with the default moving pictures settings

IsDriveRoot ( DirectoryInfo directory ) : bool

Checks if the directory is a logical drive root

IsDriveRoot ( string path ) : bool

Checks if the given path is a logical drive root

IsImageFile ( string imagePath ) : bool
IsMediaPortalVideoFile ( FileInfo file ) : bool

Checks if file has valid video extensions (as specified by media portal

MediaPortal Dependency!

IsMediaPortalVideoFile ( string file ) : bool
IsMounted ( string imagePath ) : bool
LogDirectoryStructure ( string path ) : void

This method will dump the complete file/directory structure to the log

MountImage ( string imagePath ) : MountResult
MountImage ( string imagePath, int maxWaitCycles ) : MountResult
UnMount ( string imagePath ) : void
isFileMultiPart ( FileInfo file ) : bool
isFileMultiPart ( string fileName ) : bool

Checks if a filename has stack markers (and is multi-part)

isFolderDedicated ( DirectoryInfo folder, int expectedCount ) : bool

Checks if a folder contains a maximum amount of video files This is used to determine if a folder is dedicated to one movie

isFolderMultipart ( string name ) : bool

Checks if the foldername is a multipart marker.

isKnownSubFolder ( string name ) : bool

Checks if the foldername is ambigious (non descriptive)

Private Methods

Method Description
Utility ( ) : System

Method Details

GetFileNameWithoutExtensionAndStackMarkers() public static method

public static GetFileNameWithoutExtensionAndStackMarkers ( FileInfo fileInfo ) : string
fileInfo System.IO.FileInfo
return string

GetFileNameWithoutExtensionAndStackMarkers() public static method

Remove extension and stackmarkers from a filename
public static GetFileNameWithoutExtensionAndStackMarkers ( string fileName ) : string
fileName string Filename including the extension
return string

GetMountedVideoDiscPath() public static method

public static GetMountedVideoDiscPath ( string imagePath ) : string
imagePath string
return string

GetMovieBaseDirectory() public static method

Returns the base directory for the movie files that are part of the input directory
public static GetMovieBaseDirectory ( DirectoryInfo directory ) : DirectoryInfo
directory System.IO.DirectoryInfo directory to start in
return System.IO.DirectoryInfo

GetMovieHashString() public static method

public static GetMovieHashString ( string filename ) : string
filename string
return string

GetWebGrabberInstance() public static method

Get a WebGrabber instance with the default moving pictures settings
public static GetWebGrabberInstance ( string url ) : WebGrabber
url string url to resource
return Cornerstone.Tools.WebGrabber

IsDriveRoot() public static method

Checks if the directory is a logical drive root
public static IsDriveRoot ( DirectoryInfo directory ) : bool
directory System.IO.DirectoryInfo
return bool

IsDriveRoot() public static method

Checks if the given path is a logical drive root
public static IsDriveRoot ( string path ) : bool
path string
return bool

IsImageFile() public static method

public static IsImageFile ( string imagePath ) : bool
imagePath string
return bool

IsMediaPortalVideoFile() public static method

Checks if file has valid video extensions (as specified by media portal
MediaPortal Dependency!
public static IsMediaPortalVideoFile ( FileInfo file ) : bool
file System.IO.FileInfo
return bool

IsMediaPortalVideoFile() public static method

public static IsMediaPortalVideoFile ( string file ) : bool
file string
return bool

IsMounted() public static method

public static IsMounted ( string imagePath ) : bool
imagePath string
return bool

LogDirectoryStructure() public static method

This method will dump the complete file/directory structure to the log
public static LogDirectoryStructure ( string path ) : void
path string
return void

MountImage() public static method

public static MountImage ( string imagePath ) : MountResult
imagePath string
return MountResult

MountImage() public static method

public static MountImage ( string imagePath, int maxWaitCycles ) : MountResult
imagePath string
maxWaitCycles int
return MountResult

UnMount() public static method

public static UnMount ( string imagePath ) : void
imagePath string
return void

isFileMultiPart() public static method

public static isFileMultiPart ( FileInfo file ) : bool
file System.IO.FileInfo
return bool

isFileMultiPart() public static method

Checks if a filename has stack markers (and is multi-part)
public static isFileMultiPart ( string fileName ) : bool
fileName string
return bool

isFolderDedicated() public static method

Checks if a folder contains a maximum amount of video files This is used to determine if a folder is dedicated to one movie
public static isFolderDedicated ( DirectoryInfo folder, int expectedCount ) : bool
folder System.IO.DirectoryInfo the directory to check
expectedCount int maximum count
return bool

isFolderMultipart() public static method

Checks if the foldername is a multipart marker.
public static isFolderMultipart ( string name ) : bool
name string
return bool

isKnownSubFolder() public static method

Checks if the foldername is ambigious (non descriptive)
public static isKnownSubFolder ( string name ) : bool
name string
return bool