Commit Graph

43 Commits

Author SHA1 Message Date
OfficialDakari a713d6ecae allow changing axios settings 2024-10-10 19:45:40 +05:00
zS1L3NT Mac 2817c590ee
🚀 long awaited bug fixes 2024-07-08 04:51:51 +08:00
zS1L3NT Mac 09f113e7bb
use zod instead of arktype 2024-07-08 04:22:01 +08:00
SAROND 9b30a9e5f6 hotfix: correct traversal paths and improve test assertions
Fixed incorrect object traversal paths in `YTMusic.getHome` method to properly navigate through nested JSON. Enhanced `getHome.spec.ts` by adding a check for non-empty array of `HomePageContent` and logging the length of the retrieved contents.
2024-01-16 17:26:53 +04:00
SAROND f9664fe267 feat(YTMusic): implement continuous pagination in getHome method
This commit introduces the ability to fetch and parse additional pages of content in the `getHome` method of the `YTMusic` class by utilizing a continuation token. The previous implementation only fetched the initial page of content. Now, after parsing the initial page, the method checks for a continuation token and continues to fetch and parse subsequent pages until no continuation token is found, allowing for complete retrieval of home page content.

Additionally, there has been a minor change in the `SongParser.parseSearchResult` method where the logic to identify the title and artist from search results has been simplified due to the impossibility of distinguishing them with the current data structure. The new approach uses fixed positions in the columns array to assign title and artist.
2024-01-16 04:05:42 +04:00
SAROND b428f87321 patch: add comments 2024-01-15 19:53:02 +04:00
SAROND 6ed8230448 feat(YTMusic): implement HomePageContent retrieval and parsing
Added functionality to retrieve and parse the home page content in YTMusic class. The `getHome` method fetches home page data and uses the new `Parser.parseMixedContent` method to parse the content into `HomePageContent` type. Also, updated AlbumParser to handle potential null values more gracefully and added PlaylistWatch type parsing.

- Added `FE_MUSIC_HOME` constant for home page ID.
- Implemented `getHome` method in `YTMusic` class.
- Created `parseMixedContent` in `Parser` class.
- Updated `AlbumParser` and `SongParser` to handle nullable fields.
- Added `PlaylistWatch` type and parsing in `PlaylistParser`.
- Added tests for the new home page content feature.
2024-01-15 19:34:51 +04:00
zS1L3NT Mac f59cfc7f29
add ability to change locale 2024-01-13 12:18:09 +08:00
zS1L3NT Mac 7cb39bca6a
♻️ refactor traverse utilities functions 2023-12-28 02:31:09 +08:00
zS1L3NT Mac aca523a303
make artists singular and delete descriptions 2023-12-28 01:16:20 +08:00
zS1L3NT Mac dd06c5ac65
mostly complete testing, preparing for data type change 2023-12-27 23:25:22 +08:00
zS1L3NT Mac 2178137c29
add lyrics fetching 2023-12-27 14:54:25 +08:00
zS1L3NT Mac bfdceea12d
use arktype instead of zod 2023-12-22 03:25:11 +08:00
zS1L3NT Windows efb17791e6 🔖 4.3.0
add back video count only to PlaylistFull
2023-08-08 05:19:05 +08:00
zS1L3NT Windows ab7aaaee8c 🚨 fix linting 2023-07-30 00:09:26 +08:00
zS1L3NT Windows df173dfe47 allow injecting custom cookies 2023-07-29 23:55:56 +08:00
zS1L3NT Windows de2b653fa6 🐛 fix album artists 2023-07-29 23:23:53 +08:00
zS1L3NT Windows eccf197dcb 🐛 fix search results 2023-07-29 23:12:09 +08:00
zS1L3NT ed3b4127f8 new version of ytmusic-api abandoning validate-any 2022-12-25 01:53:42 +08:00
Tim Rüdenauer cf9834174e Add fallback for X-Goog-Visitor-Id header 2022-08-15 20:38:20 +02:00
Zechariah 5717633c54 🔥 no more omitting "views" 2022-05-31 01:39:22 +08:00
Zechariah a5e3121a98 🐛 tries to browse an undefined browseId 2022-05-31 01:20:57 +08:00
Zechariah e25f7e5546 🐛 error fixes, and removed some returned data 2022-05-31 01:20:57 +08:00
Zechariah f4fd1db926 Return this after initialize so you can initialize it in 1 line 2022-03-30 23:21:44 +08:00
Zechariah ce98351d06 Made all search methods plural 2022-03-30 17:57:57 +08:00
Zechariah babd2bc2a0 Updated the search functions 2022-03-29 18:44:10 +08:00
Zechariah b03e38891e Made more function calls type safer 2022-03-28 01:16:55 +08:00
Zechariah 45692dcaa8 Validate all types before returning to user 2022-03-28 01:11:14 +08:00
Zechariah eb1309c5a1 Updated project configuration 2022-02-05 15:43:54 +08:00
Zechariah 2154dc67ab Using jest for testing instead of doing it manually 2022-02-05 15:00:31 +08:00
Zechariah 75d85764c3 Moved traverse.ts 2022-02-05 06:23:05 +08:00
Zechariah 4684d3c0e5 Make sure videoId is valid when fetching video 2021-12-31 01:15:49 +08:00
Zechariah 08ea5a47b6 Not exporting namespace anymore 2021-12-31 00:54:47 +08:00
Zechariah 5a458d5557 Published types properly 2021-12-31 00:17:00 +08:00
Zechariah 9edefbb351 Changed PlaylistDetailed to PlaylistFull 2021-12-26 11:22:57 +08:00
Zechariah 9479811d4c Song and Video data fetching works 2021-12-26 03:22:59 +08:00
Zechariah 7471f1e70c Fetching playlist by id works 2021-12-25 17:06:16 +08:00
Zechariah e3579a90b5 Fetching album by id works 2021-12-25 12:22:46 +08:00
Zechariah cdbf3da1aa Added more consistency 2021-12-24 22:38:48 +08:00
Zechariah f5b5047c31 Moved methods all over, all artist methods work 2021-12-24 18:11:38 +08:00
Zechariah 779035391c Made tests for search, all works 2021-12-24 13:35:21 +08:00
Zechariah fe73e1d5ab This code is a mess 2021-12-24 02:32:27 +08:00
Zechariah 14ae240638 Initial Commit - Searching works 2021-12-23 01:01:37 +08:00