Closed izacq closed 1 year ago
That's a bug, a simple typo that crept in in version 2. Thanks for reporting.
There isn't a way to get podcasts or radio stations without also getting all the HTML, which really isn't what you want. Might be easier to write a simple script to get the info directly from the database.
Really appreciate the radio/podcast functions. I can't remove a radio station by clicking the x, I get back a 500 error. Maybe something to do with my nginx/php configuration? Have been trying to find a solution but can't figure it out.
nginx error log
2023/02/11 16:25:53 [error] 1072#1072: *13 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined method collection_base::sql_prepare_queryp() in /var/www/html/rompr/collection/collection_base.class.php:720 Stack trace: #0 /var/www/html/rompr/api/yourradio/index.php(12): collection_base->remove_user_radio_stream() #1 {main} thrown in /var/www/html/rompr/collection/collection_base.class.php on line 720" while reading response header from upstream, client:, server: , request: "POST /rompr/api/yourradio/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "", referrer: "http:///rompr/"
2023/02/11 16:26:11 [error] 1071#1071: *11 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined method collection_base::sql_prepare_queryp() in /var/www/html/rompr/collection/collection_base.class.php:720
Stack trace:
#0 /var/www/html/rompr/api/yourradio/index.php(12): collection_base->remove_user_radio_stream()
#1 {main}
thrown in /var/www/html/rompr/collection/collection_base.class.php on line 720" while reading response header from upstream, client: , server: , request: "POST /rompr/api/yourradio/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "", referrer: "http:///rompr/"
2023/02/11 16:28:45 [error] 1072#1072: *15 FastCGI sent in stderr: "PHP message: MARK : USERSTREAMS : : Doing User Radio Stuff; PHP message: PHP Fatal error: Uncaught Error: Call to undefined method collection_base::sql_prepare_queryp() in /var/www/html/rompr/collection/collection_base.class.php:720
Stack trace:
#0 /var/www/html/rompr/api/yourradio/index.php(12): collection_base->remove_user_radio_stream()
#1 {main}
thrown in /var/www/html/rompr/collection/collection_base.class.php on line 720" while reading response header from upstream, client: , server: , request: "POST /rompr/api/yourradio/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "", referrer: "http:///rompr/"
debug info (fresh install)
* **BACKEND INFO** * **Version** 2.00 * **System** Linux pi4 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 * **mysql_database** [Redacted] * **mysql_host** [Redacted] * **mysql_password** [Redacted] * **mysql_port** [Redacted] * **mysql_user** [Redacted] * **SERVER INFO** * **PHP_SELF** /rompr/utils/debuginfo.php * **SERVER_ADDR**
* **SERVER_NAME**
* **SERVER_SOFTWARE** nginx/1.18.0
* **DOCUMENT_ROOT** /var/www/html
* **HTTP_HOST**
* **HTTP_USER_AGENT** Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0
* **REMOTE_ADDR**
* **SERVER_PORT** 80
* **REQUEST_URI** /rompr/utils/debuginfo.php
* **COOKIES**
* **currenthost** Default
* **skin** desktop
* **clickmode** double
* **player_backend** mopidy
* **browser_id** 1676129081780
* **PHP INFO**
* **Version** 8.2.2
* **mbstring** 8.2.2
* **PDO** 8.2.2
* **pdo_mysql**
* **pdo_sqlite** 8.2.2
* **curl** 8.2.2
* **date** 8.2.2
* **fileinfo** 8.2.2
* **json** 8.2.2
* **SimpleXML** 8.2.2
* **GD** 8.2.2
* **GD Info** GD Version=2.3.3, FreeType Support=1, FreeType Linkage=with freetype, GIF Read Support=1, GIF Create Support=1, JPEG Support=1, PNG Support=1, WBMP Support=1, XPM Support=1, XBM Support=1, WebP Support=1, BMP Support=1, AVIF Support=1, TGA Read Support=1, JIS-mapped Japanese Font Support=
* **ImageMagick** Installed
* **date.timezone** global_value=UTC, local_value=UTC, access=7
* **default_charset** global_value=UTF-8, local_value=UTF-8, access=7
* **default_socket_timeout** global_value=60, local_value=60, access=7
* **display_errors** global_value=, local_value=, access=7
* **error_log** global_value=, local_value=, access=7
* **error_reporting** global_value=22527, local_value=22527, access=7
* **file_uploads** global_value=1, local_value=1, access=4
* **log_errors** global_value=1, local_value=1, access=7
* **max_execution_time** global_value=30, local_value=30, access=7
* **mbstring.language** global_value=neutral, local_value=neutral, access=7
* **memory_limit** global_value=128M, local_value=128M, access=7
* **pdo_mysql.default_socket** [NOT SET]
* **session.use_cookies** global_value=1, local_value=1, access=7
* **upload_tmp_dir** global_value=, local_value=, access=4
* **RELEVANT RUNNING PROCESSES**
* ****
```
www-data 1083 0.0 0.3 108156 31936 ? S 16:24 0:00 php /var/www/html/rompr/rompr_backend.php
www-data 1093 0.0 0.3 107984 30376 ? S 16:24 0:00 php /var/www/html/rompr/romonitor.php --currenthost Default
```
* **PLAYER INFORMATION**
* **Connection Status** Connection Successful
* **MPD Interface Version** 0.19.0
* **config** []
* **tagtypes** {"tagtype":["AlbumArtist", "MUSICBRAINZ_ALBUMARTISTID", "Disc", "Album", "MUSICBRAINZ_ALBUMID", "Title", "MUSICBRAINZ_ARTISTID", "Performer", "ArtistSort", "Genre", "Name", "Track", "Composer", "X-AlbumUri", "Comment", "Date", "AlbumArtistSort", "MUSICBRAINZ_TRACKID", "Artist"]}
* **commands** {"command":["add", "addid", "addtagid", "channels", "clear", "clearerror", "cleartagid", "close", "commands", "consume", "count", "crossfade", "currentsong", "decoders", "delete", "deleteid", "disableoutput", "enableoutput", "find", "findadd", "idle", "list", "listall", "listallinfo", "listfiles", "listmounts", "listneighbors", "listplaylist", "listplaylistinfo", "listplaylists", "load", "lsinfo", "mixrampdb", "mixrampdelay", "mount", "move", "moveid", "next", "notcommands", "outputs", "password", "pause", "ping", "play", "playid", "playlist", "playlistadd", "playlistclear", "playlistdelete", "playlistfind", "playlistid", "playlistinfo", "playlistmove", "playlistsearch", "plchanges", "plchangesposid", "previous", "prio", "prioid", "random", "rangeid", "readmessages", "rename", "repeat", "replay_gain_mode", "replay_gain_status", "rescan", "rm", "save", "search", "searchadd", "searchaddpl", "seek", "seekcur", "seekid", "sendmessage", "setvol", "shuffle", "single", "stats", "status", "stop", "subscribe", "swap", "swapid", "tagtypes", "toggleoutput", "unmount", "unsubscribe", "update", "urlhandlers", "volume"]}
* **notcommands** {"command":["config", "kill"]}
* **urlhandlers** ["file", "http", "https", "m3u", "rtsp"]
* **decoders** true
* **CONFIG**
* **rgbs** {"r":1, "g":1, "b":1, "a":"0.75"}
* **interface_language** null
* **music_directory_albumart**
* **sortbycomposer** false
* **composergenre** false
* **composergenrename** ["Classical"]
* **preferlocalfiles** false
* **mopidy_collection_folders** ["Local media"]
* **lastfm_country_code** DE
* **country_userset** true
* **debug_enabled** 0
* **custom_logfile**
* **cleanalbumimages** true
* **do_not_show_prefs** false
* **clear_update_lock** false
* **load_plugins_at_loadtime** false
* **beets_server_location**
* **dev_mode** false
* **live_mode** false
* **use_mopidy_scan** false
* **collection_load_timeout** 3600000
* **smartradio_chunksize** 5
* **linkchecker_nextrun** 1/1/1970, 1:00:00 AM
* **link_checker_frequency** 604800
* **link_checker_is_running** false
* **audiobook_directory**
* **collection_player** null
* **snapcast_server**
* **snapcast_port** 1705
* **snapcast_http** 1780
* **http_port_for_mopidy** 6680
* **multihosts** {"Default":{"host":"localhost", "port":"6600", "password":"", "socket":"", "mopidy_remote":false, "do_consume":false, "websocket":":6680/mopidy/ws", "websocket_port":"6680", "radioparams":{"radiomode":"", "radioparam":"", "radioconsume":[], "radiodomains":["local", "spotify", "youtube", "ytmusic"], "toptracks_current":1, "toptracks_total":1}}}
* **old_style_sql** false
* **auto_audiobook** []
* **backend_version** 2.00
* **spotify_mark_unplayable** false
* **consume_workaround** false
* **we_do_consume** false
* **smartradio_clearfirst** true
* **collection_type** sqlite
* **displaycomposer** true
* **artistsatstart** ["Various Artists", "Soundtracks"]
* **nosortprefixes** ["The"]
* **sync_lastfm_playcounts** false
* **sync_lastfm_at_start** false
* **next_lastfm_synctime** 1/1/1970, 1:00:00 AM
* **lastfm_sync_frequency** 86400
* **lfm_importer_start_offset** 0
* **lfm_importer_last_import** 0
* **hide_master_volume** false
* **alarm_ramptime** 30
* **alarm_snoozetime** 8
* **communityradioorderby** name
* **default_podcast_display_mode** 0
* **default_podcast_refresh_mode** 4
* **default_podcast_sort_mode** 0
* **podcast_mark_new_as_unlistened** false
* **podcast_sort_levels** 4
* **podcast_sort_0** Title
* **podcast_sort_1** Artist
* **podcast_sort_2** Category
* **podcast_sort_3** new
* **lastversionchecked** 1.00
* **lastversionchecktime** 10/25/55081, 5:22:43 PM
* **use_original_releasedate** false
* **chartoption** 0
* **lastfm_user**
* **autotagname**
* **lastfm_logged_in** false
* **lastfm_scrobbling** false
* **scrobblepercent** 50
* **use_mopidy_search** true
* **last_lastfm_synctime** 1676129801
* **currenthost** Default
* **player_backend** mopidy
* **browser_id** 1676129081780
* **clickmode** double
* **skin** desktop
* **sortbydate** false
* **notvabydate** false
* **collectionrange** 0
* **sortcollectionby** artist
* **sortresultsby** sameas
* **actuallysortresultsby** artist
* **alarmindex** null
* **sleeptime** 30
* **snooze** null
* **tradsearch** false
* **lastfm_autocorrect** false
* **sourceshidden** false
* **playlisthidden** false
* **infosource** lastfm
* **sourceswidthpercent** 25
* **playlistwidthpercent** 25
* **downloadart** true
* **chooser** radiolist
* **hide_albumlist** false
* **hide_filelist** false
* **hide_radiolist** false
* **hide_podcastslist** false
* **hide_playlistslist** false
* **hide_audiobooklist** false
* **hide_searcher** false
* **hide_pluginplaylistslist** false
* **hidebrowser** false
* **shownupdatewindow** 2.00
* **scrolltocurrent** false
* **lastfmlang** interface
* **synctags** false
* **synclovevalue** 0
* **theme** Numismatist.css
* **icontheme** Bobalophagus-Dark
* **coversize** 48
* **fontsize** 11
* **fontfamily** Nunito.css
* **displayresultsas** collection
* **crossfade_duration** 5
* **newradiocountry** countries/GB
* **updateeverytime** false
* **fullbiobydefault** true
* **mopidy_search_domains** ["local", "spotify"]
* **outputsvisible** false
* **wheelscrollspeed** 150
* **displayremainingtime** true
* **cdplayermode** false
* **auto_discovembobulate** false
* **sleepon** false
* **sortwishlistby** artist
* **player_in_titlebar** false
* **use_albumart_in_playlist** true
* **bgimgparms** {"dummy":"baby", "Numismatist.css":{"timeout":60000, "lastchange":1676045720771, "random":false, "position":"top left"}}
* **playlistbuttons_isopen** false
* **collectionbuttons_isopen** false
* **advsearchoptions_isopen** false
* **podcastbuttons_isopen** false
* **somafm_quality** highest_available_quality
* **stupid_rounded_corner_buffer_size** 0
* **maxrgbs** {"r":150, "g":150, "b":150, "a":"0.75"}
* **bgdrgbs** {"r":1, "g":1, "b":1, "a":"0"}
* **collectionconbuttons_isopen** true
Also would be interested if there is an easy way to get the saved radio stations/ latest podcast episodes through the api? I am currently using a playlist to map its entries to the input by an infrared remote with a script, would be neat to populate a playlist entry with the latest podcast episode (or replace the playlist request with a request to rompr's entries).