New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Extended Weekly Schedule Widget #565
[WIP] Extended Weekly Schedule Widget #565
Conversation
Modified getNextShows SQL to retrieve additional fields
<script> | ||
$(document).ready(function() { | ||
$("#scheduleTabs").airtimeWeekSchedule({ | ||
sourceDomain:"https://airtime.97irratia.info/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need to make this URI dynamic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ups, yeah.. nice catch
miscText:{time:"Time", programName:"Show name", details:"Details", readMore:"Read more", defaultGenre:"Radio", nowPlaying:"on Air now..."}, | ||
backgroundColor: "#d52a33", | ||
textColor: "#fff", | ||
programImage: "https://97irratia.info/wp-content/uploads/2015/03/6461315162291g.jpg", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one as well...
Updating hardcoded urls
I suspect that the issue might be that the commit you are trying to undo is already committed to your master branch or whatever you are forking from. I know I've seen unrelated commits show up when I didn't have my master synced to the main libretime master repo. I don't know I'm not a git master, but hopefully we can figure this out. I was also thinking that ideally we would have some sort of choice for people, like different widgets/themes they could use, but that is outside of the scope of this commit. |
Hey @xabispacebiker I think I realized what went wrong. Do you have a local working copy? If so, could you please post the output of |
Hi @hairmare , I do.. this is the output: origin https://xabierarrabal%40airean.info@github.com/xabispacebiker/libretime (fetch) |
I am thinking of removing this pull request as I have realized there is another one which is more integrated with libretime #443 |
I wouldn't remove it. We may want to create a PR that provides multiple options as a UI choice or takes the best of both of these PRs and combines them. |
@xabispacebiker The po change seems to be on your master branch. I would probably recover from this as follows, just be sure to copy the airtime.po file somewhere safe as the below will remove you the change from git. # switch to master and revert to upstream
git checkout master
git remote add upstream git@github.com:LibreTime/libretime.git
git fetch --all
git reset upstream/master --hard
git push origin --force
# rebase libretime-widgets-v3 branch to updated master
git checkout libretime-widgets-v3
# rename working branch
git branch -m libretime-widgets-v3-old
# recreate branch with libretime-widgets-v3 name
git checkout -b libretime-widgets-v3
# cherry-pick all the commit except the po update onto new branch
git cherry-pick 210e7d34bf765656bad237298114d9c2fb4f1f9e d23a4d8a6256949b868c951de5fd007dfc7dce7d a5bced468324a7ef763951272e2cf86b8c914d53 6151068a53ae1ecb67f43c7378f4befc89a06d8a b3e771534466bdebec27fc33478c5b7ba68e0aa4
# force push new branch into this PR
git push origin libretime-widgets-v3 --force-with-lease After this you can create a new commit with the airtime.po change by switching to a new branch after checking out master and redoing the commit. In the future, when you want to update your master branch you should do it like so:
Usually we recommend not putting any changes onto the master branch and keeping it in sync with upstream like above. |
i hit this same problem on a much simpler pull request. i had to stash changes, delete the branch both locally and in my fork, and then create a new branch for my PR, this time from the last commit pulled from origin :
|
Revert to the airtime.po version in master branch to avoid conflicts
I have not trawled though all the changes, but here are some notes that might be useful to somebody. In my version, I now run it from a new folder in the public folder. This makes for easy css site wiget styling, without mangling the core and survives updates. I also cache it from a frequent cron job. The cached file is popped into a Joomla iFrame module..With suitable mod_expires in .htaccess (for all the show images) and an http2 enabled apache (I had to use newer Icecast 2.5b2 to get the green padlock for all of this - don't use tls!), it makes a huge difference to widget load time and, I guess, database load. |
Definitely this pullrequest is not the best way to do it and needs some improvements, somebody requested in the forum to upload it to libretime but I know it can be done better. I think It would be a nice implementation disallowing the direct access to web widgets and process all requests via cached files so the server does not get overloaded in case of many schedule or "on air" widget requests, the server gets exhausted when this happens. |
I just use a one-line bash cron script that uses wget, to pull the whole schedule widget (with schedule) and saves it to file (it is DRAMATICALLY FASTER for the listener). This could be on the station's listener website or It could also all be done in the widget without a cron (e.g. if file is older than 20 mins then curl a new copy into the cache). The listener facing website simply loads the cached file into a responsive iframe. Simple, fast and works (like my women). |
This issue has been automatically marked as stale because it has not had activity in the last 5 months. It will be closed if no activity occurs in the next month. |
This pull request improves the weekly widget as in https://97irratia.info/programazioa/
https://discourse.libretime.org/t/fast-new-extended-weekly-schedule-widget-for-testing/133/4