Comments (30)
It replace parenthesis and all in between with a space if no_parenthesis is set to True
from absolute-series-scanner.
To remove years from series with years in parenthesis
from absolute-series-scanner.
The 'True' is clear to remove everything in them. Its the 'False' that is inconsistent as shown above.
from absolute-series-scanner.
need clarification on the expected behavior and i'll fix as I need it fixed for the other issues i'm currently working on.
from absolute-series-scanner.
"something (string)" stay as "something (string)" as some ep title needs it. We remove parenthesis when searching ep numbers as year in parenthesis cause issues and hindered searching ep number in other filenames
from absolute-series-scanner.
ok, so when 'False', we should not remove parenthesis.
Meaning The current:
"something (string )" -> 'something (string'
"something ( string )" -> 'something string'
"something (string)" -> 'something (string)'
"something ( string)" -> 'something string)'
Shoud actually be kept the same:
"something (string )" -> 'something (string )'
"something ( string )" -> 'something ( string )'
"something (string)" -> 'something (string)'
"something ( string)" -> 'something ( string)'
from absolute-series-scanner.
Possibly scrub the useless space but yes
from absolute-series-scanner.
ok, will work on that fix. Thanks for the clarification. This inconsistency was giving me headache. đ
from absolute-series-scanner.
The principle of the function is all cleaning but super aggressive when
true to do the heavy removal and respective enough otherwise.
I wrote that over so many months i need to rediscover at times :p
Thanks for the assistance again
On 7 May 2016 21:02, "EndOfLine369" [email protected] wrote:
ok, will work on that fix. Thanks for the clarification. This
inconsistency was giving me headache. [image: đ]â
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#30 (comment)
from absolute-series-scanner.
So is this the correct expected behavior?
Current:
>>> string1="something (string )"
>>> string2="something ( string )"
>>> string3="something (string)"
>>> string4="something ( string)"
>>> clean_string(string1)
'something (string'
>>> clean_string(string2)
'something string'
>>> clean_string(string3)
'something (string)'
>>> clean_string(string4)
'something string)'
New:
>>> string1="something (string )"
>>> string2="something ( string )"
>>> string3="something (string)"
>>> string4="something ( string)"
>>> clean_string(string1)
'something (string)'
>>> clean_string(string2)
'something (string)'
>>> clean_string(string3)
'something (string)'
>>> clean_string(string4)
'something (string)'
'whack_pre_clean' / 'whack' / 'clean_string' were updated.
I've also added in two additional behavior arguments of 'no_whack' & 'no_dash'. To allow us to skip the pre whack & whack cleanups (no idea if will ever be needed). As well as dash removal '-' => ' ' (needed on the 'Mobile Suit Gundam 0080 - War in the Pocket'(folder) != 'Mobile Suit Gundam 0080 War in the Pocket'(file) as we need the '-' removed from the folder name to match the filename prefix).
EX:
>>> string5='[SubDesu] KissXSis-OVA Episode 3 - ( 4th )UNCENSORED(1280x720)[c845099a]'
>>> clean_string(string5, no_parenthesis=False, no_whack=False, no_dash=False)
'KissXSis-OVA Episode 3 - (4th)'
>>> clean_string(string5, no_parenthesis=True, no_whack=False, no_dash=False)
'KissXSis-OVA Episode 3'
>>> clean_string(string5, no_parenthesis=False, no_whack=True, no_dash=False)
'KissXSis-OVA Episode 3 - (4th) UNCENSORED (1280x720)'
>>> clean_string(string5, no_parenthesis=False, no_whack=False, no_dash=True)
'KissXSis OVA Episode 3 (4th)'
>>> clean_string(string5, no_parenthesis=True, no_whack=True, no_dash=False)
'KissXSis-OVA Episode 3 - UNCENSORED'
>>> clean_string(string5, no_parenthesis=False, no_whack=True, no_dash=True)
'KissXSis OVA Episode 3 (4th) UNCENSORED (1280x720)'
>>> clean_string(string5, no_parenthesis=True, no_whack=True, no_dash=True)
'KissXSis OVA Episode 3 UNCENSORED'
from absolute-series-scanner.
If this is the correct expected behavior, i'll test against my libraries and the put in a pull request for your review/pull.
If there are some strings you want me to test out as well, please feel free to provide.
from absolute-series-scanner.
Encensored should be in pre whack or wack list and be scrubbed
Yep that's the behavour
On 7 May 2016 21:43, "EndOfLine369" [email protected] wrote:
If this is the correct expected behavior, i'll test against my libraries
and the put in a pull request for your review/pull.â
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#30 (comment)
from absolute-series-scanner.
It is, 'UNCENSORED' is only showing above when 'no_whack=True' đ.
Will test. Glad I could get this fixed. As who knows what other strange behavior this has been causing.
from absolute-series-scanner.
All my weird names are in the test library. If that works all is good.
On 7 May 2016 21:58, "EndOfLine369" [email protected] wrote:
It is, 'UNCENSORED' is only showing above when 'no_whack=True' [image:
đ].
Will test. Glad I could get this fixed. As who knows what other strange
behavior this has been causing.â
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#30 (comment)
from absolute-series-scanner.
2016-05-06 23:40:12 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e501 "[Doki] Clannad After Story - Another World, Kyou Chapter (1280x720 Hi10P BD AAC) [CD48CEAB].mkv" "Another World, Kyou Chapter (BD"
2016-05-06 23:40:12 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e151 "[Doki] Clannad After Story - NCED 1 (1280x720 Hi10P BD AAC) [E6D370E1].mkv" "8" "(BD"
2016-05-06 23:40:12 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e152 "[Doki] Clannad After Story - NCED 2 (1280x720 Hi10P BD AAC) [500E4CAA].mkv" "8" "(BD"
2016-05-06 23:40:12 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e153 "[Doki] Clannad After Story - NCED 3 (1280x720 Hi10P BD AAC) [F5A27A4E].mkv" "8" "(BD"
2016-05-06 23:40:12 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e154 "[Doki] Clannad After Story - NCED 4 (1280x720 Hi10P BD AAC) [698B827D].mkv" "8" "(BD"
2016-05-06 23:40:12 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e101 "[Doki] Clannad After Story - NCOP (1280x720 Hi10P BD AAC) [F2C88F7F].mkv" "7" "(BD"
2016-05-06 23:40:12 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e502 "[Doki] Clannad After Story - Recap (1280x720 Hi10P BD AAC) [7798004D].mkv" "Recap (BD"
Already better evidence:
2016-05-07 17:10:50 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e501 "[Doki] Clannad After Story - Another World, Kyou Chapter (1280x720 Hi10P BD AAC) [CD48CEAB].mkv" "Another World, Kyou Chapter"
2016-05-07 17:10:50 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e151 "[Doki] Clannad After Story - NCED 1 (1280x720 Hi10P BD AAC) [E6D370E1].mkv" "8"
2016-05-07 17:10:50 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e152 "[Doki] Clannad After Story - NCED 2 (1280x720 Hi10P BD AAC) [500E4CAA].mkv" "8"
2016-05-07 17:10:50 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e153 "[Doki] Clannad After Story - NCED 3 (1280x720 Hi10P BD AAC) [F5A27A4E].mkv" "8"
2016-05-07 17:10:50 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e154 "[Doki] Clannad After Story - NCED 4 (1280x720 Hi10P BD AAC) [698B827D].mkv" "8"
2016-05-07 17:10:50 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e101 "[Doki] Clannad After Story - NCOP (1280x720 Hi10P BD AAC) [F2C88F7F].mkv" "7"
2016-05-07 17:10:50 "Clannad After Story -i -lj -s9 -e22 -a5841 [anidb-5841] -n9701" s0000e502 "[Doki] Clannad After Story - Recap (1280x720 Hi10P BD AAC) [7798004D].mkv" "Recap"
Library still scanning.
from absolute-series-scanner.
Better :)
Well spotted. Look forward to the result
from absolute-series-scanner.
1525 of my episodes were impacted.
And majority are still being cleaned wrong due to missing whack/pre for video sizes (EX: 720X480).
Will have to work on it more but from the fixes I did already I see no issues.
from absolute-series-scanner.
Scanned again. Went up to 1887 impacted. Found some minor fixes needed.
One last library scan. If log comparison looks good, will put in the request for your review.
from absolute-series-scanner.
Excellent.
When you say impacted, the title is messy? Because the ep number looks fine...
from absolute-series-scanner.
Correct. its removing crappy titles like 'Clannad After Story' shows above.
from absolute-series-scanner.
On review, there are no longer any junk titles now.
But there are some strange changes to episodes where they went from regex loop parsing back to the 'for word in words' loop parsing. I'll have to see what is up with that but it looks like a good side effect as it still is assigning the same episode number which means faster processing.
EX:
FROM:
"A Certain Magical Index (Toaru Majutsu no Index) -f -lj -s10 -e24 -a5975 [anidb-5975] -n10044" s0001e001 "[Eclipse-m.3.3.w] Toaru Majutsu no Index - 01 (1280x720 h264) [678AB4A6].mkv" "11" "(H264)"
TO:
"A Certain Magical Index (Toaru Majutsu no Index) -f -lj -s10 -e24 -a5975 [anidb-5975] -n10044" s0001e001 "[Eclipse-m.3.3.w] Toaru Majutsu no Index - 01 (1280x720 h264) [678AB4A6].mkv"
from absolute-series-scanner.
That is great
The 'for word in words loop' is the main one and regex only a fallback as the loop did wonders.
We should have less issues and well spoted and tested as i didn't wven know it was happening.
from absolute-series-scanner.
Ah hA
Looks like it should have failed and gone to regex parsing as '01' is seen in these two files and trigger the path and misc.count(ep)>=2
multiple string condition.
"A Certain Magical Index (Toaru Majutsu no Index) -f -lj -s10 -e24 -a5975 [anidb-5975] -n10044" s0001e001 "[Eclipse-m.3.3.w] Toaru Majutsu no Index - 01 (1280x720 h264) [678AB4A6].mkv"
"A Certain Magical Index (Toaru Majutsu no Index) -f -lj -s10 -e24 -a5975 [anidb-5975] -n10044" s0000e001 "[Eclipse] Toaru Majutsu no Index-tan - SP01 - 01 (h264) [DEA5FE85].mkv" "6" "01"
BUT, as 01 is properly the last string in the cleaned filename now, it is still a digit and thus triggers the if ep.isdigit(): add_episode_into_plex(
at the end if the loop. While still triggering the path and misc.count(ep)>=2
multiple string condition but just on the last string now.
FROM: Toaru Majutsu no Index - 01 (h264)
TO: Toaru Majutsu no Index - 01
2016-05-08 09:00:30 Initial: show 'A Certain Magical Index (Toaru Majutsu no Index) -f -lj -s10 -e24 -a5975 [anidb-5975] -n10044', season '1', ep 'Toaru Majutsu no Index - 01', filename '[Eclipse-m.3.3.w] Toaru Majutsu no Index - 01 (1280x720 h264) [678AB4A6]'
2016-05-08 09:00:30 Second Initial: show 'A Certain Magical Index (Toaru Majutsu no Index) -f -lj -s10 -e24 -a5975 [anidb-5975] -n10044', season '1', ep 'Toaru Majutsu no Index - 01'
2016-05-08 09:00:30 Words: ['Toaru', 'Majutsu', 'no', 'Index', '-', '01'] : Loop broken on: '01'
from absolute-series-scanner.
@ZeroQI, Pull request #31 submitted for your review/testing
from absolute-series-scanner.
Whack replaces keyworks, you cannot remove words can could end up in titles. that is what pre-whack is for, including hyphens and composed versions of them (like you did with "h264-aac")
If we add to "whack = [" the below, then all titles with "en" ("in" in french), "french" ("the french maid" or titles with french in it), "Sub" ("The Sub-Mariner") then all these would possibly have the word disapear for titles gathered (ep title or serie title)
So if you remove generic terms: 'sub','french', 'en' OR if my fear is unfounded then we can commit
Oh and i forgot great job, corrections are flying since you started assisting :D
from absolute-series-scanner.
Here is what I dared to touch.
Pre-Whack:
ADD: "x264-AAC"
REMOVE: "( )", "( )", "( )", "( )", "( )", "(_)", => handled by in function cleanup
Whack:
ADD: '8bit', '8-bit', '10-bit', 'hevc', 'ac-3'
ADD: 'dub', 'sub', 'engsub', 'eng', 'en', 'ja', 'jap', 'unc', 'cen',
REMOVE: '1920x1080','1280x720' => handled by in function cleanup
re.sub('[0-9]{3,4} ?[Xx] ?[0-9]{3,4}', ' ', string)
REMOVE: 'ac3' => was in there twice
FIXED TO LOWERCASE: "hiei", "metis", "norar", 'homĐŻ', "it00nz", => as whack is expected lowered
if word.lower() not in whack
I have just checked the whack additions against the 'anime-titles.xml' file.
Only en & ja have any real entries.
In relooking at my files for why I would need 'en' or 'ja', will actually put in pre-whack:
==> 'dub en'
==> 'dub sub en ja'
==> 'dub sub ja+ ru+'
Instead of 'en'/'ja'. Any objections to that?
while [ 0 ]; do echo -n "STRING: "; read word; COUNT=$(egrep -i -c "[-> :]$word[-< :]" anime-titles.xml); if (( $COUNT == 0 )); then echo "Found = $COUNT"; else echo "Found = $COUNT"; egrep -i "[> :]$word[< :]" anime-titles.xml|sort; fi; done
STRING: dub
Found = 0
STRING: sub
Found = 0
STRING: engsub
Found = 0
STRING: eng
Found = 0
STRING: jap
Found = 0
STRING: unc
Found = 0
STRING: cen
Found = 1
<title type="official" xml:lang="gl">Combate contra cen millĂłns de poderosos guerreiros</title>
STRING: en
Found = 48
<title type="main" xml:lang="x-jat">Momoya x Peeping Life: Go en Desu yo! II</title>
<title type="official" xml:lang="en">La Maison en Petits Cubes</title>
<title type="official" xml:lang="es">Acoso en el Instituto</title>
<title type="official" xml:lang="es">Apocalipsis en el instituto</title>
<title type="official" xml:lang="es">Doraemon Odisea en el espacio</title>
<title type="official" xml:lang="es">Doraemon en el mĂĄgico mundo de las aves</title>
<title type="official" xml:lang="es">Doraemon y Nobita Holmes en el misterioso museo del futuro</title>
<title type="official" xml:lang="es">En busca del Condor Dorado</title>
<title type="official" xml:lang="es">Haru en el Reino de los Gatos</title>
<title type="official" xml:lang="es">La vida en azul</title>
<title type="official" xml:lang="es">Ponyo en el Acantilado</title>
<title type="official" xml:lang="es">Sexo y violencia en las aulas</title>
<title type="official" xml:lang="es">The Doraemons: Aventuras en un tren</title>
<title type="official" xml:lang="es">Unico en la isla de la magia</title>
<title type="official" xml:lang="fr">Le tour du monde en 80 jours</title>
<title type="official" xml:lang="fr">Pokémon 2 : Le pouvoir est en toi</title>
<title type="official" xml:lang="sv">Det blÄser upp en vind</title>
<title type="official" xml:lang="sv">En cell-sam historia</title>
<title type="official" xml:lang="tr">PokĂ©mon 2: En GĂŒĂ§lĂŒ O</title>
<title type="syn" xml:lang="es">Algo acerca de ti que perdĂ en algĂșn lugar OVA</title>
<title type="syn" xml:lang="es">Los mil viajes en los suenos de Mim</title>
<title type="syn" xml:lang="es">Mi juventud en la Arcadia: camino del infinito SSX</title>
<title type="syn" xml:lang="es">Mi juventud en la Arcadia</title>
<title type="syn" xml:lang="fr">Nasu - Un été en Andalousie</title>
<title type="syn" xml:lang="nl">De avonturen van Boes en zijn vrienden</title>
<title type="syn" xml:lang="tr">En Arka Sıradaki Ćeytan Kral</title>
<title type="syn" xml:lang="x-jat">VS Toshi Lamune & 40 En</title>
<title type="syn" xml:lang="x-jat">VS Toshi Ramune & 40 En</title>
<title xml:lang="es" type="official">Alicia en el PaĂs de las Maravillas</title>
<title xml:lang="es" type="official">Dragon Ball: La bella durmiente en el castillo del mal</title>
<title xml:lang="es" type="official">El Castillo en el Cielo</title>
<title xml:lang="es" type="official">Sexo en el Internado</title>
<title xml:lang="es" type="official">Si Te Veo En Mis Sueños</title>
<title xml:lang="es" type="syn">Algo acerca de ti que perdĂ en algĂșn lugar</title>
<title xml:lang="es" type="syn">Ăngel: En Busca de la Flor del ArcoĂris</title>
<title xml:lang="es-LA" type="official">En Busca de la Ciudad Tesoro</title>
<title xml:lang="es-LA" type="official">Inuyasha - Fuego En Las Islas MĂsticas</title>
<title xml:lang="es-LA" type="official">Tenchi en Tokyo</title>
<title xml:lang="fr" type="official">Angie, détective en herbe</title>
<title xml:lang="fr" type="official">En selle, Sakamichi !</title>
<title xml:lang="fr" type="official">La Maison en petits cubes</title>
<title xml:lang="fr" type="syn">PĂ©nĂ©lope tĂȘte en l`air (2009)</title>
<title xml:lang="fr" type="syn">PĂ©nĂ©lope tĂȘte en l`air</title>
<title xml:lang="nl" type="official">Aladdin en de Wonderlamp</title>
<title xml:lang="nl" type="official">Belfi en Lillibit</title>
<title xml:lang="nl" type="official">Jody en het Hertejong</title>
<title xml:lang="nl" type="official">Yamada en de Zeven Heksen</title>
<title xml:lang="x-jat" type="main">Momoya x Peeping Life: Go en Desu yo!</title>
STRING: ja
Found = 25
<title type="main" xml:lang="x-jat">Dangerous Jiisan Ja</title>
<title type="main" xml:lang="x-jat">Kuroko no Baske: Baka ja Katenai no yo!</title>
<title type="main" xml:lang="x-jat">Tenshi Nanka ja Nai</title>
<title type="main" xml:lang="x-jat">Wazaguu! VS Dangerous Jiisan Ja: Houfukuzettou! Anime Quiz</title>
<title type="official" xml:lang="et">Aachi ja Ssipak: tappev duett</title>
<title type="official" xml:lang="et">Arsene Lupin ja Cagliostro loss</title>
<title type="official" xml:lang="et">Neon Genesis Evangelion: Surm ja taassĂŒnd</title>
<title type="official" xml:lang="fi">Belle ja Sebastian</title>
<title type="official" xml:lang="fi">Katri - Paimen, Piika Ja EmÀntÀ</title>
<title type="official" xml:lang="fi">Muumipeikko ja pyrstötÀhti</title>
<title type="official" xml:lang="fi">Poika ja valkoinen valas</title>
<title type="syn" xml:lang="fi">Pokémon Ranger ja meren prinssi Manaphy</title>
<title type="syn" xml:lang="x-jat">Netgame no Yome wa Onnanoko ja Nai to Omotta?</title>
<title xml:lang="et" type="official">Suur panda ja vÀike panda: tsirkus vihmas</title>
<title xml:lang="et" type="official">Suur panda ja vÀike panda</title>
<title xml:lang="fi" type="official">Tom Sawyerin ja Huckleberry Finnin seikkailut</title>
<title xml:lang="fi" type="syn">Pokémon: Mew ja auran sankari Lucario</title>
<title xml:lang="x-jat" type="main">Dangerous Jiisan Ja TV</title>
<title xml:lang="x-jat" type="main">Kore ga Umi e no Ai ja Naika!</title>
<title xml:lang="x-jat" type="main">Netoge no Yome wa Onnanoko ja Nai to Omotta?</title>
<title xml:lang="x-jat" type="main">Onii-chan no Koto Nanka Zenzen Suki ja Naindakara ne!!</title>
<title xml:lang="x-jat" type="main">Toaru Kagaku no Railgun: Entenka no Satsuei Model mo Raku Ja Arimasen wa ne.</title>
from absolute-series-scanner.
The scanner can also be used for normal series but no objection to that. Perfectly documented as always.
from absolute-series-scanner.
Pull request has been updated accordingly f4a5901
from absolute-series-scanner.
Glad we could get this behavior fixed.
from absolute-series-scanner.
Very glad too, thanks for the fix
from absolute-series-scanner.
Related Issues (20)
- Mushoku Tensei Season 2 Episode 0 not mapping properly anymore with anidb change. HOT 10
- Matching multiple files as alternate formats HOT 8
- How do I mark "Other" shows from aniDB? HOT 3
- YouTube Season sorting incorrectly
- Anime series titles containing the word "Special" get treated as specials, ignoring given season and episode numbering. HOT 9
- Absolute Series Scanner not sorting into Seasons HOT 1
- Sometimes specials use TVDB metadata (rather than aniDB) HOT 18
- Customizable Grouping Folder depth HOT 2
- tvdb2/3 not working for Detective Conan HOT 7
- "ERROR - No module in Absolute Series Scanner" since last commit. HOT 2
- Library Empty HOT 1
- Support for TubeArchivist HOT 2
- One Piece Multiple episodes in 1 file Episode 1000+ displayed as Season 1000+ HOT 7
- Naruto Arcs not being correctly named, I think my tvdb4.mapping file is being ignored and is using the online xml file? HOT 4
- .hack series problem with mapping HOT 1
- Overwriting season information when adding a new one HOT 6
- tvdb2 scanner does not seem to map specials correctly HOT 3
- Episodes with a leading numeral in title map to multiple episodes HOT 1
- Multi-Episode files are causing scanner errors. HOT 1
- Plex - Library Not Populated with One Piece (tvdb4-81797) HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â€ïž Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from absolute-series-scanner.