Created
February 18, 2018 04:09
-
-
Save Cazzar/ab9354ed8e7205982e4b43d5d61b4edb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Shoko.Models.Server; | |
using Shoko.Server.Models; | |
using Shoko.Server.Renamer; | |
namespace Renamer.Cazzar | |
{ | |
[Renamer("NoSpaces", Description = "Renamer that doesn't use spaces")] | |
class NoSpaceRenamer : IRenamer | |
{ | |
private readonly LegacyRenamer script; | |
private static readonly Logger logger = LogManager.GetCurrentClassLogger(); | |
public NoSpaceRenamer(RenameScript script) | |
{ | |
this.script = new LegacyRenamer(script); | |
} | |
public string GetFileName(SVR_VideoLocal_Place place) => script.GetFileName(place); | |
public string GetFileName(SVR_VideoLocal video) => script.GetFileName(video); | |
public (ImportFolder dest, string folder) GetDestinationFolder(SVR_VideoLocal_Place video) | |
{ | |
var (dest, folder) = script.GetDestinationFolder(video); | |
return (dest, folder.Replace(' ', '_')); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment