Skip to content

Commit

Permalink
removed apng extension
Browse files Browse the repository at this point in the history
  • Loading branch information
cbartondock committed Jun 25, 2020
1 parent fc23c2e commit 973f6c7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/file-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export class FileParser {
}


let extRegex = /png|apng|tga|jpg|jpeg/i;
let extRegex = /png|tga|jpg|jpeg/i;
defaultImagePromises.push(this.resolveFieldGlobs('defaultImage', configs[i],settings, parsedConfigs[i], vParser).then((data) => {
for (let j = 0; j < data.parsedConfig.files.length; j++) {
data.parsedConfig.files[j].resolvedDefaultImages = data.resolvedGlobs[j];
Expand Down
2 changes: 1 addition & 1 deletion src/lib/helpers/steam/get-grid-image-for-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function getGridImagesForTree(tree: SteamTree<{ [appId: string]: string }
for (let userId in data.tree[steamDirectory]) {
promises.push(
fs.readdir(path.join(steamDirectory, 'userdata', userId, 'config', 'grid')).then((files) => {
let extRegex = /png|apng|tga|jpg|jpeg/i;
let extRegex = /png|tga|jpg|jpeg/i;
for (let i = 0; i < files.length; i++) {
let ext = path.extname(files[i]);
let appId = path.basename(files[i], ext);
Expand Down
2 changes: 0 additions & 2 deletions src/lib/helpers/steam/image-extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ map_ext['jpeg']='jpg';
map_ext['JPEG']='jpg';
map_ext['png']='png';
map_ext['PNG']='png';
map_ext['apng']='apng';
map_ext['APNG']='apng';
map_ext['tga']='tga';
map_ext['tga']='tga';
2 changes: 1 addition & 1 deletion src/renderer/components/preview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class PreviewComponent implements OnDestroy {
}
this.fileSelector.onChange = (target) => {
if (target.files) {
let extRegex = /png|apng|tga|jpg|jpeg/i;
let extRegex = /png|tga|jpg|jpeg/i;
for (let i = 0; i < target.files.length; i++) {
if (extRegex.test(path.extname(target.files[i].path))) {
let imageUrl = url.encodeFile(target.files[i].path);
Expand Down

0 comments on commit 973f6c7

Please sign in to comment.