Skip to content

Commit

Permalink
Json file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordfoz16 committed Dec 2, 2018
1 parent 80e2508 commit aade7ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Season renamer will rename a season of a TV show with the correct title needed f
#### Using the application

Make sure you have the java runtime enviroment installed.
Run the "Season Rename.jar", this will create a whitelist.txt file
Run the "Season Rename.jar", this will create a whitelist.json file
Enter the path to the folder where your season is located
Enter the series name
Enter the season number and episode starting number
Enter subtitle language if needed
Scan the folder to check it can open the folder
Click the rename button to rename the folder

#### Editing the whitelist.txt
#### Editing the whitelist.json

Inside the whitelist.txt are the file extension that can be renamed. So if a video or subtitle format is not there then it can be added by using the json format. If you have made a change to the whitelist.txt the program will need restarting. To get the defualt whitelist.txt delete the current file and relaunch the application.
Inside the whitelist.json are the file extension that can be renamed. So if a video or subtitle format is not there then it can be added by using the json format. If you have made a change to the whitelist.txt the program will need restarting. To get the defualt whitelist.txt delete the current file and relaunch the application.
8 changes: 4 additions & 4 deletions src/Utils/ReadFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ReadFile {
private ArrayList<String> videoList = new ArrayList<String>();
private ArrayList<String> subtitleList = new ArrayList<String>();

private File blacklist = new File("whitelist.txt");
private File whitelist = new File("whitelist.json");

private String template =
"{ \r\n" +
Expand All @@ -41,10 +41,10 @@ public ReadFile() {

public void checkForFile() {

if(!blacklist.exists()) {
if(!whitelist.exists()) {
System.out.println("Creating Whitelist File");
try {
PrintWriter writer = new PrintWriter("whitelist.txt", "UTF-8");
PrintWriter writer = new PrintWriter("whitelist.json", "UTF-8");
writer.write(template);
writer.close();
} catch (FileNotFoundException e) {
Expand All @@ -61,7 +61,7 @@ public void readFile() {
JSONParser parser = new JSONParser();

try {
Object obj = parser.parse(new FileReader("whitelist.txt"));
Object obj = parser.parse(new FileReader("whitelist.json"));
JSONObject jsonObject = (JSONObject) obj;

JSONArray videoFormat = (JSONArray) jsonObject.get("video");
Expand Down
File renamed without changes.

0 comments on commit aade7ed

Please sign in to comment.