2 // Armadillo File Manager
3 // Copyright (c) 2010-2011, Robert Sesek <http://www.bluestatic.org>
5 // This program is free software: you can redistribute it and/or modify it under
6 // the terms of the GNU General Public License as published by the Free Software
7 // Foundation, either version 3 of the License, or any later version.
10 goog
.provide('armadillo.TVRenamer');
12 goog
.require('goog.Disposable');
15 * Creates a helper to rename a file in a pretty format for TV episodes.
16 * @extends {goog.Disposable}
19 armadillo
.TVRenamer
= function(file
) {
24 * @type {armadillo.File}
28 goog
.inherits(armadillo
.TVRenamer
, goog
.Disposable
);
33 armadillo
.TVRenamer
.prototype.disposeInternal
= function() {
34 goog
.base(this, 'disposeInternal');
39 * Performs the information lookup and renames the file if the lookup is
42 armadillo
.TVRenamer
.prototype.run
= function() {
43 var file
= this.file_
;
44 var callback
= function(data
, stauts
, xhr
) {
46 app
.showError(data
['message']);
49 file
.move(data
['path']);
52 app
.sendRequest('tv_rename', {'path':this.file_
.getFullPath()},