Skip to Content
It is currently December 4th, 2023, 3:35 pm

All times are UTC - 6 hours [ DST ]




 [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: February 17th, 2021, 9:25 am 
Offline
Junior User
Junior User

Joined: February 22nd, 2015, 3:22 pm
Posts: 32
Hello

I am busy with the installation of samHTMLweb service but the request function isn't working.

I have configured my HTMLoutput in SAM(SAM broadcaster pro/firebird) and created my FTP account on my webhoster(siteground). I opened the ports on the SAM IP adres(1221,3306) and contacted siteground to open 1221 at their site. Thats all working fine so far.

I have put in the credentials in the _config.html file( IP of SAM computer + Port1221 ).

I created a HTML site https://radiolovetunes.com/playlist/playlistA.html. But when i push the request button nothing is happening except opening a popup window saying ''Sorry, your request failed. The radio station responded with:
Unable to connect to 192.168.2.24:1221. Station might be offline, or connection is being blocked. (Err#: 803) '' There seems to be no connection to SAM but playing and songinfo are working fine.

I know that the IP adres is local and that could be the problem but thats not the IP adres i entered in the _config.html. it lookes like SAM changed it into the local ip. So now there is a local IP in all the playlist A-Z html files.

Can someone give some tips and trics to get this up and running?

_________________
Your Music, Your Station!
Easy Listening, Love Songs, Romantic Hits, Soft Rock
https://radiolovetunes.com/


Top
 Profile  
 
PostPosted: February 17th, 2021, 9:35 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
I think this is a quirk in the new SAM HTML templates. It's been broken like this for a long time.
Go to _header.html and change this:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
        <!-- Javascript for request and songinfo actions -->
        <script type="text/javascript">
            /**
             * Open a popup window to send a song request to SAM
             */
            function request(songID)
            {
                var samhost = "$samhost$";
                var samport = "$samport$";
                requestAudioRealm(songID, samhost, samport);
            }
        </script>

To this:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
        <!-- Javascript for request and songinfo actions -->
        <script type="text/javascript">
            /**
             * Open a popup window to send a song request to SAM
             */
            function request(songID)
            {
                var samhost = "123.456.789.012";
                var samport = "$samport$";
                requestAudioRealm(songID, samhost, samport);
            }
        </script>


Make sure to replace 123.456.789.012 with either your actual (public, check https://v4.ident.me) IP address (if that one never changes) or your DynDNS hostname (if your IP changes every 24hrs or when you power-cycle the Wifi-Router/Internet modem)

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
 
PostPosted: February 17th, 2021, 9:49 am 
Offline
Junior User
Junior User

Joined: February 22nd, 2015, 3:22 pm
Posts: 32
Ok and just leave samport samport or should it also be 1221?

_________________
Your Music, Your Station!
Easy Listening, Love Songs, Romantic Hits, Soft Rock
https://radiolovetunes.com/


Top
 Profile  
 
PostPosted: February 17th, 2021, 9:52 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
I think the auto-detection for the port works just fine, unless of course you set up your SAM port and the port to forward to different numbers.

i.e.: internal 1221 => 8080 external

In that case you need to write the port number for external in here. But if you forwarded the port to the same numbers, SAM auto-detection should do fine as there's no way for it to confuse that.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
 
PostPosted: February 17th, 2021, 10:23 am 
Offline
Junior User
Junior User

Joined: February 22nd, 2015, 3:22 pm
Posts: 32
I have changed the IP in the _heater file. But it still gives the same error

Sorry, your request failed. The radio station responded with:
Unable to connect to 192.168.2.24:1221. Station might be offline, or connection is being blocked. (Err#: 803)

So it still changes the IP in the playlistA file to 192.168.2.24.

_________________
Your Music, Your Station!
Easy Listening, Love Songs, Romantic Hits, Soft Rock
https://radiolovetunes.com/


Top
 Profile  
 
PostPosted: February 17th, 2021, 10:30 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
Did you regenerate the playlist files after you changed the value? (Tools => HTML Output => Generate Playlist)

Playlist files aren't updated automatically, only the now playing/history page is automatically recreated every time the track changes (because obviously you don't change your library that often and it would be a waste of time to generate and upload all those files anew each time)

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
 
PostPosted: February 17th, 2021, 10:34 am 
Offline
Junior User
Junior User

Joined: February 22nd, 2015, 3:22 pm
Posts: 32
Yes i did regenerate it. I see something happening in the FTP log also. At https://radiolovetunes.com/playlist/playlistA.html the page source also gives the local IP again.

_________________
Your Music, Your Station!
Easy Listening, Love Songs, Romantic Hits, Soft Rock
https://radiolovetunes.com/


Top
 Profile  
 
PostPosted: February 17th, 2021, 12:31 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
Are you sure, you're editing the correct _header.html / _config.html (In Program Files or in Users\<yourusername>\AppData\...), double-check in your SAM config.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
 
PostPosted: February 17th, 2021, 2:15 pm 
Offline
Junior User
Junior User

Joined: February 22nd, 2015, 3:22 pm
Posts: 32
Yes it should be the right one. Path is C:\Program Files (x86)\SpacialAudio\SAMBC\samHTMLweb

I've tried to change the IP in the playlistA.html with the editor. But it doesn't work either.

_________________
Your Music, Your Station!
Easy Listening, Love Songs, Romantic Hits, Soft Rock
https://radiolovetunes.com/


Top
 Profile  
 
PostPosted: February 17th, 2021, 2:38 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
Do you run SAM as an administrator?
Because otherwise I think SAM can't change any of the files in C:\Program Files (x86)\ (at least if you're running Vista or newer)
That's not to annoy you (well, it might be the SAM developers intent to annoy their users when they don't change the default setting), but is really a security issue.
In old Windows (XP and older) programs were allowed to write/change files in C:\Program Files without having to ask for additional permissions. But that also meant that one malicious program could change all the other programs on your computer to include the malware as well.
As of Windows Vista access to program files is restricted to Administrators, which is why Auto-Updaters and Installers will have to show you the nag screen and ask for admin privileges.

SAM doesn't have this nag screen thingy built-in and it would actually be very annoying if it did that on every track change.

To fix this problem:
In SAM go to tools => Jump To => Data folder
A new Windows Explorer window should open. Click the address bar and copy the contents (alternatively right-click the samHTMLweb folder inside the new window while holding the shift key and click copy as path).
Close the explorer Window and go back to SAM.
In the HTML config window, change the paths on both halves of the panel and on both the left (input file) and right (output file) side by double-clicking each of the three list entries.

i.e. change:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
C:\Program Files (x86)\SpacialAudio\SAMBC\samHTMLweb\_playing.html

to:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
C:\Users\benedikt\AppData\Local\SpacialAudio\SAMBC\samHTMLweb\_playing.html

(Insert your own username instead of mine in the new path :!: )

I said to copy the path, because that's usually easier for people than to ask them and find out their Windows username or take only the username part of the SAM "Data path", but if you feel comfortable finding out your username from the explorer window opened from SAM, you can just use that and adjust the username in my above example.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
 
PostPosted: February 17th, 2021, 2:58 pm 
Offline
Junior User
Junior User

Joined: February 22nd, 2015, 3:22 pm
Posts: 32
Yes at first i couldn't change anything but when i used notepad ++ it worked. Now i have changed the _config file + _header file in programfiles (x86).

Just one control question. Do you really mean change the playing in and output, because for me thats not really the issue. Its more related to the playlist and the request function or do the two things have a relation with eachother?

i.e.

C:\Program Files (x86)\SpacialAudio\SAMBC\samHTMLweb\playlistA

to

C:\Users\ferbe\AppData\Local\SpacialAudio\SAMBC\samHTMLweb\playlistA

Do you mean i have to change it in every red square (see attachement)


Attachments:
HTML output.png
HTML output.png [ 28.8 KiB | Viewed 7834 times ]

_________________
Your Music, Your Station!
Easy Listening, Love Songs, Romantic Hits, Soft Rock
https://radiolovetunes.com/
Top
 Profile  
 
PostPosted: February 17th, 2021, 5:51 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
I would suggest so, yes.

Just make sure to leave the filename (_playlist.html / playlist.html, _playing.html / playing.html, _songinfo.html / songinfo.html) as is (i.e.: do not write playlistA.html, SAM will automatically add the letters and numbers at the end for the "split" template)

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
 
PostPosted: February 18th, 2021, 6:59 am 
Offline
Junior User
Junior User

Joined: February 22nd, 2015, 3:22 pm
Posts: 32
I have changed it in both ways. Between this i have generate the playlist agian. But still it gives the request failure on the local Ip adres sometimes.

But there is a positive thing :). The errors I get now differ from each other Err601 and Err803. So i think thats a good thing. And even 2 requests were working. I removed the samHTML files from my FTP server and uploaded them again.

But still and what i mentioned earlier i get the error with the local Ip in it. I checked the HTML file A-Z but there's no local IP in it anymore?

(!empty($user->lang['QUOTE'])) ? $user->lang['QUOTE'] : ucwords(strtolower(str_replace('_', ' ', 'QUOTE'))):
Sorry, your request failed. The radio station responded with:
Unable to connect to 192.168.2.24:1221. Station might be offline, or connection is being blocked. (Err#: 803)


So the HTML source on the background has the SAM IP in it but the error. Can you pleas look into it?

https://radiolovetunes.com/playlist/playlistA.html

One other question. You see some duplication in songs. Can you tell me were some is generating the playlist from so i can get rid of the duplicates but can behold my different clockweel functions?

_________________
Your Music, Your Station!
Easy Listening, Love Songs, Romantic Hits, Soft Rock
https://radiolovetunes.com/


Top
 Profile  
 
PostPosted: February 18th, 2021, 7:12 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
I couldn't find your local IP anywhere either, but for me the Audiorealm popup seems to have worked just fine.

Ferry (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
One other question. You see some duplication in songs. Can you tell me were some is generating the playlist from so i can get rid of the duplicates but can behold my different clockweel functions?

Music (All)

SAM will list all tracks that are type S (Song/Music) on the playlist page.
If you hover over the request buttons you'll see the URL where it points in the bottom-left corner. It'll look something like this javascript:request(1234); where 1234 is the unique songID of that track.
Take for example Aerosmith - Crazy-1994. You have that track twice in your library. One has the ID 7243 and the other has the ID 9429

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
 
PostPosted: February 18th, 2021, 7:27 am 
Offline
Junior User
Junior User

Joined: February 22nd, 2015, 3:22 pm
Posts: 32
(!empty($user->lang['QUOTE'])) ? $user->lang['QUOTE'] : ucwords(strtolower(str_replace('_', ' ', 'QUOTE'))):
I couldn't find your local IP anywhere either, but for me the Audiorealm popup seems to have worked just fine.


Ok but do you know why it gives this error sometimes on the local IP? It seems that when i did not refresh the request page for sometime it gives this error. When i refresh the playlist in the browser it works again.

(!empty($user->lang['QUOTE'])) ? $user->lang['QUOTE'] : ucwords(strtolower(str_replace('_', ' ', 'QUOTE'))):
SAM will list all tracks that are type S (Song/Music) on the playlist page.


Ok so only the songs who are filed in the folder Music (all) get listed. Songs that i file in content will not?

_________________
Your Music, Your Station!
Easy Listening, Love Songs, Romantic Hits, Soft Rock
https://radiolovetunes.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
 [ 20 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group