Skip to content

Commit

Permalink
Bugs Resolved
Browse files Browse the repository at this point in the history
- while editing track info album and artist name where not changing
- changed the order by which the tracks appear in recently added(by dataeadded desc)
  • Loading branch information
tayal007 committed Nov 12, 2016
1 parent 55ad18c commit 307c9ad
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion nbproject/private/configs/Run_in_Browser.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Do not modify this property in this configuration. It can be re-generated.
javafx.run.as=embedded
javafx.run.inbrowser=<Default System Browser>
javafx.run.inbrowser.path=C:\\Program Files\\Internet Explorer\\iexplore.exe
javafx.run.inbrowser.path=C:\\Program Files (x86)\\UCBrowser\\Application\\UCBrowser.exe
2 changes: 1 addition & 1 deletion nbproject/private/private.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ javadoc.preview=true
javafx.run.as=standalone
javafx.run.inbrowser=<Default System Browser>
javafx.run.inbrowser.path=
user.properties.file=C:\\Users\\Punit\\AppData\\Roaming\\NetBeans\\8.2\\build.properties
user.properties.file=C:\\Users\\SANJAY TAYAL\\AppData\\Roaming\\NetBeans\\8.2\\build.properties
17 changes: 5 additions & 12 deletions nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/SongEditorController.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/AddTrack.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/Update.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/BeatBoxerController.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/PlayList.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/Show.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/Directory.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/Favourites.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/BeatBoxer.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/PlayListInfo.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/DataBase.java</file>
<file>file:/C:/Users/Punit/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/FolderChooserController.java</file>
<file>file:/C:/Users/SANJAY%20TAYAL/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/CreateConnection.java</file>
<file>file:/C:/Users/SANJAY%20TAYAL/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/SongEditorController.java</file>
<file>file:/C:/Users/SANJAY%20TAYAL/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/DataBase.java</file>
<file>file:/C:/Users/SANJAY%20TAYAL/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/Show.java</file>
<file>file:/C:/Users/SANJAY%20TAYAL/Documents/NetBeansProjects/BeatBoxer/src/beatboxer/Update.java</file>
</group>
</open-files>
</project-private>
3 changes: 2 additions & 1 deletion src/beatboxer/DataBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void CreateDataBase() {
+ "artistid int NOT NULL,albumid int NOT NULL)");
check.execute("create table id(newid int, playlistid int)");
check.execute("insert into id values(1,1)");
check.execute("create trigger incrementid after insert on track for each row update id set newid = newid + 1");
check.execute("create trigger incrementidinsert after insert on trackinfo for each row update id set newid = newid + 1");
check.execute("create trigger incrementplaylistid after insert on playlist for each row update id set playlistid = playlistid + 1");
check.execute("create trigger deleterefresh after delete on trackinfo "
+ "for each row begin "
Expand All @@ -47,6 +47,7 @@ public void CreateDataBase() {
+ "for each row begin "
+ "delete from album where albumid not in (select distinct albumid from trackinfo); "
+ "delete from artist where artistid not in (select distinct artistid from trackinfo); "
+ "update id set newid = newid + 1;"
+ "end");

check.execute("CREATE PROCEDURE addtrack(in trackname varchar(50),in artistname varchar(50),in albumname varchar(100),in location varchar(500),in genre varchar(30)) "
Expand Down
2 changes: 1 addition & 1 deletion src/beatboxer/Show.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public ObservableList<BBSong> ShowByMode(String mode) {

public ObservableList<BBSong> ShowRecentlyAdded() {
try {
String sql = "select * from track natural join artist natural join album natural join trackinfo where to_seconds(dateadded) + 86400 >= to_seconds(current_timestamp()) order by dateadded";
String sql = "select * from track natural join artist natural join album natural join trackinfo where to_seconds(dateadded) + 86400 >= to_seconds(current_timestamp()) order by dateadded desc";
Statement tracks = con.createStatement();
ResultSet res = tracks.executeQuery(sql);
return BBGenerator.song(res);
Expand Down

0 comments on commit 307c9ad

Please sign in to comment.