public static RebuildMovieCustomPath ( string information ) : string | ||
information | string | |
return | string |
public static string RebuildMovieCustomPath(string[] information)
{
string directoryName = SettingsHandler.GetMovieDownloadDirectory();
char[] switches = SettingsHandler.GetMovieCustomDirectory().ToCharArray();
for (int a = 0; a < switches.Length; a++)
{
if (switches[a].Equals("%"))
{
switch (switches[a + 1])
{
/* information
* 0: Movie Title
* 1: Year
* 2: Source Media
* 3: Codec Format
* 4: File Format
* */
case 'm':
directoryName += information[0];
a++;
break;
case 'y':
directoryName += information[1];
a++;
break;
case 's':
directoryName += information[2];
a++;
break;
case 'c':
directoryName += information[3];
a++;
break;
case 'f':
directoryName += information[4];
a++;
break;
default:
directoryName += switches[a] + switches[a + 1];
break;
}
}
else
{
directoryName += switches[a];
}
}
return directoryName;
}