One touch/click mood list selection

Got an idea? Missing something? Post your feature request here.

One touch/click mood list selection

Unread postby ciantm » 04 Mar 2014, 13:27

Hi guys,

Idea for implementation (replacement for moods.jsp or in parallel) I was having a look at an idea based on a Mood plane (x-y, negative/positve - energy) to allow a user to create a playlist based on a graphical one touch plane such as the attached jpg, particularly useful imo on tablets, but also on pc with a mouse.
Moods.jpg
Touch image for emotions in x-y plane


I had a go at implementing it simply (requires a an array of translation for the last.fm moods etc on an x-y basis) in js which was fine but i then tried to replace the moods.jsp in the *.war file so that it would be compiled into the webapp but it didn't seem to work.

I am not sure if I am "allowed" mess like this but I think this feature would be a great intuitive way of creating playlists.

My question is - 1) how could I ensure that my new moods.jps file is installed/booted in the webapp (debian/linux) or 2) would you like to see the idea in code for potential implementation?! ;)

Thanks for your time, and your great work thus far!

(I had not coded for years before this so had to give myself a few days crash course in js to get going(actually had never done any js before)!)

Cian
ciantm
 
Posts: 7
Joined: 16 Jul 2013, 12:47
Has thanked: 2 times
Been thanked: 3 times

Re: One touch/click mood list selection

Unread postby gurutech » 04 Mar 2014, 15:58

Have you tested this by backing up the packaged moods.jsp, and replacing it with your version? You should be able to do this without replacing the jsp file inside the WAR file itself, although doing it this way would force you to re-copy your file after you update the Madsonic version.
gurutech
Contributor
Contributor
 
Posts: 323
Joined: 02 Jan 2013, 04:56
Has thanked: 12 times
Been thanked: 130 times

Re: One touch/click mood list selection

Unread postby ciantm » 04 Mar 2014, 16:15

Hi,

I tried that first but the changes are not visible browser even though I can see the /var/madsonic/jetty/3860/webapp/WEB-INF/jsp/moods.jsp is my version.

That is why I looked at the .war file as I suspected that I needed to reboot the webapp, and the logs showed it was using the .war file so i replaced the file in the .war. Cleared out jetty, rebooted - the new file was correct, but the browser version was still the same!

Any ideas?

Thanks
ciantm
 
Posts: 7
Joined: 16 Jul 2013, 12:47
Has thanked: 2 times
Been thanked: 3 times

Re: One touch/click mood list selection

Unread postby gurutech » 05 Mar 2014, 00:54

You need to clear the "cache" files after you update the file.

I'm trying to locate the path for this, as it's different than what you have listed below. I'll edit this post as soon as I find it, or if someone else knows it offhand, feel free to post.
gurutech
Contributor
Contributor
 
Posts: 323
Joined: 02 Jan 2013, 04:56
Has thanked: 12 times
Been thanked: 130 times

Re: One touch/click mood list selection

Unread postby ciantm » 05 Mar 2014, 11:35

Hi again,

Yeah I cleared the browser cache etc. I look forward to hearing where the file is that I need to change if my location is not the correct one!

Thanks
ciantm
 
Posts: 7
Joined: 16 Jul 2013, 12:47
Has thanked: 2 times
Been thanked: 3 times

Re: One touch/click mood list selection

Unread postby gurutech » 05 Mar 2014, 21:30

It's not your browser cache; there's a cache location for Madsonic itself. For the life of me, I can't recall where it is. But I am still looking for it....

Edit: OK, I found the folder where it "should" be - /var/madsonic/jetty/XXXX/jsp/org/apache/jsp/WEB_002dINF/ (where XXXX is your build number). But I do not have the folder in this location, my path stops at the first ./jsp folder.

I had several build numbers in my jetty folder, and found the cache folder in the earliest one (which went back to 3650!). You just need to delete (or rename) the WEB_002dINF folder wherever you find it, then restart the Madsonic service, and you should be good....
gurutech
Contributor
Contributor
 
Posts: 323
Joined: 02 Jan 2013, 04:56
Has thanked: 12 times
Been thanked: 130 times

Re: One touch/click mood list selection

Unread postby ciantm » 06 Mar 2014, 15:06

Hi again,

1) I removed the moods.jsp and replaced with my version (including any necessary image files) in the jetty/3860/webapp/WEB-INF/jsp directory.
2) I cleared all files under WEB_002dINF/ which included lots of class files including moods.jsp.class among others.
3) Stopped the service
4) Restarted madsonic
5) HTTP ERROR: 503

Problem accessing /index.view. Reason:

Service Unavailable
Powered by Jetty://

6) ....

Thank you for your help, i must have done something wrong here the classes/jsp/WEB_002dINF/ directory remains empty. I canot help but feel that removing everything in that directory was not the right way to go...

Any ideas?
ciantm
 
Posts: 7
Joined: 16 Jul 2013, 12:47
Has thanked: 2 times
Been thanked: 3 times

Re: One touch/click mood list selection

Unread postby gurutech » 06 Mar 2014, 21:51

It can take a while to get the site completely back up after restarting Madsonic; especially after clearing the site cache. Give it a while (10-15 mins should be enough), and try again.
gurutech
Contributor
Contributor
 
Posts: 323
Joined: 02 Jan 2013, 04:56
Has thanked: 12 times
Been thanked: 130 times

Re: One touch/click mood list selection

Unread postby ciantm » 07 Mar 2014, 09:07

No that is not the issue, the site is theoretically up and running as can be seen by the response from Jetty I gave. (I tail -f the madsonic_sh.log file when booting so I can track the boot errors/time etc)

I copied the contents of WEB_002dINF back into the directory and everything was fine with a reboot.

I still cannot integrate the moods.jsp file that I wanted to appear in the browser when clicking on "moods".

Any other ideas?!

Thanks
ciantm
 
Posts: 7
Joined: 16 Jul 2013, 12:47
Has thanked: 2 times
Been thanked: 3 times

Re: One touch/click mood list selection

Unread postby Madevil » 07 Mar 2014, 10:12

hi there,

you have more options to modify your JSP file.

with latest builds Madsonic 5.0 comes bundled with jetty8 so JSP files are precompiled to speedup the webapp and minimize read cycles from disk (embedded hardware).


best regards
User avatar
Madevil
Administrator
Administrator
 
Posts: 906
Joined: 07 Dec 2012, 03:58
Has thanked: 1320 times
Been thanked: 951 times

Re: One touch/click mood list selection

Unread postby ciantm » 07 Mar 2014, 13:10

Great thanks maddevil!

I'm giving 2) a try now.

Fingers crossed! :D
ciantm
 
Posts: 7
Joined: 16 Jul 2013, 12:47
Has thanked: 2 times
Been thanked: 3 times

Re: One touch/click mood list selection

Unread postby j3tblk » 15 Mar 2014, 11:19

Can someone please elaborate\\explain how to do this please: "use the back-ported jetty6 build"
I copied the files from '20140208_madsonic-5.0.3860-standalone.zip'
I could not edit the .jsp files
and then I tried the .war file from '20140208_madsonic-5.0.3860-war-jetty.zip'

into c:\madsonic rebooted and I still cannot edit the .jsp pages

I'm on Windows 7 machine
Thanks in advanced
j3tblk
 
Posts: 27
Joined: 10 Jan 2013, 20:49
Has thanked: 2 times
Been thanked: 6 times

Re: One touch/click mood list selection

Unread postby j3tblk » 16 Mar 2014, 18:58

Madevil wrote:hi there,

you have more options to modify your JSP file.

with latest builds Madsonic 5.0 comes bundled with jetty8 so JSP files are precompiled to speedup the webapp and minimize read cycles from disk (embedded hardware).


best regards

Still looking for help. The link above for option 2 is a .tar file. I can't use that on my Windows setup. I can't extract those files on Windows or Ubuntu to see what is inside. Anyone? Ideas? I've waited months to get the vague reply above. THANK YOU!

EDIT: Donation made in hopes of getting timely help on this.
j3tblk
 
Posts: 27
Joined: 10 Jan 2013, 20:49
Has thanked: 2 times
Been thanked: 6 times

Re: One touch/click mood list selection

Unread postby ciantm » 17 Mar 2014, 13:13

Hi j3tblk,

You should be able to access the tar archive using 7-zip in Windows. I am running the Mad server on a headless debian system that I access from Windows (ssh).

In the back ported version (option 1) you should be able to remove your "jetty" folder, removing the mini java server and then copy in the files from the tar.gz, unpack in the main directory, this will replace the .war file and booter among others (If you have settings saved in madsonic.sh make a backup as this will be replaced too).

Once you restart madsonic the jetty server will be rebuilt but the jsp files will not be precompiled into the server, they should be accessible and modifiable....

... however I am having a problem here...

Testing went like this
1) I renamed the moods.jsp file in WEB-INF etc.... and when i clicked on the "Moods" icon in Madsonic there was a 404 file not found - great, confirming it is trying to access that file I renamed - this is the result I hoped for.
2) I replaced the moods.jsp with my own moods.jsp (which functions as a standalone without a problem) but Madsonic moves incredibly slowly loading (even before clicking "Moods"). Not great :(
3) result currently still a fail for replacing the jsp files directly with new jsp file

I'll stumble on but not sure if I am doing something stupid here or not!

UPDATE: I have my replaced moods.jsp working fine now - still slower like the old madsonic but it's working anyway <b> Thanks maddevil I used option 1 - back ported Jetty</b> I re coded my jsp starting with the one in place and replacing to ensure it functioned all the way through changes.

P.S. The complication with this mood plane idea is that X-Y coordinates for moods are not "Official" and would have to just be accepted - not that small differences should be a big deal for anyone. I have not been able to find a full list of last.fm available moods so cannot do a "full mapping to x-y" - I believe the list is dynamic anyway is it?

Thanks all, j3tblk I hope the first bit helps.

Cian
ciantm
 
Posts: 7
Joined: 16 Jul 2013, 12:47
Has thanked: 2 times
Been thanked: 3 times

Re: One touch/click mood list selection

Unread postby j3tblk » 18 Mar 2014, 00:07

Are those bad uploads? I can't open them under Windows or Ubuntu.... I can't open the tar (tar.gz) files on any OS.
ok you can't right click and save as, you need to click the link and click on 'view raw file'
Last edited by j3tblk on 18 Mar 2014, 00:37, edited 2 times in total.
j3tblk
 
Posts: 27
Joined: 10 Jan 2013, 20:49
Has thanked: 2 times
Been thanked: 6 times

Re: One touch/click mood list selection

Unread postby j3tblk » 18 Mar 2014, 00:17

WOOO! After a year of using the same version, I'm updated. I killed the bloat and I'm running the way I want it!! THANKS!
Let this be a lesson to you all. You can wait a year or throw some money at the problem via that donate button! Ha!! :D :mrgreen: :lol: :P
j3tblk
 
Posts: 27
Joined: 10 Jan 2013, 20:49
Has thanked: 2 times
Been thanked: 6 times

Re: One touch/click mood list selection

Unread postby Matt Zornig » 05 Mar 2017, 00:48

Thats quite an old thread, but is anybody (still) using this and could create a video or something on how this is working in real life?
Looks very interesting and I wonder, how to use it in madsonic webgui.

ciantm wrote:Idea for implementation (replacement for moods.jsp or in parallel) I was having a look at an idea based on a Mood plane (x-y, negative/positve - energy) to allow a user to create a playlist based on a graphical one touch plane such as the attached jpg, particularly useful imo on tablets, but also on pc with a mouse
bild_forum.madsonic.org_download_file.php_id=163&mode=view_id=163&mode=view.jpg


useful:
creating a nice video from the own desktop:
https://www.techsmith.de/jing.html
https://www.techsmith.de/download-jing.asp
User avatar
Matt Zornig
Contributor
Contributor
 
Posts: 121
Joined: 14 Feb 2017, 12:03
Has thanked: 21 times
Been thanked: 14 times


Return to Feature Requests 5.x

Who is online

Users browsing this forum: No registered users and 1 guest