Commit Graph

145 Commits

Author SHA1 Message Date
Anton 5dc9192977 * improve docs and add img.svg 2024-04-24 12:47:31 +05:30
Anton 1d3ceafe1f * call setCurPos only when state changes 2024-04-18 17:46:52 +01:00
Anton 5bdb95cd99 * add support for playlist files
* use 'using' to define type names
2024-04-16 18:30:38 +01:00
Anton be71b5ba8a refract some code
* change some comments ## to #
* [code-reuse] use inv to print volume
* remove procedure brackets
2024-04-16 18:36:51 +05:30
Anton 26f9538661 *[bug/volume][amd64]fix changeVolume cause stack smashing
[amd64]cint being defined as int32 cause stack smashing
or unsupported format for accessing property
2024-04-11 12:41:08 +01:00
Anton 7f35330d6b *[clean-code] push bycopy as pragma instead of individually.
*made notifyPlayerState a proc beacuse template just adds
duplicate code

 - [1] code look clean.
 - [2] obvious.
2024-04-10 09:13:49 +01:00
Anton 081d8baa26 * refract some code
turns out that the code inside notifyPlyerState is being called
while true, thats not needed, so jst put this when the user presses
the key.
2024-04-09 12:03:14 +01:00
Anton 7dbba5ff3e * put a timeout and counter to reduce unneccesary cpuUsage
- using getKey w/o a timeout causes 20% (my)cpu usage. just put 25ms
into it.

- seeIfCoreIsIdling is also expensive as hell, so just put a counter.
2024-04-08 17:19:43 +01:00
Anton 62def6c981 * add core is idling case to handle that situation
* put macos dylib name const
2024-04-07 22:58:24 +05:30
Anton 82a635914a *[bug/arm]fix checkError replyUserDataBug when seeIfSongTitleChanges
the implemation in arm32 devices causes checkError unsupported
format for accessing property, i tried with the c implementation
and it would work, digging around found that client had put
replyUserData as cint, but client.h has it uint64_t, chnaged
it to uint64 and it works now.
2024-04-07 16:55:46 +05:30
Anton 791ff29e20 * use illwill to implement getch with timeout 0
* [regression] from crossPlat, fixed by using rsplit
* reindent call, unneccesary indentations confuse the devs
* added illwill in readme/cites
* getCurrentSongV2 matured, getCurrentSong disasbled

[1] illwill has some good implementation, we will clone it and remove dead code

[2] when we implemented unixToNativePath it seems for subdirectories, it gets
    the absolute path when showing the name

[3] if elif linkCheck intends the entire implmentation of call just to avoid return

[4] comeon its just good practice to cite people
2024-04-06 11:09:13 +01:00
Anton faf2eadcf8 * implement getCurrentSongv2 using mpv property media-title
instead of using getContent, using mpv's own implementation to
parse buffers to get icy-title

- can parse more links
- the code is more mature, we will outsource it
2024-04-05 13:20:12 +01:00
Anton 92e916e666 *[docs]place what we give you in the above
*[refraction]use export to not import terminal in main
*[design]replace rsplit to split (functionally latter make sense)
2024-04-05 10:02:36 +01:00
Anton 8315be9727 *[docs] update and improve the docs
*[crossPlat]use proc`/` completely
2024-04-03 11:32:18 +01:00
Anton d054911dfb *[crossPlat]use unixToNativePath for crossPlat fs parsing
*rm nim.cfg as its unneeded
2024-04-03 13:15:14 +05:30
Anton c953521f4f *[crossPlat]use pathnorm.`/` instead of unix / to normalze filesys interactions 2024-04-02 21:10:55 +05:30
Anton 2471a09a37 * use getAppDir to make pnimrp run independently on from shell 2024-04-01 16:37:59 +05:30
Anton 84380689ea *[code refeaction]notes(): use reusable code and rm dup code
*dynLibName made a const with when defenition
2024-03-31 11:58:58 +05:30
Anton 444ded4518 *refraction 2024-03-30 12:08:06 +05:30
Anton bff7b33b5c *minor improvemnts
*indent enum val and using stmt properly
*make use default args for waitEvent (for polling), warn
*rearrange init args to better it in
2024-03-28 09:49:43 +05:30
Anton f33ce5bc91 *[regression][x86]fix pointer return SIGSEV when echo event.eventID using mpv_event_name()
*[maintainability]add Event to eventID enums for readability
*[robust]remove IDIdle as its deprecated
*[safety]use let instead var when possible
*[design]make isHttps private, remove isHttps param from doesLinkWork
*eraseLine for nowplaying and event state
*rm parseJ* -> merge to passJArray*
*replace low(qoutes) -> 0
2024-03-27 17:44:08 +05:30
Anton 5aba400859 * modularize term to smaller modules
* stop using fmt and remive strformat as dependency
* created player/ volume, mute , pause for cleaner code
2024-03-26 00:05:48 +05:30
Anton 03c7a9dd2e *implement httpsCheck for doesLinkWork
*make muteFlow use isMuted variable
*robust code: add runtime case of pause and mute
2024-03-25 18:29:01 +05:30
Anton 6344426353 *only getCurrentSong() when not notImplemented to avoid wasted requests 2024-03-25 17:25:21 +05:30
Anton 641fc79f3c *update nowStreaming independent of pause-resume flow
*remove uneeded returnType defenitions from procs (compiler gues
*warn() gets colour param as means of notification
*comment debug code
*rm dir var from initJsonLists -> merged to files
2024-03-24 21:17:38 +05:30
Anton 09a718d218 *fix folderParse returnBack IOError 2024-03-23 22:41:17 +05:30
Anton e31988437b *add folderParseSupport using forwardDeclaration
*renamed exported menu() to draeMainMenu
*added more clickFields in drawMainMenu
*identified synchronous getch() design problem with event.eventID refresh
*let drawMainMenu call initIndx
2024-03-23 16:45:13 +05:30
Anton a1569f3010 *downgraded nim version
*reindent some code
*remove push discardable to force using checkError
*remove osproc, parseutils as dependencies
*improve variable name in call()
2024-03-22 11:19:11 +00:00
Anton 41fc9eb5d5 *show newVolume using strfmt
*remove unneeded exports
*remove proc notes/exec()
*added checkError to comply with standard
2024-03-21 09:56:56 +05:30
Anton 019108b523 *fix mainMenuPlayerName not drawn
*timeout chnaged to 2sec
*useless code removed in pnimrp
2024-03-20 11:30:31 +00:00
Anton 0ffe974498 *use mpvApi to control audio rather than self
*remove notNeeded code according to above
*waitEvent gets 0ms timeout
2024-03-19 23:10:59 +05:30
Anton 5f45e897bb *improvements
*update paused muted code to api
*remove useless code
2024-03-19 14:29:57 +05:30
Anton 86a2788e59 *improvements
*update nimble file with new username description
*removing return false as default return false when except
*ntimplementedBug fixed
*refraction around clearlink
2024-03-18 23:59:12 +05:30
Anton 2973348b1d *pass https links to mpv w/o doesLinkWork
*remove unnecessary return keywords, compiler can understand
2024-03-18 10:27:32 +00:00
bloomingchad e2919e1add *improved code for better error handling and more
*updated copyright year and author
*added arab.json
*updated religious, hardstyle and others..
*fixed a jsonParseError bug
*change quit return value to 0 when no error
*added better error handling around getCurrentSong()
*doesLinkWork matured for validating radio links
*song updater queued
*eventID checking bettered and actually works
*added some debug printf(s)
2024-03-17 23:09:00 +05:30
bloomingchad ac0e40ebd7 *badLink bug progress *httpsNeverUsed bug fixed *casting event->event_id works 2024-03-16 22:53:31 +05:30
bloomingchad 97b13001d8 *fixed code.json links *added religious.json *converted code to official styling guide 2024-03-14 22:32:38 +05:30
antonl05 817dea945c *rearrange rm code 2022-09-07 00:21:12 +05:30
antonl05 1d73fafb9a [LAST_COMMIT]*add links *add BadLinkCheck *rm checkHttpsOnly var link 2022-06-05 22:22:56 +05:30
antonl05 dea2204d10 *add links *fix infiniteBufferingForShoutcastBug by checkHttpOrHttps 2022-06-05 20:35:37 +05:30
antonl05 c1a6e02cc2 *fix news,bollywood *add http or https checking 2022-06-05 17:16:14 +05:30
antonl05 1c62ee61c7 *fix news *rm infowars *rm async *polish nowPlaying 2022-06-05 15:53:08 +05:30
antonl05 7296e42b4c *rm render,streamCB *add NowPlaying 2022-06-04 23:17:29 +05:30
antonl05 1cfe778ead *make initIndx
*mv initIndx -> term
*add ©year
2022-06-04 20:15:53 +05:30
antonl05 7aadc3515c *restyle to match std *fix linkInvalidBug *add dirs 2022-06-02 00:29:36 +05:30
antonl05 ac36dda8c3 *restructure term(rm notes) 2022-06-01 20:34:09 +05:30
antonl05 824e872641 *remove http from assets 2022-06-01 19:37:26 +05:30
antonl05 cc440b0d30 *forgot to put qoutes 2022-05-25 21:54:10 +05:30
antonl05 fdc42b3912 *add code section 2022-05-25 21:37:05 +05:30
antonl05 f4d5cb9e27 *fix hideCursorBug in notes 2022-05-03 11:06:38 +05:30