Skip to content
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

Closed

Conversation

xabispacebiker
Copy link
Contributor

<script>
$(document).ready(function() {
$("#scheduleTabs").airtimeWeekSchedule({
sourceDomain:"https://airtime.97irratia.info/",
Copy link
Member

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.

Copy link
Contributor Author

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",
Copy link
Member

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
@Robbt
Copy link
Member

Robbt commented Oct 16, 2018

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.

@xabispacebiker xabispacebiker changed the title Libretime widgets v3 [WIP] Extended Weekly Schedule Widget Oct 16, 2018
@hairmare
Copy link
Member

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 git remote -v? I'll write up some step by step instructions to get you recovered, but you'll need to have a local working copy to follow them.

@xabispacebiker
Copy link
Contributor Author

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 git remote -v? I'll write up some step by step instructions to get you recovered, but you'll need to have a local working copy to follow them.

Hi @hairmare , I do.. this is the output:

origin https://xabierarrabal%40airean.info@github.com/xabispacebiker/libretime (fetch)
origin https://xabierarrabal%40airean.info@github.com/xabispacebiker/libretime (push)

@xabispacebiker
Copy link
Contributor Author

I am thinking of removing this pull request as I have realized there is another one which is more integrated with libretime #443

@Robbt
Copy link
Member

Robbt commented Oct 18, 2018

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.

@hairmare
Copy link
Member

@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:

git checkout master
git pull upstream master

Usually we recommend not putting any changes onto the master branch and keeping it in sync with upstream like above.

@frecuencialibre
Copy link
Contributor

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 :

git branch my_fabulous_contribution <commit_hash>

Revert to the airtime.po version in master branch to avoid conflicts
@JohnnyC1951
Copy link

JohnnyC1951 commented Nov 7, 2018

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.

@xabispacebiker
Copy link
Contributor Author

xabispacebiker commented Nov 12, 2018

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.
@JohnnyC1951 , I used to do same as you do with cron jobs. The website server was not the same server running libretime, so I had to include an ftp command to upload the generated schedule in a frequently running cron.

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.

@JohnnyC1951
Copy link

JohnnyC1951 commented Nov 12, 2018

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).
Side-note: I extended the api to expose more useful stuff.

@stale
Copy link

stale bot commented Oct 20, 2019

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.
Please chat to us on discourse or ask for help on our chat if you have any questions or need further support with getting this issue resolved.
You may also label an issue as pinned if you would like to make sure that it does not get closed by this bot.

@stale stale bot added the status: stalled This issue or pull request is stalled label Oct 20, 2019
@stale
Copy link

stale bot commented Nov 19, 2019

This issue has been autmatically closed after is was marked as stale and did not receive any further inputs.
Feel free to let us know on discourse or ask for help on our chat if you feel this issue should not have been closed.
Thank you for your contributions.

@stale stale bot closed this Nov 19, 2019
@xabispacebiker xabispacebiker deleted the libretime-widgets-v3 branch August 17, 2022 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: stalled This issue or pull request is stalled
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants