mirror of
				https://github.com/LaQuay/TDTChannels.git
				synced 2025-10-31 10:12:15 +01:00 
			
		
		
		
	fix web
This commit is contained in:
		
							parent
							
								
									ba7270e3be
								
							
						
					
					
						commit
						341060490e
					
				
					 4 changed files with 15 additions and 15 deletions
				
			
		script
|  | @ -209,7 +209,7 @@ function loadChannelsInList() { | ||||||
|         return response.json(); |         return response.json(); | ||||||
|       }) |       }) | ||||||
|       .then(function(myJson) { |       .then(function(myJson) { | ||||||
|         nacionales = myJson[1]; |         nacionales = myJson["countries"][0]; //Spain is the [0] country
 | ||||||
| 
 | 
 | ||||||
|         var items = []; |         var items = []; | ||||||
|         $.each(nacionales["ambits"], function( ambit, ambit_val ) { |         $.each(nacionales["ambits"], function( ambit, ambit_val ) { | ||||||
|  |  | ||||||
|  | @ -148,12 +148,12 @@ andorra.add_ambit(Ambito("Andorra", get_radio_channels_from_part(canales_andorra | ||||||
| 
 | 
 | ||||||
| # Save data to JSON file | # Save data to JSON file | ||||||
| json_result = {"license": get_license_info(), | json_result = {"license": get_license_info(), | ||||||
| 			   "epg_url": None, |                "epg_url": None, | ||||||
| 			   "countries": [spain.to_json(),  |                "countries": [spain.to_json(), | ||||||
| 			   				international.to_json(),  |                              international.to_json(), | ||||||
| 			   				andorra.to_json()], |                              andorra.to_json()], | ||||||
|    				"updated": get_current_timestamp() |                "updated": get_current_timestamp() | ||||||
| 			  } |                } | ||||||
| json_file = open('./public/output/radio_channels.json', "w+") | json_file = open('./public/output/radio_channels.json', "w+") | ||||||
| json_file.write(json.dumps(json_result, indent=4, sort_keys=False)) | json_file.write(json.dumps(json_result, indent=4, sort_keys=False)) | ||||||
| json_file.close() | json_file.close() | ||||||
|  |  | ||||||
|  | @ -160,12 +160,12 @@ andorra.add_ambit(Ambito("Andorra", get_tv_channels_from_part(canales_andorra))) | ||||||
| 
 | 
 | ||||||
| # Save data to JSON file | # Save data to JSON file | ||||||
| json_result = {"license": get_license_info(), | json_result = {"license": get_license_info(), | ||||||
| 			   "epg_url": "https://raw.githubusercontent.com/HelmerLuzo/TDTChannels_EPG/master/TDTChannels_EPG.xml", |                "epg_url": "https://raw.githubusercontent.com/HelmerLuzo/TDTChannels_EPG/master/TDTChannels_EPG.xml", | ||||||
| 			   "countries": [spain.to_json(),  |                "countries": [spain.to_json(), | ||||||
| 			   				international.to_json(),  |                              international.to_json(), | ||||||
| 			   				andorra.to_json()], |                              andorra.to_json()], | ||||||
| 			   	"updated": get_current_timestamp() |                "updated": get_current_timestamp() | ||||||
| 			  } |                } | ||||||
| json_file = open('./public/output/channels.json', "w+") | json_file = open('./public/output/channels.json', "w+") | ||||||
| json_file.write(json.dumps(json_result, indent=4, sort_keys=False)) | json_file.write(json.dumps(json_result, indent=4, sort_keys=False)) | ||||||
| json_file.close() | json_file.close() | ||||||
|  |  | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import re |  | ||||||
| import calendar | import calendar | ||||||
|  | import re | ||||||
| import time | import time | ||||||
| 
 | 
 | ||||||
| from channel import Channel | from channel import Channel | ||||||
|  | @ -73,7 +73,7 @@ def get_tv_channels_from_part(text): | ||||||
|                 if "# GEO" in option: |                 if "# GEO" in option: | ||||||
|                     more_info = ["GEO"] |                     more_info = ["GEO"] | ||||||
|                 else: |                 else: | ||||||
|                     more_info =[] |                     more_info = [] | ||||||
|                 channel.add_option(format, url, more_info) |                 channel.add_option(format, url, more_info) | ||||||
|         channel_list.append(channel) |         channel_list.append(channel) | ||||||
|     return channel_list |     return channel_list | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Marc Vila
						Marc Vila