Exemplo n.º 1
0
        public static string GetBasicPath(this Track track, string pathFormat, Dictionary <string, object> vars)
        {
            // Hacky method to clean the file path
            var formatStrComponents = pathFormat.Split(Path.DirectorySeparatorChar);
            var newFormat           = String.Join("\0", formatStrComponents);
            var finalPath           = Named.Format(newFormat, vars);

            return(PathHelpers.CleanPath(finalPath));
        }
Exemplo n.º 2
0
 public static string GetBasicPath(this Track track, string pathFormat, IMediaCollection collection)
 {
     // Hacky method to clean the file path
     var formatStrComponents = pathFormat.Split(Path.DirectorySeparatorChar);
     var newFormat = String.Join("\0", formatStrComponents);
     var vars = Dictify.ObjectToDictionary(track);
     vars["PlaylistName"] = collection.Title;
     vars["CollectionName"] = collection.Title;
     vars["ServiceName"] = collection.Title;
     var finalPath = PathHelpers.CleanPath(Named.Format(newFormat, vars));
     return finalPath;
 }